This commit is contained in:
邹宗楠
2023-03-27 09:55:35 +08:00
parent 9b0dd0eeac
commit 749106f5d6
2 changed files with 12 additions and 2 deletions

View File

@@ -100,7 +100,17 @@ func (c *Auth2Controller) SendVerifyCode() {
func (c *Auth2Controller) TiktokDecrypt() {
c.callTiktokDecrypt(func(params *tAuth2TiktokDecryptParams) (interface{}, string, error) {
phone, err := auth2.DecryptUserMsg(params.SessionKey, params.Iv, params.Msg, params.LoginType)
return phone, "", err
isExist := false
if phone != "" {
if user, err := dao.GetUserByID(dao.GetDB(), "mobile", phone); err == nil {
if user != nil {
isExist = true
} else {
isExist = false
}
}
}
return map[string]interface{}{"mobile": phone, "isExist": isExist}, "", err
})
}