Roc 4 months ago
parent
commit
6aeae45574
1 changed files with 3 additions and 0 deletions
  1. 3 0
      controllers/base_auth.go

+ 3 - 0
controllers/base_auth.go

@@ -505,7 +505,9 @@ func (c *BaseAuthController) Prepare() {
 	//accountArr := strings.Split(accountStr, "=")
 	//account := accountArr[1]
 
+	fmt.Println("token:", token)
 	session, err := system.GetSysSessionByToken(token)
+	fmt.Println("session:", session)
 	if err != nil {
 		if utils.IsErrNoRow(err) {
 			c.JSON(models.BaseResponse{Ret: 408, Msg: "信息已变更,请重新登陆!", ErrMsg: "Token 信息已变更:Token: " + token}, false, false)
@@ -680,6 +682,7 @@ func checkToken(c *BaseAuthController) (isOk bool, token string, resp models.Bas
 	// 单点登录逻辑
 	aiUser := c.Ctx.GetCookie("ai_user")
 	fmt.Println("ai_user:", aiUser)
+	fmt.Println("token:", token)
 	if aiUser != "" {
 		// Token空了, 以Cookie为准重新登录
 		if token == `` {