This commit is contained in:
lejianwen committed 2025-01-15 20:26:26 +08:00
1 parent cca191aad3
commit a4433e6113
3 files changed
+7 -3

No files matched your search

+1 -1
View File
@@ -68,7 +68,7 @@ func (us *UserService) InfoByAccessToken(token string) (*model.User, *model.User
// GenerateToken 生成token
func (us *UserService) GenerateToken(u *model.User) string {
if global.Config.Jwt.Key != "" {
if len(global.Jwt.Key) > 0 {
return global.Jwt.GenerateToken(u.Id)
}
return utils.Md5(u.Username + time.Now().String())