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") {
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 {
You can’t perform that action at this time.
0 commit comments