master
2022-03-22 e3f069b4fbb1ddcbc9f1c0832634200555789268
src/router/index.ts
@@ -1,45 +1,46 @@
import {
   createRouter,
   createWebHashHistory,
   createWebHistory,
   Router,
   RouteRecordRaw
  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;
   };
  $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("/@/views/home/index.vue")
         }
      ]
   },
   {
      path: "/:catchAll(.*)",
      name: "404",
      redirect: "/404"
   }
  {
    path: "/",
    name: "index",
    component: () => import(`/@/pages/layout/index.vue`),
    children: [
      {
        path: "/",
        name: "数据统计",
        component: () => import("/@/views/home/index.vue")
      }
    ]
  },
  {
    path: "/:catchAll(.*)",
    name: "404",
    redirect: "/404"
  }
];
const router = createRouter({
   history: routerMode == "history" ? createWebHistory() : createWebHashHistory(),
   routes
  history: routerMode == "history" ? createWebHistory() : createWebHashHistory(),
  routes
}) as CoolRouter;
export default router;
export const ignore: any = {
   token: ["/login", "/403", "/404", "/500", "/502"]
  token: ["/login", "/403", "/404", "/500", "/502"]
};