Skip to content

Commit 3882996

Browse files
committed
更新文档
1 parent f150c20 commit 3882996

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

docs/.vuepress/public/js/gitee.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -151,9 +151,9 @@ if (typeof window !== "undefined") {
151151
//解析json
152152
let json = JSON.parse(content);
153153
localStorage.setItem("userCount", Object.keys(json).length);
154-
let user = json[user?.login];
154+
let userConfig = json[user?.login];
155155
//用户未授权
156-
if (!user) {
156+
if (!userConfig) {
157157
if (failCallback != null) {
158158
failCallback("unauthorized");
159159
} else {
@@ -166,7 +166,7 @@ if (typeof window !== "undefined") {
166166
}
167167

168168
//判断是否过期,expireTime为字符串,例如"2025-03-04"
169-
if (user?.expireTime && new Date(user.expireTime).getTime() < Date.now()) {
169+
if (userConfig?.expireTime && new Date(userConfig.expireTime).getTime() < Date.now()) {
170170
if (failCallback != null) {
171171
failCallback("expired");
172172
} else {

0 commit comments

Comments
 (0)