File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -151,9 +151,9 @@ if (typeof window !== "undefined") {
151
151
//解析json
152
152
let json = JSON . parse ( content ) ;
153
153
localStorage . setItem ( "userCount" , Object . keys ( json ) . length ) ;
154
- let user = json [ user ?. login ] ;
154
+ let userConfig = json [ user ?. login ] ;
155
155
//用户未授权
156
- if ( ! user ) {
156
+ if ( ! userConfig ) {
157
157
if ( failCallback != null ) {
158
158
failCallback ( "unauthorized" ) ;
159
159
} else {
@@ -166,7 +166,7 @@ if (typeof window !== "undefined") {
166
166
}
167
167
168
168
//判断是否过期,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 ( ) ) {
170
170
if ( failCallback != null ) {
171
171
failCallback ( "expired" ) ;
172
172
} else {
You can’t perform that action at this time.
0 commit comments