This commit is contained in:
邹宗楠
2023-01-31 10:27:15 +08:00
parent c3c7c7ddbd
commit 0f45dee310
8 changed files with 44 additions and 32 deletions

View File

@@ -33,12 +33,13 @@ const (
)
const (
AuthTypeNone = ""
AuthTypePassword = "localpass"
AuthTypeEmail = "email"
AuthTypeMobile = "mobile"
AuthTypeWXApp = "weixinapp" //微信小程序
AuthTypeWXMini = "weixinmini" //微信小程序
AuthTypeNone = ""
AuthTypePassword = "localpass"
AuthTypeEmail = "email"
AuthTypeMobile = "mobile"
AuthTypeWXApp = "weixinapp" //微信小程序(商家版)
AuthTypeWXAppCaishi = "weixinappcs" //微信小程序(用户)
AuthTypeWXMini = "weixinmini" //微信小程序
)
const (
@@ -305,7 +306,7 @@ func LoginInternal(ctx *Context, authType, authID, authIDType, authSecret string
}
}
//微信APP端登录
if authType == AuthTypeWXApp {
if authType == AuthTypeWXApp || authType == AuthTypeWXAppCaishi {
appID := strings.Split(authSecret, ",")[0]
if appID == model.JXC4ClientAppID && authInfo.AuthBindInfo.UserID != "" {
binds, err := dao.GetUserBindAuthInfo(dao.GetDB(), authInfo.AuthBindInfo.UserID, 0, nil, "", "", []string{model.JXC4ClientAppID})