|
@@ -118,7 +118,8 @@ func (a *AuthController) Register(c *gin.Context) {
|
|
|
return
|
|
|
}
|
|
|
|
|
|
- code := global.Redis.Get(context.TODO(), req.Email).String()
|
|
|
+ code := global.Redis.Get(context.TODO(), req.Email).Val()
|
|
|
+ fmt.Println("code:", code)
|
|
|
if code == "" || code != req.SmsCode {
|
|
|
resp.Fail("验证码错误,请重新输入", c)
|
|
|
return
|
|
@@ -452,7 +453,7 @@ func (a *AuthController) ForgetPwd(c *gin.Context) {
|
|
|
|
|
|
}
|
|
|
} else {
|
|
|
- code := global.Redis.Get(context.TODO(), req.Account).String()
|
|
|
+ code := global.Redis.Get(context.TODO(), req.Account).Val()
|
|
|
if code == "" || code != req.SmsCode {
|
|
|
resp.Fail("验证码错误,请重新输入", c)
|
|
|
return
|