时间戳路由
This commit is contained in:
parent
c9e5ea02fb
commit
468aabdfe6
|
@ -13,6 +13,7 @@ NProgress.configure({ showSpinner: false }); // NProgress Configuration
|
|||
const whiteList = [`${roterPre}/login`, "/auth-redirect"]; // no redirect whitelist
|
||||
|
||||
router.beforeEach(async (to, from, next) => {
|
||||
|
||||
// start progress bar
|
||||
NProgress.start();
|
||||
// set page title
|
||||
|
@ -43,7 +44,11 @@ router.beforeEach(async (to, from, next) => {
|
|||
NProgress.done();
|
||||
});
|
||||
} else {
|
||||
next();
|
||||
if (!to.query.t) {
|
||||
next({ ...to, query: { ...to.query, t: Date.now() } })
|
||||
} else {
|
||||
next()
|
||||
}
|
||||
NProgress.done();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue