feat: 更新版本至 0.0.60,优化登录缓存逻辑,添加 token 过期检查示例
This commit is contained in:
@@ -360,6 +360,7 @@ export class QueryLogin<T extends Cache = Cache> extends BaseQuery {
|
||||
}
|
||||
const isExpired = await this.cacheStore.getIsExpired();
|
||||
if (isExpired) {
|
||||
console.log('token过期,正在刷新token', this.cacheStore.cacheData);
|
||||
const res = await this.refreshLoginUser()
|
||||
if (res.code === 200) {
|
||||
// 刷新成功,返回新的token
|
||||
|
||||
Reference in New Issue
Block a user