zhengyiming
2025-07-29 089f6058826ac067061b6ed4958baff50f9bdac9
src/router/index.ts
@@ -3,6 +3,7 @@
import Layout from '@/layout/MainLayout/Layout.vue';
import ErrorLayout from '@/layout/ErrorLayout/ErrorLayout.vue';
import { AppType } from '@/constants';
import { loadEnv } from '@build/index';
// import { ElIcons } from '@/typings'
@@ -83,7 +84,7 @@
    },
    children: [
      {
        path: 'home',
        path: '/home',
        name: 'Home',
        hidden: false,
        component: () => import('@/views/Home/Home.vue'),
@@ -92,6 +93,17 @@
          title: '保单管理',
          affix: true,
          // rootMenu: true,
          icon: 'home',
        },
      },
      AppType === 'tp' && {
        path: '/InsurancePayManage',
        name: 'InsurancePayManage',
        hidden: false,
        component: () => import('@/views/Home/InsurancePayManage.vue'),
        meta: {
          rank: 1002,
          title: '付款管理',
          icon: 'home',
        },
      },
@@ -108,6 +120,42 @@
        },
      },
      {
        path: '/InsurancePolicyStampFiles/:id',
        name: 'InsurancePolicyStampFiles',
        hidden: true,
        component: () => import('@/views/Home/InsurancePolicyStampFiles.vue'),
        meta: {
          rank: 10003,
          title: '保单下载',
          // rootMenu: true,
          icon: 'home',
        },
      },
      {
        path: '/InsureDownloadInvoice/:id',
        name: 'InsureDownloadInvoice',
        hidden: true,
        component: () => import('@/views/Home/InsureDownloadInvoice.vue'),
        meta: {
          rank: 10004,
          title: '发票下载',
          // rootMenu: true,
          icon: 'home',
        },
      },
      {
        path: '/InsurePayDetail/:id',
        name: 'InsurePayDetail',
        hidden: true,
        component: () => import('@/views/Home/InsurePayDetail.vue'),
        meta: {
          rank: 10005,
          title: '支付详情',
          // rootMenu: true,
          icon: 'home',
        },
      },
      {
        path: '/BatchChange/:id',
        name: 'BatchChange',
        hidden: true,
@@ -119,7 +167,7 @@
          icon: 'home',
        },
      },
    ],
    ].filter(Boolean),
  },
  {
@@ -295,9 +343,11 @@
  },
];
const { VITE_PUBLIC_PATH } = loadEnv();
const createRouterFactory = () =>
  createRouter({
    history: createWebHistory(), // hash模式:createWebHashHistory,history模式:createWebHistory
    history: createWebHistory(VITE_PUBLIC_PATH), // hash模式:createWebHashHistory,history模式:createWebHistory
    scrollBehavior(to, from, savedPosition) {
      return new Promise((resolve) => {
        if (savedPosition) {