|
@@ -7,12 +7,14 @@ import { Outlet, Navigate } from "react-router-dom";
|
7
|
7
|
import AuthLayout from "@/layouts/AuthLayout";
|
8
|
8
|
import Login from "@/pages/login";
|
9
|
9
|
import Page404 from "@/pages/404";
|
10
|
|
-import FxUser from "@/pages/fxuser";
|
11
|
|
-import FxUserEdit from "@/pages/fxuser/Edit";
|
12
|
|
-import Tenant from "@/pages/tenant";
|
13
|
|
-import TenantEdit from "@/pages/tenant/Edit";
|
14
|
|
-
|
15
|
|
-import FirstPage from '@/pages/firstPage/index'
|
|
10
|
+import HomePage from "@/pages/homepage";
|
|
11
|
+import AccountManagement from "@/pages/accountmanagement";
|
|
12
|
+import QuickPass from "@/pages/quickpass";
|
|
13
|
+import FinancialStatement from "@/pages/financialstatement";
|
|
14
|
+import Incorporation from "@/pages/incorporation";
|
|
15
|
+import EcologicalPartner from "@/pages/ecologicalpartner";
|
|
16
|
+import AccountSettings from "@/pages/accountsettings";
|
|
17
|
+import FirstPage from "@/pages/firstPage/index";
|
16
|
18
|
|
17
|
19
|
/**
|
18
|
20
|
* meta 用来扩展自定义数据数据
|
|
@@ -30,39 +32,73 @@ import FirstPage from '@/pages/firstPage/index'
|
30
|
32
|
export const authRoutes = [
|
31
|
33
|
{
|
32
|
34
|
// index: true,
|
33
|
|
- element: <Navigate to="/fxuser" />,
|
|
35
|
+ element: <Navigate to="/homepage" />,
|
34
|
36
|
},
|
35
|
37
|
|
36
|
38
|
{
|
37
|
|
- path: "fxuser",
|
38
|
|
- element: <FxUser />,
|
|
39
|
+ path: "homepage",
|
|
40
|
+ element: <HomePage />,
|
|
41
|
+ meta: {
|
|
42
|
+ title: "首页",
|
|
43
|
+ icon: <SolutionOutlined />,
|
|
44
|
+ },
|
|
45
|
+ },
|
|
46
|
+ {
|
|
47
|
+ path: "/globalaccounts",
|
|
48
|
+ element: <Outlet />,
|
39
|
49
|
meta: {
|
40
|
|
- title: "用户管理",
|
|
50
|
+ title: "全球账户",
|
41
|
51
|
icon: <SolutionOutlined />,
|
42
|
52
|
},
|
|
53
|
+ children: [
|
|
54
|
+ {
|
|
55
|
+ path: `accountmanagement`,
|
|
56
|
+ element: <AccountManagement />,
|
|
57
|
+ meta: {
|
|
58
|
+ title: "账户管理",
|
|
59
|
+ icon: <SolutionOutlined />,
|
|
60
|
+ },
|
|
61
|
+ },
|
|
62
|
+ ],
|
43
|
63
|
},
|
44
|
64
|
{
|
45
|
|
- path: "fxuser/edit",
|
46
|
|
- element: <FxUserEdit />,
|
|
65
|
+ path: "quickpass",
|
|
66
|
+ element: <QuickPass />,
|
47
|
67
|
meta: {
|
48
|
|
- title: "用户维护",
|
49
|
|
- hideInMenu: true,
|
|
68
|
+ title: "闪付",
|
|
69
|
+ icon: <SolutionOutlined />,
|
50
|
70
|
},
|
51
|
71
|
},
|
52
|
72
|
{
|
53
|
|
- path: "tenant",
|
54
|
|
- element: <Tenant />,
|
|
73
|
+ path: "financialstatement",
|
|
74
|
+ element: <FinancialStatement />,
|
55
|
75
|
meta: {
|
56
|
|
- title: "租户管理",
|
57
|
|
- icon: <UserOutlined />,
|
|
76
|
+ title: "财务对账单",
|
|
77
|
+ icon: <SolutionOutlined />,
|
58
|
78
|
},
|
59
|
79
|
},
|
60
|
80
|
{
|
61
|
|
- path: "tenant/edit",
|
62
|
|
- element: <TenantEdit />,
|
|
81
|
+ path: "incorporation",
|
|
82
|
+ element: <Incorporation />,
|
63
|
83
|
meta: {
|
64
|
|
- title: "租户维护",
|
65
|
|
- hideInMenu: true,
|
|
84
|
+ title: "公司注册",
|
|
85
|
+ icon: <SolutionOutlined />,
|
|
86
|
+ },
|
|
87
|
+ },
|
|
88
|
+ {
|
|
89
|
+ path: "ecologicalpartner",
|
|
90
|
+ element: <EcologicalPartner />,
|
|
91
|
+ meta: {
|
|
92
|
+ title: "生态伙伴",
|
|
93
|
+ icon: <SolutionOutlined />,
|
|
94
|
+ },
|
|
95
|
+ },
|
|
96
|
+ {
|
|
97
|
+ path: "accountsettings",
|
|
98
|
+ element: <AccountSettings />,
|
|
99
|
+ meta: {
|
|
100
|
+ title: "账号设置",
|
|
101
|
+ icon: <SolutionOutlined />,
|
66
|
102
|
},
|
67
|
103
|
},
|
68
|
104
|
];
|
|
@@ -80,7 +116,7 @@ export const defaultRoutes = [
|
80
|
116
|
},
|
81
|
117
|
{
|
82
|
118
|
path: "/firstPage",
|
83
|
|
- element:<FirstPage/>,
|
|
119
|
+ element: <FirstPage />,
|
84
|
120
|
},
|
85
|
121
|
{
|
86
|
122
|
path: "/login",
|
|
@@ -92,7 +128,7 @@ export const defaultRoutes = [
|
92
|
128
|
},
|
93
|
129
|
];
|
94
|
130
|
|
95
|
|
-export function mergeAuthRoutes (r1, r2) {
|
|
131
|
+export function mergeAuthRoutes(r1, r2) {
|
96
|
132
|
const r = r1.slice();
|
97
|
133
|
const children = r1[0].children.slice();
|
98
|
134
|
r[0].children = children.concat(r2);
|
|
@@ -101,8 +137,8 @@ export function mergeAuthRoutes (r1, r2) {
|
101
|
137
|
|
102
|
138
|
// 全部路由
|
103
|
139
|
export const routes = mergeAuthRoutes(defaultRoutes, authRoutes);
|
104
|
|
-console.log(routes)
|
105
|
|
-function getPath (parent = "/", current = "") {
|
|
140
|
+console.log(routes);
|
|
141
|
+function getPath(parent = "/", current = "") {
|
106
|
142
|
if (current.indexOf("/") === 0 || current.indexOf("http") === 0)
|
107
|
143
|
return current;
|
108
|
144
|
return `${parent}/${current}`.replace(/\/\//g, "/");
|