We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f150c20 commit 3882996Copy full SHA for 3882996
1 file changed
docs/.vuepress/public/js/gitee.js
@@ -151,9 +151,9 @@ if (typeof window !== "undefined") {
151
//解析json
152
let json = JSON.parse(content);
153
localStorage.setItem("userCount", Object.keys(json).length);
154
- let user = json[user?.login];
+ let userConfig = json[user?.login];
155
//用户未授权
156
- if (!user) {
+ if (!userConfig) {
157
if (failCallback != null) {
158
failCallback("unauthorized");
159
} else {
@@ -166,7 +166,7 @@ if (typeof window !== "undefined") {
166
}
167
168
//判断是否过期,expireTime为字符串,例如"2025-03-04"
169
- if (user?.expireTime && new Date(user.expireTime).getTime() < Date.now()) {
+ if (userConfig?.expireTime && new Date(userConfig.expireTime).getTime() < Date.now()) {
170
171
failCallback("expired");
172
0 commit comments