修改奖励类型,游戏列表接口,

This commit is contained in:
chy
2025-06-11 16:01:46 +08:00
parent 82d8944e7a
commit 118775953b
6 changed files with 27 additions and 8 deletions

View File

@ -1,6 +1,7 @@
package jwt
import (
"errors"
"server/utility/ecode"
"strings"
"time"
@ -99,6 +100,9 @@ func ParseToken(tokenString string) (*TokenOut, error) {
return secretKey, nil
})
if err != nil {
if errors.Is(err, jwt.ErrTokenExpired) {
return nil, ecode.Expire.Sub("token 已过期")
}
return nil, ecode.Fail.Sub("解析 token 出现异常")
}