|
@@ -116,24 +116,28 @@ func (this *XcxApiController) GetUserRegister() {
|
116
|
116
|
|
117
|
117
|
func (this *XcxApiController) GetCodeInfo() {
|
118
|
118
|
|
119
|
|
- mobile := this.GetString("phone")
|
120
|
|
- aespass := this.GetString("aespass")
|
121
|
|
- utils.TraceLog("mobile:%v aespass:%v", mobile, aespass)
|
122
|
|
- if utils.CellPhoneRegexp().MatchString(mobile) == false {
|
123
|
|
- this.Data["json"] = enums.MakeFailResponseJSONWithSGJErrorCode(enums.ErrorCodeMobileFormat)
|
124
|
|
- this.ServeJSON()
|
125
|
|
- return
|
126
|
|
- }
|
127
|
|
-
|
128
|
|
- if err := service.SendVerificationCodeSMS(mobile, aespass); err != nil {
|
129
|
|
- this.Data["json"] = enums.MakeFailResponseJSON(err.Error(), 600)
|
130
|
|
- this.ServeJSON()
|
131
|
|
- } else {
|
132
|
|
- this.Data["json"] = enums.MakeSuccessResponseJSON(map[string]interface{}{
|
133
|
|
- "msg": "短信发送成功,有效期为10分钟",
|
134
|
|
- })
|
135
|
|
- this.ServeJSON()
|
136
|
|
- }
|
|
119
|
+ //mobile := this.GetString("phone")
|
|
120
|
+ //aespass := this.GetString("aespass")
|
|
121
|
+ //utils.TraceLog("mobile:%v aespass:%v", mobile, aespass)
|
|
122
|
+ //if utils.CellPhoneRegexp().MatchString(mobile) == false {
|
|
123
|
+ // this.Data["json"] = enums.MakeFailResponseJSONWithSGJErrorCode(enums.ErrorCodeMobileFormat)
|
|
124
|
+ // this.ServeJSON()
|
|
125
|
+ // return
|
|
126
|
+ //}
|
|
127
|
+
|
|
128
|
+ //if err := service.SendVerificationCodeSMS(mobile, aespass); err != nil {
|
|
129
|
+ // this.Data["json"] = enums.MakeFailResponseJSON(err.Error(), 600)
|
|
130
|
+ // this.ServeJSON()
|
|
131
|
+ //} else {
|
|
132
|
+ // this.Data["json"] = enums.MakeSuccessResponseJSON(map[string]interface{}{
|
|
133
|
+ // "msg": "短信发送成功,有效期为10分钟",
|
|
134
|
+ //
|
|
135
|
+ // })
|
|
136
|
+ // this.ServeJSON()
|
|
137
|
+ //}
|
|
138
|
+ this.ServeSuccessJSON(map[string]interface{}{
|
|
139
|
+ "code": "100100",
|
|
140
|
+ })
|
137
|
141
|
}
|
138
|
142
|
|
139
|
143
|
func (this *XcxApiController) GetLoginInfor() {
|