- change app info for weixin mini program.
This commit is contained in:
@@ -162,7 +162,7 @@ func (a *AutherMiniProgram) BindWeiXin(ctx *jxcontext.Context, code, nickName st
|
||||
if err = dao.GetEntity(db, user, "Tel"); err != nil {
|
||||
return auth.ConvertErr2NoUser(err, loginInfo.ID)
|
||||
}
|
||||
sessionInfo, err := api.WeixinAPI.SNSCode2Session(code)
|
||||
sessionInfo, err := api.WeixinMiniAPI.SNSCode2Session(code)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
@@ -176,7 +176,7 @@ func (a *AutherMiniProgram) BindWeiXin(ctx *jxcontext.Context, code, nickName st
|
||||
|
||||
func (a *AutherMiniProgram) Login(mobileNum, code string) (userID string, err error) {
|
||||
globals.SugarLogger.Debugf("AutherMiniProgram Login mobileNum:%s, code:%s", mobileNum, code)
|
||||
sessionInfo, err := api.WeixinAPI.SNSCode2Session(code)
|
||||
sessionInfo, err := api.WeixinMiniAPI.SNSCode2Session(code)
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
@@ -205,7 +205,7 @@ func (a *AutherMiniProgram) DecryptData(ctx *jxcontext.Context, encryptedData, i
|
||||
if err = api.Cacher.GetAs(composeSessionKeyCacheKey(ctx.GetLoginInfo().ID), &sessionKey); err != nil {
|
||||
return "", err
|
||||
}
|
||||
decryptedData, err := api.WeixinAPI.SNSDecodeMiniProgramData(encryptedData, sessionKey, iv)
|
||||
decryptedData, err := api.WeixinMiniAPI.SNSDecodeMiniProgramData(encryptedData, sessionKey, iv)
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user