From 39abebc6d54083556a393441e0628bc3d93b46c7 Mon Sep 17 00:00:00 2001
From: 张含笑 <zhx18749296735@163.com>
Date: Sat, 25 Oct 2025 13:54:01 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/feature/v7.0/7.0.2' into feature/v7.0/7.0.2

---
 src/utils/auth.js |    9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/src/utils/auth.js b/src/utils/auth.js
index cf0694d..4e41090 100644
--- a/src/utils/auth.js
+++ b/src/utils/auth.js
@@ -6,7 +6,9 @@
 const UserId = 'b-user-id';
 
 export function getToken() {
-	return Cookies.get(TokenKey);
+	return Cookies.get(TokenKey, {
+		path: '/'
+	});
 }
 
 export function setToken(token) {
@@ -21,7 +23,10 @@
 }
 
 export function setRefreshToken(token) {
-	return Cookies.set(RefreshTokenKey, token);
+	return Cookies.set(RefreshTokenKey, token, {
+		expires: 7,
+		path: '/'
+	});
 }
 
 export function removeToken() {

--
Gitblit v1.9.3