From 65fdfc6dd82f0bcf6c6826fe1ab645b309f6045c Mon Sep 17 00:00:00 2001
From: zhengyiming <540361168@qq.com>
Date: 星期四, 23 十月 2025 19:37:06 +0800
Subject: [PATCH] fix: bug
---
src/router/index.ts | 115 +++++++++++++++++++++++++++++++++++++++++++++++++++++++--
1 files changed, 111 insertions(+), 4 deletions(-)
diff --git a/src/router/index.ts b/src/router/index.ts
index 0e33721..81b193c 100644
--- a/src/router/index.ts
+++ b/src/router/index.ts
@@ -2,6 +2,8 @@
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'
@@ -53,6 +55,7 @@
children?: Route[];
};
+//@ts-ignore
export const constantRoutes: Route[] = [
{
path: '/redirect',
@@ -81,7 +84,7 @@
},
children: [
{
- path: 'home',
+ path: '/home',
name: 'Home',
hidden: false,
component: () => import('@/views/Home/Home.vue'),
@@ -90,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',
},
},
@@ -106,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,
@@ -117,7 +167,7 @@
icon: 'home',
},
},
- ],
+ ].filter(Boolean),
},
{
@@ -176,6 +226,61 @@
],
},
{
+ path: '/BalanceManage',
+ redirect: 'noRedirect',
+ component: Layout,
+ hidden: false,
+ alwaysShow: true,
+ meta: {
+ rank: 10010,
+ title: '浣欓绠$悊',
+ rootMenu: true,
+ icon: 'home',
+ },
+ children: [
+ {
+ path: '/BalanceManage',
+ name: 'BalanceManage',
+ hidden: false,
+ alwaysShow: true,
+ component: () => import('@/views/BalanceManage/BalanceManage.vue'),
+ meta: {
+ rank: 10011,
+ title: '浣欓绠$悊',
+ // rootMenu: true,
+ icon: 'home',
+ },
+ },
+ ],
+ },
+ // {
+ // path: '/FileManage',
+ // redirect: 'noRedirect',
+ // component: Layout,
+ // hidden: false,
+ // alwaysShow: true,
+ // meta: {
+ // rank: 10020,
+ // title: '鏂囦欢绠$悊',
+ // rootMenu: true,
+ // icon: 'home',
+ // },
+ // children: [
+ // {
+ // path: '/FileManage',
+ // name: 'FileManage',
+ // hidden: false,
+ // alwaysShow: true,
+ // component: () => import('@/views/FileManage/FileManage.vue'),
+ // meta: {
+ // rank: 10021,
+ // title: '鏂囦欢绠$悊',
+ // icon: 'home',
+ // },
+ // },
+ // ],
+ // },
+ {
path: '/Login',
name: 'Login',
hidden: true,
@@ -213,7 +318,7 @@
},
],
},
-];
+].filter(Boolean);
export const asyncRoutes: Route[] = [
{
@@ -238,9 +343,11 @@
},
];
+const { VITE_PUBLIC_PATH } = loadEnv();
+
const createRouterFactory = () =>
createRouter({
- history: createWebHistory(), // hash妯″紡锛歝reateWebHashHistory锛宧istory妯″紡锛歝reateWebHistory
+ history: createWebHistory(VITE_PUBLIC_PATH), // hash妯″紡锛歝reateWebHashHistory锛宧istory妯″紡锛歝reateWebHistory
scrollBehavior(to, from, savedPosition) {
return new Promise((resolve) => {
if (savedPosition) {
--
Gitblit v1.9.1