This commit is contained in:
苏尹岚
2020-11-04 13:58:51 +08:00
parent 81143786f3
commit d2d6ee0bc0

View File

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