router.beforeEach((to, from, next) => { if (to.meta.title) { document.title = to.meta.title } /** * 添加版本号 **/ if (document.URL.indexOf('?t=') < 0) { let timestamp = (new Date()).valueOf() window.location.href = '?t=' + timestamp + '#' + to.fullPath } if (to.meta.requireAuth) { if (getStore('personal') && getStore("loginFlag") == 1) { next(); } else { next({ path: '/login', query: {redirect: to.fullPath} }) } } else { next(); } });
vue 添加版本号
最新推荐文章于 2025-07-01 20:57:35 发布