|
|
@@ -60,7 +60,7 @@ const router = new Router({
|
|
|
title: '城市隐患上报'
|
|
|
},
|
|
|
component: () => import('@/pages/cityDangerReport/add.vue')
|
|
|
- },
|
|
|
+ }
|
|
|
|
|
|
// {
|
|
|
// path: '/venueRoom',
|
|
|
@@ -74,19 +74,19 @@ const router = new Router({
|
|
|
})
|
|
|
|
|
|
// 无路由守卫
|
|
|
-// router.beforeEach((to, from, next) => {
|
|
|
+router.beforeEach((to, from, next) => {
|
|
|
// if (to.path == "/") {
|
|
|
// alert("点击确认浏览测试页面");
|
|
|
// next("/login");
|
|
|
// } else {
|
|
|
-// next();
|
|
|
+ next();
|
|
|
// } // 修改显示标题
|
|
|
-// document.title = to.matched[0].meta.title;
|
|
|
-
|
|
|
-// });
|
|
|
+ console.log(to)
|
|
|
+ document.title = to.matched[0].meta.title
|
|
|
+})
|
|
|
|
|
|
// 路由守卫 拦截
|
|
|
-const whiteList = ['citySafeNoticDetail','citySafeNoticBefore','cityDangerReportBefore','vistiorRegistration', 'login', 'register', 'QRcode', 'todo', 'webView', 'registerbycpyinfo', 'cityDangerReport', `addcityDangerReport`,'citySafeNotic'] // 路由守卫白名单
|
|
|
+const whiteList = ['citySafeNoticDetail', 'citySafeNoticBefore', 'cityDangerReportBefore', 'vistiorRegistration', 'login', 'register', 'QRcode', 'todo', 'webView', 'registerbycpyinfo', 'cityDangerReport', `addcityDangerReport`, 'citySafeNotic'] // 路由守卫白名单
|
|
|
|
|
|
// router.beforeEach((to, from, next) => {
|
|
|
// /* 路由发生变化修改页面title */
|