|
@@ -4,8 +4,6 @@ import findLast from "lodash/findLast";
|
|
|
import { notification } from "ant-design-vue";
|
|
|
import NProgress from "nprogress";
|
|
|
import "nprogress/nprogress.css";
|
|
|
-import NotFound from "./views/404";
|
|
|
-import Forbidden from "./views/403";
|
|
|
import { check, isLogin } from "./utils/auth";
|
|
|
|
|
|
Vue.use(Router);
|
|
@@ -111,20 +109,39 @@ const router = new Router({
|
|
|
]
|
|
|
}
|
|
|
]
|
|
|
+ },
|
|
|
+ // Exception
|
|
|
+ {
|
|
|
+ path: "/exception",
|
|
|
+ name: "exception",
|
|
|
+ component: { render: h => h("router-view") },
|
|
|
+ redirect: "/exception/403",
|
|
|
+ meta: { title: "异常页", icon: "warning", authority: ["admin"] },
|
|
|
+ children: [
|
|
|
+ {
|
|
|
+ path: "/exception/403",
|
|
|
+ name: "403",
|
|
|
+ component: () =>
|
|
|
+ import(/* webpackChunkName: "exception" */ "@/views/Exception/403"),
|
|
|
+ meta: { title: "403" }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ path: "/exception/404",
|
|
|
+ name: "404",
|
|
|
+ component: () =>
|
|
|
+ import(/* webpackChunkName: "exception" */ "@/views/Exception/404"),
|
|
|
+ meta: { title: "404" }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ path: "/exception/500",
|
|
|
+ name: "500",
|
|
|
+ component: () =>
|
|
|
+ import(/* webpackChunkName: "exception" */ "@/views/Exception/500"),
|
|
|
+ meta: { title: "500" }
|
|
|
+ }
|
|
|
+ ]
|
|
|
}
|
|
|
]
|
|
|
- },
|
|
|
- {
|
|
|
- path: "/403",
|
|
|
- name: "403",
|
|
|
- hideInMenu: true,
|
|
|
- component: Forbidden
|
|
|
- },
|
|
|
- {
|
|
|
- path: "*",
|
|
|
- name: "404",
|
|
|
- hideInMenu: true,
|
|
|
- component: NotFound
|
|
|
}
|
|
|
]
|
|
|
});
|