根据用户有无手机号返回tokentype

This commit is contained in:
苏尹岚
2020-02-19 18:20:51 +08:00
parent c06f4fb9f0
commit 9919f66072

View File

@@ -351,6 +351,9 @@ func RemoveUserInfo(token string) {
func GetTokenInfo(token string) (authInfo *AuthInfo, err error) {
if authInfo = getFixedTokenName(token); authInfo != nil {
if authInfo.Mobile == "" {
authInfo.TokenType = 2
}
return authInfo, nil
}
if err = api.Cacher.GetAs(token, &authInfo); err == nil {