feat: 更新版本至 0.0.60,优化登录缓存逻辑,添加 token 过期检查示例

This commit is contained in:
2026-02-24 18:14:42 +08:00
parent df3e5a43fa
commit b32e622707
4 changed files with 56 additions and 46 deletions

View File

@@ -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