This commit is contained in:
苏尹岚
2021-04-09 11:20:24 +08:00
parent b1868591d0
commit f062cb371c
2 changed files with 1 additions and 6 deletions

View File

@@ -4,7 +4,6 @@ import (
"bytes"
"encoding/base64"
"errors"
"fmt"
"regexp"
"strings"
"time"
@@ -279,16 +278,12 @@ func LoginInternal(ctx *Context, authType, authID, authIDType, authSecret string
if user != nil && user.GetID() != "" {
userProvider.UpdateLastLogin(user.GetID(), authType, ctx.GetRealRemoteIP())
}
fmt.Println("11111111111111111", authType)
//如果是小程序
if authType == "weixinmini" || authType == "weixinapp" {
appID := strings.Split(authSecret, ",")[0]
fmt.Println("22222222222222222222222222", appID)
if appID == "wx08a5c2a8581414ff" || appID == "wx2d6949f724b2541d" || appID == "wx18111a41fd17f24f" || appID == "wx4b5930c13f8b1170" { //菜市或者果园
fmt.Println("333333333333333333333333333", authInfo.AuthBindInfo.UserID)
if authInfo.AuthBindInfo.UserID != "" {
binds, err := dao.GetUserBindAuthInfo(dao.GetDB(), authInfo.AuthBindInfo.UserID, 0, nil, "", "", []string{"wx2bb99eb5d2c9b82c", "wx4b5930c13f8b1170"})
fmt.Println("444444444444444444444444", utils.Format4Output(binds, true))
if err != nil {
return authInfo, err
}