|
@@ -6,7 +6,6 @@ import (
|
6
|
6
|
"SSO/service"
|
7
|
7
|
"SSO/utils"
|
8
|
8
|
"encoding/json"
|
9
|
|
- "strings"
|
10
|
9
|
"time"
|
11
|
10
|
)
|
12
|
11
|
|
|
@@ -67,21 +66,21 @@ func (this *MobileRegistController) RegistSubmit() {
|
67
|
66
|
|
68
|
67
|
redisClient := service.RedisClient()
|
69
|
68
|
defer redisClient.Close()
|
70
|
|
- if strings.HasPrefix(mobile, "12") {
|
71
|
|
- if code != "123456" {
|
72
|
|
- this.Data["json"] = enums.MakeFailResponseJSONWithSGJErrorCode(enums.ErrorCodeVerificationCodeWrong)
|
73
|
|
- this.ServeJSON()
|
74
|
|
- return
|
75
|
|
- }
|
|
69
|
+ // if strings.HasPrefix(mobile, "12") {
|
|
70
|
+ // if code != "123456" {
|
|
71
|
+ // this.Data["json"] = enums.MakeFailResponseJSONWithSGJErrorCode(enums.ErrorCodeVerificationCodeWrong)
|
|
72
|
+ // this.ServeJSON()
|
|
73
|
+ // return
|
|
74
|
+ // }
|
76
|
75
|
|
77
|
|
- } else {
|
78
|
|
- cache_code, _ := redisClient.Get("code_msg_" + mobile).Result()
|
79
|
|
- if cache_code != code {
|
80
|
|
- this.Data["json"] = enums.MakeFailResponseJSONWithSGJErrorCode(enums.ErrorCodeVerificationCodeWrong)
|
81
|
|
- this.ServeJSON()
|
82
|
|
- return
|
83
|
|
- }
|
|
76
|
+ // } else {
|
|
77
|
+ cache_code, _ := redisClient.Get("code_msg_" + mobile).Result()
|
|
78
|
+ if cache_code != code {
|
|
79
|
+ this.Data["json"] = enums.MakeFailResponseJSONWithSGJErrorCode(enums.ErrorCodeVerificationCodeWrong)
|
|
80
|
+ this.ServeJSON()
|
|
81
|
+ return
|
84
|
82
|
}
|
|
83
|
+ // }
|
85
|
84
|
|
86
|
85
|
admin, err := service.RegisterSuperAdmin(mobile, pwd)
|
87
|
86
|
if err != nil {
|