|
@@ -466,16 +466,14 @@ func (l *Login) Register() error {
|
|
|
l.SetSession("registerStep", "2")
|
|
|
return "y"
|
|
|
} else if reqType == "save" {
|
|
|
- //phone, _ := l.GetSession("identCodeKey").(string)
|
|
|
- //if phone == "" {
|
|
|
- // return "timeout"
|
|
|
- //}
|
|
|
- //password := strings.TrimSpace(l.GetString("password"))
|
|
|
- //if !passwordReg.MatchString(password) {
|
|
|
- // return "passwordError"
|
|
|
- //}
|
|
|
- phone := l.GetString("phone")
|
|
|
- password := ""
|
|
|
+ phone, _ := l.GetSession("identCodeKey").(string)
|
|
|
+ if phone == "" {
|
|
|
+ return "timeout"
|
|
|
+ }
|
|
|
+ password := strings.TrimSpace(l.GetString("password"))
|
|
|
+ if !passwordReg.MatchString(password) {
|
|
|
+ return "passwordError"
|
|
|
+ }
|
|
|
retVal := func() string {
|
|
|
rid := l.GetString("rid")
|
|
|
oid := l.GetString("oid")
|