|
@@ -454,6 +454,12 @@ export const constantRoutes = [{
|
|
|
},
|
|
|
|
|
|
{ path: '*', redirect: '/404', hidden: true, name: '*' },
|
|
|
+{
|
|
|
+ path: '/notFound',
|
|
|
+ name: 'notFound',
|
|
|
+ component: () => import('@/views/errorPages/notFound.vue'),
|
|
|
+ hidden: true
|
|
|
+},
|
|
|
...newRouter
|
|
|
]
|
|
|
|
|
@@ -465,6 +471,10 @@ const createRouter = () => new Router({
|
|
|
|
|
|
const router = createRouter()
|
|
|
router.beforeEach((to, from, next) => {
|
|
|
+ console.log(to, from)
|
|
|
+ if (to.name === '404' && from.path.search(/projectManage|business|workbench/)) {
|
|
|
+ next({ name: 'notFound' })
|
|
|
+ }
|
|
|
if (to.name !== '接口管理') {
|
|
|
next()
|
|
|
} else {
|