|
@@ -121,7 +121,7 @@ func (a *AuthController) Register(c *gin.Context) {
|
|
|
code := global.Redis.Get(context.TODO(), req.Email).Val()
|
|
|
fmt.Println("code:", code)
|
|
|
if code == "" || code != req.SmsCode {
|
|
|
- resp.Fail("验证码错误,请重新输入", c)
|
|
|
+ resp.Fail("Verification code error.", c)
|
|
|
return
|
|
|
}
|
|
|
|
|
@@ -367,15 +367,12 @@ func (a *AuthController) BindMobile(c *gin.Context) {
|
|
|
return
|
|
|
}
|
|
|
|
|
|
- item, err := msg_code.GetMsgCode(req.Mobile, req.SmsCode)
|
|
|
+ _, err = msg_code.GetMsgCode(req.Mobile, req.SmsCode)
|
|
|
if err != nil {
|
|
|
resp.Fail("Verification code error."+err.Error(), c)
|
|
|
return
|
|
|
}
|
|
|
- if item == nil {
|
|
|
- resp.Fail("验证码错误,请重新输入", c)
|
|
|
- return
|
|
|
- }
|
|
|
+
|
|
|
|
|
|
user := english_report_email.Email{
|
|
|
Id: userinfo.Id,
|
|
@@ -455,7 +452,7 @@ func (a *AuthController) ForgetPwd(c *gin.Context) {
|
|
|
} else {
|
|
|
code := global.Redis.Get(context.TODO(), req.Account).Val()
|
|
|
if code == "" || code != req.SmsCode {
|
|
|
- resp.Fail("验证码错误,请重新输入", c)
|
|
|
+ resp.Fail("Verification code error.", c)
|
|
|
return
|
|
|
}
|
|
|
}
|