|
@@ -124,15 +124,15 @@ const router = createRouter({
|
|
|
//修改动态网页标题 beforeEach 导航钩子,路由改变前触发
|
|
|
router.beforeEach((to,from,next) =>{
|
|
|
//window.document.title = to.meta.title;
|
|
|
- const urlParams = new URLSearchParams(window.location.search);
|
|
|
- const aids = urlParams.get('aid');
|
|
|
+ // const urlParams = new URLSearchParams(to.fullPath);
|
|
|
+ // const aids = urlParams.get('aid');
|
|
|
|
|
|
let token = getToken2();
|
|
|
console.log('守卫中Token:', token);
|
|
|
- if(aids){
|
|
|
+ if(to.fullPath.indexOf("aid")>0){
|
|
|
setToken('e47b87eec69545559d1e81e56626da68');
|
|
|
setUserId('5f06c8bc77234f969d13e160b54c27e3');
|
|
|
- console.log('守卫中aids:', aids);
|
|
|
+ console.log('守卫中aids:', to.fullPath);
|
|
|
window.document.title = to.name;
|
|
|
next();
|
|
|
}else if (!token && to.name !== 'login') {
|