feat(1.0.5):优化用户体验

developing
张帅 1 week ago
parent 287881c68c
commit 013fce24f7

@ -42,6 +42,7 @@ func (a *AuthService) LoginByCaptcha(phone, openid string) (string, error) {
} }
token, err := a.auth.LoginByCaptcha(ePhone, openid) token, err := a.auth.LoginByCaptcha(ePhone, openid)
if err != nil { if err != nil {
a.log.Error(err)
return "", err return "", err
} }
return token, nil return token, nil

@ -73,7 +73,8 @@ func (a AuthRepositoryORM) LoginByCaptcha(phone, openid string) (string, error)
} }
if u.Openid != openid { if u.Openid != openid {
return "", errors.New(fmt.Sprintf("openid和手机号不匹配,[%s]-[%s]", phone, openid)) a.log.Errorf("openid和手机号不匹配,[%s]-[%s]", phone, openid)
return "", errors.New("不支持换机登录")
} }
if u.Status == 0 { if u.Status == 0 {

@ -50,9 +50,9 @@ export class AppComponent implements OnInit {
} else { } else {
// 如果都没有token重定向到获取token的页面 // 如果都没有token重定向到获取token的页面
console.log("需要获取token重定向到授权页面"); console.log("需要获取token重定向到授权页面");
window.location.href = "http://famyun.com/callback_test"; // window.location.href = "http://famyun.com/callback_test";
// 生产环境使用微信授权 // 生产环境使用微信授权
// window.location.href = "https://open.weixin.qq.com/connect/oauth2/authorize?appid=wx13bd75fbedf283e5&redirect_uri=http%3A%2F%2Ffamyun.com%2Fcallback&response_type=code&scope=snsapi_base&state=123#wechat_redirect"; window.location.href = "https://open.weixin.qq.com/connect/oauth2/authorize?appid=wx13bd75fbedf283e5&redirect_uri=http%3A%2F%2Ffamyun.com%2Fcallback&response_type=code&scope=snsapi_base&state=123#wechat_redirect";
} }
} }
}); });

Loading…
Cancel
Save