张涛 1 anno fa
parent
commit
6d9cd9c0e7

+ 33
- 0
src/components/Massage/index.jsx Vedi File

1
+import { ModalForm } from "@ant-design/pro-components";
2
+import { Button, Modal } from "antd";
3
+import React from "react";
4
+export default (props) => {
5
+  const { title = "提示", open, setOpen } = props;
6
+
7
+  const onChang = () => {
8
+    setOpen(false);
9
+  };
10
+  return (
11
+    <Modal
12
+      title={title}
13
+      open={open}
14
+      onCancel={onChang}
15
+      footer={[
16
+        <Button key="back" onClick={onChang}>
17
+          取消
18
+        </Button>,
19
+        <Button key="back">去申请</Button>,
20
+      ]}
21
+    >
22
+      <div style={{}}>
23
+        <img
24
+          height="98"
25
+          src="https://qbitnetwork.com/app/img/warn.03eb384a.png"
26
+          alt=""
27
+          style={{ margin: "0 auto" ,display:"block"}}
28
+        />
29
+        <div style={{textAlign:"center"}}>暂未开通全球账户功能</div>
30
+      </div>
31
+    </Modal>
32
+  );
33
+};

+ 14
- 0
src/pages/accountmanagement/index.jsx Vedi File

1
+import React from "react";
2
+export default (props) => {
3
+  return <div>11111111</div>;
4
+};
5
+                                               
6
+
7
+
8
+
9
+
10
+
11
+
12
+
13
+
14
+              

+ 6
- 0
src/pages/accountsettings/index.jsx Vedi File

1
+import React from 'react'
2
+export default (props) => {
3
+return (
4
+<div></div>
5
+)
6
+}

+ 6
- 0
src/pages/ecologicalpartner/index.jsx Vedi File

1
+import React from 'react'
2
+export default (props) => {
3
+return (
4
+<div></div>
5
+)
6
+}

+ 6
- 0
src/pages/financialstatement/index.jsx Vedi File

1
+import React from 'react'
2
+export default (props) => {
3
+return (
4
+<div></div>
5
+)
6
+}

+ 11
- 2
src/pages/firstPage/index.less Vedi File

658
             text-align: center;
658
             text-align: center;
659
             line-height: 20px;
659
             line-height: 20px;
660
             font-size: 14px;
660
             font-size: 14px;
661
-            a{
661
+
662
+            a {
662
                 color: #aeb4b8;
663
                 color: #aeb4b8;
663
             }
664
             }
664
         }
665
         }
679
 
680
 
680
 @keyframes fadeOut {
681
 @keyframes fadeOut {
681
     from {
682
     from {
682
-        opacity: 0;
683
+        opacity: 0.1;
684
+    }
685
+
686
+    50% {
687
+        opacity: 0.5;
688
+    }
689
+
690
+    80% {
691
+        opacity: 0.8;
683
     }
692
     }
684
 
693
 
685
     to {
694
     to {

src/pages/fxuser/Edit.jsx → src/pages/homepage/Edit.jsx Vedi File


src/pages/fxuser/index.jsx → src/pages/homepage/index.jsx Vedi File

1
 import List from "@/components/Page/List";
1
 import List from "@/components/Page/List";
2
-import React from "react";
2
+import React, { useState } from "react";
3
 
3
 
4
 import { getFxUser, deleteFxUserAndLogin } from "@/services/fxuser";
4
 import { getFxUser, deleteFxUserAndLogin } from "@/services/fxuser";
5
 
5
 
6
 import { useNavigate } from "react-router-dom";
6
 import { useNavigate } from "react-router-dom";
7
 import { Button } from "antd";
7
 import { Button } from "antd";
8
 import moment from "moment";
8
 import moment from "moment";
9
+import Massage from "@/components/Massage";
9
 export default (props) => {
10
 export default (props) => {
10
   const navigate = useNavigate();
11
   const navigate = useNavigate();
11
   const actionRef = React.useRef();
12
   const actionRef = React.useRef();
21
       dataIndex: "phone",
22
       dataIndex: "phone",
22
       key: "phone",
23
       key: "phone",
23
     },
24
     },
24
-   
25
+
25
     {
26
     {
26
       title: "创建时间",
27
       title: "创建时间",
27
       dataIndex: "createdAt",
28
       dataIndex: "createdAt",
29
       search: false,
30
       search: false,
30
       render: (t) => moment(t).format("YYYY-MM-DD HH:mm:ss"),
31
       render: (t) => moment(t).format("YYYY-MM-DD HH:mm:ss"),
31
     },
32
     },
32
-   
33
   ];
33
   ];
34
 
34
 
35
   const DeleteFxUser = (record) => {
35
   const DeleteFxUser = (record) => {
37
       actionRef.current.reload();
37
       actionRef.current.reload();
38
     });
38
     });
