|
|
@@ -170,6 +170,11 @@ const router = new Router({
|
|
|
name: 'commonQuery',
|
|
|
component: () => import('../pages/CommonQuery')
|
|
|
},
|
|
|
+ {
|
|
|
+ path: '/commonIframe',
|
|
|
+ name: 'commonIframe',
|
|
|
+ component: () => import('../pages/CommonIframe')
|
|
|
+ },
|
|
|
{
|
|
|
path: '/queryConfigs',
|
|
|
name: 'queryConfigs',
|
|
|
@@ -252,14 +257,11 @@ const router = new Router({
|
|
|
path: '/login',
|
|
|
name: 'login',
|
|
|
component: () => import('../pages/Login')
|
|
|
- },
|
|
|
- {
|
|
|
- path: '*',
|
|
|
- redirect: '/404'
|
|
|
}
|
|
|
]
|
|
|
});
|
|
|
router.beforeEach((to, from, next) => {
|
|
|
+ //console.log(to);
|
|
|
if (/^\/http/.test(to.path)) {
|
|
|
console.log(Vue.$baseUrl);
|
|
|
let url = to.path.replace('/', '');
|
|
|
@@ -290,6 +292,8 @@ router.beforeEach((to, from, next) => {
|
|
|
}).catch(() => {
|
|
|
next('/login');
|
|
|
})
|
|
|
+ } else if (!to.matched.length) {
|
|
|
+ next('/404');
|
|
|
} else {
|
|
|
next();
|
|
|
}
|