瀏覽代碼

Merge branch 'master' of http://git.ycjcjy.com/zhangtao2/global_funding-pc-merchant

fangmingyue 1 年之前
父節點
當前提交
df76f9664f

+ 33
- 0
src/components/Massage/index.jsx 查看文件

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 查看文件

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 查看文件

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

+ 6
- 0
src/pages/ecologicalpartner/index.jsx 查看文件

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

+ 6
- 0
src/pages/financialstatement/index.jsx 查看文件

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

+ 11
- 2
src/pages/firstPage/index.less 查看文件

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 查看文件


src/pages/fxuser/index.jsx → src/pages/homepage/index.jsx 查看文件

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 查看文件

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

+ 6
- 0
src/pages/quickpass/index.jsx 查看文件

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

+ 62
- 24
src/routes/routes.jsx 查看文件

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";
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
 import QLogin from '@/pages/qLogin/index';
20
 import QLogin from '@/pages/qLogin/index';
17
 import QRegister from '@/pages/qRegister/index';
21
 import QRegister from '@/pages/qRegister/index';
18
 
22
 
32
 export const authRoutes = [
36
 export const authRoutes = [
33
   {
37
   {
34
     // index: true,
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
     meta: {
53
     meta: {
42
-      title: "用户管理",
54
+      title: "全球账户",
43
       icon: <SolutionOutlined />,
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
     meta: {
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
     meta: {
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
     meta: {
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
   },
142
   },
105
 ];
143
 ];
106
 
144
 
107
-export function mergeAuthRoutes (r1, r2) {
145
+export function mergeAuthRoutes(r1, r2) {
108
   const r = r1.slice();
146
   const r = r1.slice();
109
   const children = r1[0].children.slice();
147
   const children = r1[0].children.slice();
110
   r[0].children = children.concat(r2);
148
   r[0].children = children.concat(r2);
113
 
151
 
114
 // 全部路由
152
 // 全部路由
115
 export const routes = mergeAuthRoutes(defaultRoutes, authRoutes);
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
   if (current.indexOf("/") === 0 || current.indexOf("http") === 0)
156
   if (current.indexOf("/") === 0 || current.indexOf("http") === 0)
119
     return current;
157
     return current;
120
   return `${parent}/${current}`.replace(/\/\//g, "/");
158
   return `${parent}/${current}`.replace(/\/\//g, "/");

+ 1
- 1
src/store/models/system.js 查看文件

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({