时间戳路由
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
|
const whiteList = [`${roterPre}/login`, "/auth-redirect"]; // no redirect whitelist
|
||||||
|
|
||||||
router.beforeEach(async (to, from, next) => {
|
router.beforeEach(async (to, from, next) => {
|
||||||
|
|
||||||
// start progress bar
|
// start progress bar
|
||||||
NProgress.start();
|
NProgress.start();
|
||||||
// set page title
|
// set page title
|
||||||
|
@ -43,7 +44,11 @@ router.beforeEach(async (to, from, next) => {
|
||||||
NProgress.done();
|
NProgress.done();
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
next();
|
if (!to.query.t) {
|
||||||
|
next({ ...to, query: { ...to.query, t: Date.now() } })
|
||||||
|
} else {
|
||||||
|
next()
|
||||||
|
}
|
||||||
NProgress.done();
|
NProgress.done();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue