fix(登录页): 登录页频繁刷新顶部进度条未结束问题修复

This commit is contained in:
baiqi 2024-07-11 11:42:29 +08:00 committed by 刘瑞斌
parent a37b8f1b94
commit b9303de3bd
1 changed files with 3 additions and 0 deletions

View File

@ -1,3 +1,4 @@
import { sleep } from '@/utils';
import { clearToken, hasToken, isLoginExpires } from '@/utils/auth';
import NProgress from 'nprogress'; // progress bar
@ -25,6 +26,8 @@ export default function setupUserLoginInfoGuard(router: Router) {
...to.query,
} as LocationQueryRaw,
});
await sleep(0);
NProgress.done();
}
});
}