修复一些bug

This commit is contained in:
2025-07-14 19:15:40 +08:00
parent 566aade03a
commit 983f21a35e
4 changed files with 44 additions and 99 deletions
+3 -1
View File
@@ -1,6 +1,7 @@
package routers
import (
"fmt"
"saas/models"
"time"
@@ -12,10 +13,11 @@ func Use_login_from_cookie(ctx *gin.Context) {
//先从缓存获取cookie值
cookie_value, is_have_cookie := ctx.Get("cookie_value")
if is_have_cookie {
//fmt.Println(cookie_value)
fmt.Println(cookie_value)
var cookie models.Cookie
cookie.Value = cookie_value.(string)
if models.DB.Where(&cookie).First(&cookie).Error == nil {
// 有数据