|
@@ -505,9 +505,8 @@ func (c *BaseAuthController) Prepare() {
|
|
|
//accountArr := strings.Split(accountStr, "=")
|
|
|
//account := accountArr[1]
|
|
|
|
|
|
- fmt.Println("token:", token)
|
|
|
session, err := system.GetSysSessionByToken(token)
|
|
|
- fmt.Println("session:", session)
|
|
|
+ //fmt.Println("session:", session)
|
|
|
if err != nil {
|
|
|
if utils.IsErrNoRow(err) {
|
|
|
c.JSON(models.BaseResponse{Ret: 408, Msg: "信息已变更,请重新登陆!", ErrMsg: "Token 信息已变更:Token: " + token}, false, false)
|
|
@@ -622,7 +621,7 @@ func (c *BaseAuthController) Prepare() {
|
|
|
apiMap[s] = true
|
|
|
}
|
|
|
|
|
|
- fmt.Println("uri:", uri)
|
|
|
+ //fmt.Println("uri:", uri)
|
|
|
|
|
|
//fmt.Println(apiMap)
|
|
|
if !apiMap[uri] {
|
|
@@ -664,13 +663,13 @@ func checkToken(c *BaseAuthController) (isOk bool, token string, resp models.Bas
|
|
|
}
|
|
|
if authorization == "" {
|
|
|
strArr := strings.Split(uri, "?")
|
|
|
- for k, v := range strArr {
|
|
|
- fmt.Println(k, v)
|
|
|
- }
|
|
|
+ //for k, v := range strArr {
|
|
|
+ // fmt.Println(k, v)
|
|
|
+ //}
|
|
|
if len(strArr) > 1 {
|
|
|
authorization = strArr[1]
|
|
|
authorization = strings.Replace(authorization, "Authorization", "authorization", -1)
|
|
|
- fmt.Println(authorization)
|
|
|
+ //fmt.Println(authorization)
|
|
|
}
|
|
|
}
|
|
|
if authorization != "" {
|
|
@@ -684,7 +683,7 @@ func checkToken(c *BaseAuthController) (isOk bool, token string, resp models.Bas
|
|
|
if aiUser == `` {
|
|
|
aiUser = c.Ctx.GetCookie("ai_token")
|
|
|
}
|
|
|
- fmt.Println("ai_user:", aiUser)
|
|
|
+ //fmt.Println("ai_user:", aiUser)
|
|
|
//fmt.Println("token:", token)
|
|
|
if aiUser != "" {
|
|
|
// Token空了, 以Cookie为准重新登录
|