This commit is contained in:
suyl
2021-07-19 18:54:42 +08:00
parent 6ca85d5be2
commit f765774128
2 changed files with 4 additions and 7 deletions

View File

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