|
@@ -7,12 +7,16 @@ 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";
|
|
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";
|
|
18
|
+
|
14
|
19
|
|
15
|
|
-import FirstPage from '@/pages/firstPage/index';
|
16
|
20
|
import QLogin from '@/pages/qLogin/index';
|
17
|
21
|
import QRegister from '@/pages/qRegister/index';
|
18
|
22
|
|
|
@@ -32,39 +36,73 @@ import QRegister from '@/pages/qRegister/index';
|
32
|
36
|
export const authRoutes = [
|
33
|
37
|
{
|
34
|
38
|
// index: true,
|
35
|
|
- element: <Navigate to="/fxuser" />,
|
|
39
|
+ element: <Navigate to="/homepage" />,
|
36
|
40
|
},
|
37
|
41
|
|
38
|
42
|
{
|
39
|
|
- path: "fxuser",
|
40
|
|
- element: <FxUser />,
|
|
43
|
+ path: "homepage",
|
|
44
|
+ element: <HomePage />,
|
|
45
|
+ meta: {
|
|
46
|
+ title: "首页",
|
|
47
|
+ icon: <SolutionOutlined />,
|
|
48
|
+ },
|
|
49
|
+ },
|
|
50
|
+ {
|
|
51
|
+ path: "/globalaccounts",
|
|
52
|
+ element: <Outlet />,
|
41
|
53
|
meta: {
|
42
|
|
- title: "用户管理",
|
|
54
|
+ title: "全球账户",
|
43
|
55
|
icon: <SolutionOutlined />,
|
44
|
56
|
},
|
|
57
|
+ children: [
|
|
58
|
+ {
|
|
59
|
+ path: `accountmanagement`,
|
|
60
|
+ element: <AccountManagement />,
|
|
61
|
+ meta: {
|
|
62
|
+ title: "账户管理",
|
|
63
|
+ icon: <SolutionOutlined />,
|
|
64
|
+ },
|
|
65
|
+ },
|
|
66
|
+ ],
|
45
|
67
|
},
|
46
|
68
|
{
|
47
|
|
- path: "fxuser/edit",
|
48
|
|
- element: <FxUserEdit />,
|
|
69
|
+ path: "quickpass",
|
|
70
|
+ element: <QuickPass />,
|
49
|
71
|
meta: {
|
50
|
|
- title: "用户维护",
|
51
|
|
- hideInMenu: true,
|
|
72
|
+ title: "闪付",
|
|
73
|
+ icon: <SolutionOutlined />,
|
52
|
74
|
},
|
53
|
75
|
},
|
54
|
76
|
{
|
55
|
|
- path: "tenant",
|
56
|
|
- element: <Tenant />,
|
|
77
|
+ path: "financialstatement",
|
|
78
|
+ element: <FinancialStatement />,
|
57
|
79
|
meta: {
|
58
|
|
- title: "租户管理",
|
59
|
|
- icon: <UserOutlined />,
|
|
80
|
+ title: "财务对账单",
|
|
81
|
+ icon: <SolutionOutlined />,
|
60
|
82
|
},
|
61
|
83
|
},
|
62
|
84
|
{
|
63
|
|
- path: "tenant/edit",
|
64
|
|
- element: <TenantEdit />,
|
|
85
|
+ path: "incorporation",
|
|
86
|
+ element: <Incorporation />,
|
65
|
87
|
meta: {
|
66
|
|
- title: "租户维护",
|
67
|
|
- hideInMenu: true,
|
|
88
|
+ title: "公司注册",
|
|
89
|
+ icon: <SolutionOutlined />,
|
|
90
|
+ },
|
|
91
|
+ },
|
|
92
|
+ {
|
|
93
|
+ path: "ecologicalpartner",
|
|
94
|
+ element: <EcologicalPartner />,
|
|
95
|
+ meta: {
|
|
96
|
+ title: "生态伙伴",
|
|
97
|
+ icon: <SolutionOutlined />,
|
|
98
|
+ },
|
|
99
|
+ },
|
|
100
|
+ {
|
|
101
|
+ path: "accountsettings",
|
|
102
|
+ element: <AccountSettings />,
|
|
103
|
+ meta: {
|
|
104
|
+ title: "账号设置",
|
|
105
|
+ icon: <SolutionOutlined />,
|
68
|
106
|
},
|
69
|
107
|
},
|
70
|
108
|
];
|
|
@@ -104,7 +142,7 @@ export const defaultRoutes = [
|
104
|
142
|
},
|
105
|
143
|
];
|
106
|
144
|
|
107
|
|
-export function mergeAuthRoutes (r1, r2) {
|
|
145
|
+export function mergeAuthRoutes(r1, r2) {
|
108
|
146
|
const r = r1.slice();
|
109
|
147
|
const children = r1[0].children.slice();
|
110
|
148
|
r[0].children = children.concat(r2);
|
|
@@ -113,8 +151,8 @@ export function mergeAuthRoutes (r1, r2) {
|
113
|
151
|
|
114
|
152
|
// 全部路由
|
115
|
153
|
export const routes = mergeAuthRoutes(defaultRoutes, authRoutes);
|
116
|
|
-console.log(routes)
|
117
|
|
-function getPath (parent = "/", current = "") {
|
|
154
|
+console.log(routes);
|
|
155
|
+function getPath(parent = "/", current = "") {
|
118
|
156
|
if (current.indexOf("/") === 0 || current.indexOf("http") === 0)
|
119
|
157
|
return current;
|
120
|
158
|
return `${parent}/${current}`.replace(/\/\//g, "/");
|