- only delete temp password whecn bind successfully

This commit is contained in:
gazebo
2019-01-28 14:32:45 +08:00
parent 33199f8dc8
commit 3787eabfc3

View File

@@ -148,8 +148,8 @@ func BindMobile2(openid, secret, mobileNum, verifyCode, nickname string) (loginI
return nil, fmt.Errorf("绑定超时,请重新绑定")
}
if secret == cachedSecret {
api.Cacher.Del(openid)
if err = mobile.VerifyCode(mobileNum, verifyCode); err == nil {
api.Cacher.Del(openid)
err = nil
if nickname == "" {
nickname = wxUserinfo.NickName