39
   };
39
   };
40
+  const [open, setOpen] = useState(false);
40
   return (
41
   return (
41
-    <List
42
-      rowKey="userId"
43
-      actionRef={actionRef}
44
-      request={()=>{}}
45
-      onEdit={(record) => navigate(`/fxuser/edit?id=${record.userId}`)}
46
-      onDelete={DeleteFxUser}
47
-      toolBarRender={() => [
48
-        <Button
49
-          key="1"
50
-          type="primary"
51
-          onClick={() => {
52
-            navigate("edit");
53
-          }}
54
-        >
55
-          新增
56
-        </Button>,
57
-      ]}
58
-      columns={columns}
59
-    />
42
+    <>
43
+      <List
44
+        rowKey="userId"
45
+        actionRef={actionRef}
46
+        request={() => {}}
47
+        onEdit={(record) => navigate(`/fxuser/edit?id=${record.userId}`)}
48
+        onDelete={DeleteFxUser}
49
+        toolBarRender={() => [
50
+          <Button key="1" type="primary" onClick={() => setOpen(true)}>
51
+            新增
52
+          </Button>,
53
+        ]}
54
+        columns={columns}
55
+      />
56
+      <Massage open={open} setOpen={setOpen} />
57
+    </>
60
   );
58
   );
61
 };
59
 };

+ 6
- 0
src/pages/incorporation/index.jsx Vedi File

1
+import React from 'react'
2
+export default (props) => {
3
+return (
4
+<div></div>
5
+)
6
+}

+ 6
- 0
src/pages/quickpass/index.jsx Vedi File

1
+import React from 'react'
2
+export default (props) => {
3
+return (
4
+<div></div>
5
+)
6
+}

+ 62
- 26
src/routes/routes.jsx Vedi File

7
 import AuthLayout from "@/layouts/AuthLayout";
7
 import AuthLayout from "@/layouts/AuthLayout";
8
 import Login from "@/pages/login";
8
 import Login from "@/pages/login";
9
 import Page404 from "@/pages/404";
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
  * meta 用来扩展自定义数据数据
20
  * meta 用来扩展自定义数据数据
30
 export const authRoutes = [
32
 export const authRoutes = [
31
   {
33
   {
32
     // index: true,
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
     meta: {
49
     meta: {
40
-      title: "用户管理",
50
+      title: "全球账户",
41
       icon: <SolutionOutlined />,
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
     meta: {
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
     meta: {
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
     meta: {
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
   },
116
   },
81
   {
117
   {
82
     path: "/firstPage",
118
     path: "/firstPage",
83
-    element:<FirstPage/>,
119
+    element: <FirstPage />,
84
   },
120
   },
85
   {
121
   {
86
     path: "/login",
122
     path: "/login",
92
   },
128
   },
93
 ];
129
 ];
94
 
130
 
95
-export function mergeAuthRoutes (r1, r2) {
131
+export function mergeAuthRoutes(r1, r2) {
96
   const r = r1.slice();
132
   const r = r1.slice();
97
   const children = r1[0].children.slice();
133
   const children = r1[0].children.slice();
98
   r[0].children = children.concat(r2);
134
   r[0].children = children.concat(r2);
101
 
137
 
102
 // 全部路由
138
 // 全部路由
103
 export const routes = mergeAuthRoutes(defaultRoutes, authRoutes);
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
   if (current.indexOf("/") === 0 || current.indexOf("http") === 0)
142
   if (current.indexOf("/") === 0 || current.indexOf("http") === 0)
107
     return current;
143
     return current;
108
   return `${parent}/${current}`.replace(/\/\//g, "/");
144
   return `${parent}/${current}`.replace(/\/\//g, "/");

+ 1
- 1
src/store/models/system.js Vedi File

1
 import { useState, useCallback } from "react";
1
 import { useState, useCallback } from "react";
2
 export default function useSystem() {
2
 export default function useSystem() {
3
   // 主题
3
   // 主题
4
-  const [theme, updateTheme] = useState("dark");
4
+  const [theme, updateTheme] = useState("light");
5
 
5
 
6
   // 其他配置
6
   // 其他配置
7
   const [app, setApp] = useState({
7
   const [app, setApp] = useState({