zhaoxing
2022-08-22 74bb50ce93d0c9cd20a0b84f63db46f433a39e91
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
import {
  createRouter,
  createWebHashHistory,
  createWebHistory,
  Router,
  RouteRecordRaw
} from "vue-router";
import { routerMode } from "/@/config/env";
 
declare interface CoolRouter extends Router {
  $plugin?: {
    addViews(list: any[], options?: any): void;
  };
}
 
const routes: Array<RouteRecordRaw> = [
  {
    path: "/",
    name: "index",
    component: () => import(`/@/pages/layout/index.vue`),
    children: [
      {
        path: "/",
        name: "华能电厂",
        component: () => import("/@/cool/modules/base/views/hn_model.vue")
      }
    ]
  },
 
  {
    path: "/:catchAll(.*)",
    name: "404",
    redirect: "/404"
  }
];
 
const router = createRouter({
  history: routerMode == "history" ? createWebHistory() : createWebHashHistory(),
  routes
}) as CoolRouter;
 
export default router;
 
export const ignore: any = {
  token: ["/login", "/403", "/404", "/500", "/502"]
};