1
This commit is contained in:
@@ -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
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user