This commit is contained in:
suyl
2021-07-20 16:21:28 +08:00
parent 2b6966f93d
commit 28485f19ff

View File

@@ -43,7 +43,8 @@ func checkToken(c *gin.Context) (tokenInfo *model.TokenInfo) {
tokenInfo.Token = cookie.Value
}
globals.SugarLogger.Debugf("checkToken token1: %v", tokenInfo.Token)
if token = utils.GetKey(tokenInfo.Token).(string); token == "" {
if tokenMap := utils.GetKey(tokenInfo.Token).(map[string]interface{}); token == "" {
fmt.Println("111111111111111111111111", tokenMap)
err = fmt.Errorf("token过期或无效请重新登录")
c.JSON(http.StatusOK, &CallBack{
Desc: err.Error(),