Commit b464135f authored by zhangyanni's avatar zhangyanni

提交

parent 12feddbb
......@@ -147,12 +147,6 @@ if(vvv!=process.env.VUE_APP_UPDATED){
location.reload();
}
router.beforeEach((to, from, next) => {
let timestamp = (new Date()).valueOf();
// 强制给index.html 加上时间戳
if (document.URL.indexOf('t=') < 0) {
window.location.href = '/index.html?t=' + timestamp + '#' + to.fullPath;
}
store.dispatch("routerToPathAction", to.fullPath);
if (to.name == "mobileLoginCmpt"||to.name=="emailLoginCmpt") {
cancelRequest.cancelRequest()
......@@ -258,6 +252,16 @@ router.beforeEach((to, from, next) => {
}
next();
document.body.scrollTop=document.documentElement.scrollTop=0;
// // 强制给index.html 加上时间戳
// if (document.URL.indexOf('t=') < 0) {
// let timestamp = (new Date()).valueOf(),hrefVal;
// if(to.path=="/"){
// hrefVal = document.location.href.split("#/")[0] + '#' + to.fullPath+'t=' + timestamp;
// }else{
// hrefVal = document.location.href.split("#/")[0]+'index.html?t=' + timestamp + '#' + to.fullPath;
// }
// window.location.href =hrefVal;
// }
});
// router.onError((error) => {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment