瀏覽代碼

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

张涛 1 年之前
父節點
當前提交
c3bfce8641

二進制
public/img/email.png 查看文件


+ 4
- 4
src/components/Upload/UploadFile.jsx 查看文件

@@ -1,5 +1,5 @@
1 1
 import React, { useState } from 'react';
2
-import { LoadingOutlined, PlusOutlined } from '@ant-design/icons';
2
+import { LoadingOutlined, PlusOutlined, CloudUploadOutlined } from '@ant-design/icons';
3 3
 import { useTranslation } from 'react-i18next';
4 4
 import Upload from './Upload';
5 5
 
@@ -10,9 +10,9 @@ export default (props) => {
10 10
   const [loading, setLoading] = useState(false);
11 11
 
12 12
   const UploadButton = (props) => (
13
-    <div style={{ textAlign: 'center' }}>
14
-      {props.loading ? <LoadingOutlined /> : <PlusOutlined />}
15
-      <div style={{ marginTop: 8 }}>{t('authentication.uploadText')}</div>
13
+    <div style={{ textAlign: 'center', width: '260px' }}>
14
+      {props.loading ? <LoadingOutlined /> : <CloudUploadOutlined style={{ fontSize: '30px', color: '#1890ff' }} />}
15
+      <div style={{ marginTop: 8, fontSize: '16px', color: '#1890ff', fontWeight: 600 }}>{t('authentication.uploadText')}</div>
16 16
     </div>
17 17
   );
18 18
 

+ 1
- 1
src/layouts/AuthLayout/RequireLogin.jsx 查看文件

@@ -22,7 +22,7 @@ export default (props) => {
22 22
 
23 23
   useEffect(() => {
24 24
     if (userStatus === -1) {
25
-      navigate("/login");
25
+      navigate("/qLogin");
26 26
       return;
27 27
     }
28 28
   }, [userStatus]);

+ 1
- 1
src/layouts/AuthLayout/components/Header/Exit.jsx 查看文件

@@ -18,7 +18,7 @@ export default (props) => {
18 18
         logout(); // 调用接口
19 19
         localStorage.removeItem("token");
20 20
         // setUser();
21
-        navigate("/login");
21
+        navigate("/qLogin");
22 22
       },
23 23
     });
24 24
   };

+ 23
- 84
src/layouts/AuthLayout/components/Header/User.jsx 查看文件

@@ -1,17 +1,7 @@
1 1
 import React, {
2 2
   useState,
3
-  forwardRef,
4
-  useRef,
5
-  useImperativeHandle,
6 3
 } from "react";
7 4
 import { Avatar, Dropdown } from "antd";
8
-import {
9
-  ModalForm,
10
-  ProFormText,
11
-  ProFormDependency,
12
-} from "@ant-design/pro-components";
13
-import md5 from "md5";
14
-import { changePassword } from "@/services/login";
15 5
 import { useNavigate } from "react-router-dom";
16 6
 
17 7
 const DefaultAvatar = ({ color = "#1296db" }) => (
@@ -29,92 +19,41 @@ const DefaultAvatar = ({ color = "#1296db" }) => (
29 19
   </svg>
30 20
 );
31 21
 
32
-const ChangePassword = forwardRef((props, ref) => {
33
-  const [visible, setVisible] = useState(false);
34
-  const navigate = useNavigate();
35
-  const onFinish = async (values) => {
36
-    const data = {
37
-      originPassword: md5(values.password),
38
-      newPassword: md5(values.newPassword),
39
-    };
40
-    await changePassword(data);
41
-    navigate(`/login`);
42
-
43
-    return true;
44
-  };
45
-
46
-  useImperativeHandle(ref, () => {
47
-    return {
48
-      show: () => setVisible(true),
49
-    };
50
-  });
51
-
52
-  return (
53
-    <ModalForm
54
-      title="修改密码"
55
-      width="480px"
56
-      open={visible}
57
-      onOpenChange={setVisible}
58
-      onFinish={onFinish}
59
-    >
60
-      <ProFormText.Password
61
-        label="原始密码"
62
-        name="password"
63
-        rules={[{ required: true, message: "请输入原始密码!" }]}
64
-      />
65
-      <ProFormText.Password
66
-        label="新密码"
67
-        name="newPassword"
68
-        rules={[{ required: true, message: "请输入新密码!" }]}
69
-      />
70
-
71
-      <ProFormDependency name={["newPassword"]}>
72
-        {({ newPassword }) => (
73
-          <ProFormText.Password
74
-            label="确认新密码"
75
-            name="newPassword2"
76
-            rules={[
77
-              { required: true, message: "请输入新密码!" },
78
-              () => ({
79
-                validator(_, value) {
80
-                  if (!value || value == newPassword) {
81
-                    return Promise.resolve();
82
-                  }
22
+export default (props) => {
83 23
 
84
-                  return Promise.reject("两次输入密码不一致");
85
-                },
86
-              }),
87
-            ]}
88
-          />
89
-        )}
90
-      </ProFormDependency>
91
-    </ModalForm>
92
-  );
93
-});
24
+  const navigate = useNavigate();
94 25
 
95
-export default (props) => {
96 26
   const items = [
97 27
     {
98
-      key: "changePassword",
99
-      label: "修改密码",
28
+      key: "log",
29
+      label: "操作日志",
30
+    },
31
+    {
32
+      key: "accountManage",
33
+      label: "账号管理",
34
+    },
35
+    {
36
+      key: "toggleManage",
37
+      label: "切换账号",
100 38
     },
101 39
   ];
102 40
 
103
-  const passRef = useRef();
104 41
   const { user = {} } = props;
105 42
 
106 43
   const onClick = ({ key }) => {
107
-    if (key === "changePassword") {
108
-      passRef.current.show();
44
+    if (key === "toggleManage") {
45
+      navigate(`/qLogin`);
109 46
     }
110 47
   };
48
+
111 49
   return (
112
-    <Dropdown menu={{ items, onClick }}>
113
-      <div className="user-info">
114
-        <Avatar size={24} src={<DefaultAvatar />} />
115
-        <span className="font">{user?.user?.userName}</span>
116
-        <ChangePassword user={user} ref={passRef} />
117
-      </div>
118
-    </Dropdown>
50
+    <>
51
+      <Dropdown menu={{ items, onClick }}>
52
+        <div className="user-info">
53
+          <Avatar size={24} src={<DefaultAvatar />} />
54
+          <span className="font">{user?.user?.userName || '----'}</span>
55
+        </div>
56
+      </Dropdown>
57
+    </>
119 58
   );
120 59
 };

+ 89
- 1
src/locale/zh.json 查看文件

@@ -7,6 +7,7 @@
7 7
   "authentication": {
8 8
     "titleLeft": "实名认证流程",
9 9
     "titleRight": "填写企业基础信息",
10
+    "stepsTitle": "实名认证",
10 11
     "stepsTitle1": "填写企业基础信息",
11 12
     "stepsTitle2": "填写企业董事信息",
12 13
     "stepsTitle3": "填写企业受益所有人信息",
@@ -69,6 +70,93 @@
69 70
     "directorInfoInputPlaceholder1": "请输入董事姓氏",
70 71
     "directorInfoInputPlaceholder2": "请输入董事名称",
71 72
     "directorInfoInputPlaceholder3": "请输入董事证件号码",
72
-    "directorInfoOtherDirectors": "其他董事"
73
+    "directorInfoOtherDirectors": "其他董事",
74
+
75
+    "everyoneInfoTitle": "填写企业受益所有人信息",
76
+    "everyoneInfoContent1": "根据所适用法律规定,我们需要向贵公司收集受益所有人信息。",
77
+    "everyoneInfoContent2": "受益所有人:实际管控、管理公司并享有公司最终收益的自然人。具体是指,直接或间接通过股权、授权或其他形式法律安排拥有公司25%以上股权、投票权的自然人。",
78
+    "everyoneInfoInputLabel1": "董事【刘凡】是否为受益所有人?",
79
+    "everyoneInfoInputLabel2": "贵公司是否还有其他的受益所有人?",
80
+    "everyoneInfoInputRadioValue1": "是",
81
+    "everyoneInfoInputRadioValue2": "否",
82
+    "everyoneInfoUploadTitle": "股权架构图(选填)",
83
+    "everyoneInfoUploadText1": "1.若IN01或最新NAR1文件中股权信息未穿透到自然人则需要上传股权架构图",
84
+    "everyoneInfoUploadText2": "2.支持PDF、JPG、JPEG、PNG、ZIP、RAR、XLSX、XLS格式",
85
+    "everyoneInfoUploadText3": "3.多份文件请打包压缩上传,文件大小不超过20MB",
86
+    "everyoneInfoRadioTip": "若持股比例<25%,则非受益所有人",
87
+    "everyoneInfoAgreement": "我确认以上信息填写准确无误,我已知悉且同意",
88
+    "everyoneInfoAgreementTitle1": "《快云用卡协议》",
89
+    "everyoneInfoAgreementEnd": "和",
90
+    "everyoneInfoAgreementTitle2": "《快云用户协议》",
91
+    "everyoneInfoBack": "上一步",
92
+    "everyoneInfoSubmit": "提交",
93
+
94
+    "FaceRecognitionTitle": "人脸识别",
95
+    "FaceRecognitionContent1": "根据所适用法律规定,我们需要向贵公司的相关个人采集人脸信息",
96
+    "FaceRecognitionContent2": "在人脸识别完成后,系统将自动提交。若识别多次未通过,请联系客服或您的客户经理。",
97
+    "FaceRecognitionSubTitle": "董事",
98
+    "FaceRecognitionName": "姓名",
99
+    "FaceRecognitionState": "识别状态",
100
+    "FaceRecognitionBtn1": "进行人脸识别",
101
+    "FaceRecognitionBtn2": "寻求帮助",
102
+    "FaceRecognitionTag1": "待识别",
103
+
104
+    "FaceRecognitionModalTitle": "人脸识别",
105
+    "FaceRecognitionModalContent1": "请用手机扫描以下二维码,或用手机打开分享链接,按页面提示完成人脸识别认证,认证完成后,您的信息将被自动提交。",
106
+    "FaceRecognitionModalTip1": "此二维码",
107
+    "FaceRecognitionModalTip2": "分钟后失效",
108
+    "FaceRecognitionDirector": "董事",
109
+    "FaceRecognitionBtn": "复制分享链接",
110
+
111
+    "AuthenticationTitle": "实名认证",
112
+    "AuthenticationContent1": "请进一步完善信息,让快云更了解您!",
113
+    "AuthenticationLabel1": "企业注册地",
114
+    "AuthenticationLabel2": "企业中文名称",
115
+    "AuthenticationLabel3": "企业英文名称(如有)",
116
+    "AuthenticationLabel4": "是否为上市公司",
117
+    "AuthenticationPlaceholder1": "请填写企业中文名称",
118
+    "AuthenticationPlaceholder2": "请填写企业英文名称",
119
+    "AuthenticationBtn": "开始实名认证",
120
+    "AuthenticationTip": "请确保您的企业名称与企业文件上的注册名称一致,开始认证流程后无法修改",
121
+    "AuthenticationYes": "是",
122
+    "AuthenticationNo": "否"
123
+  },
124
+  "accountsettings": {
125
+    "title1": "修改登录密码",
126
+    "btnText1": "修改密码",
127
+    "text1": "密码最少8位,至少包括1个大写英文字母,1个小写英文字母,1个数字或符号",
128
+
129
+    "title2": "修改手机号",
130
+    "btnText2": "修改手机号",
131
+    "text2": "您已绑定手机号:",
132
+
133
+    "title3": "修改邮箱",
134
+    "btnText3": "修改邮箱",
135
+    "text3": "您已绑定邮箱:",
136
+    "sumTitle": "合规材料递交",
137
+    "title4": "新增业务场景",
138
+    "btnText4": "去提交",
139
+    "text4": "请结合您的实际业务运营情况及时提交新的业务场景",
140
+
141
+    "emailTitle": "修改邮箱",
142
+    "emailInput1": "原始邮箱",
143
+    "emailInput2": "新邮箱",
144
+    "emailInputLabel": "确认新邮箱",
145
+    "emailInputLabelRule": "请输入新邮箱!",
146
+    "emailInputPromiseText": "两次输入邮箱不一致",
147
+
148
+    "passwordTitle": "修改密码",
149
+    "passwordInput1": "原始密码",
150
+    "passwordInput2": "新密码",
151
+    "passwordInputLabel": "确认新密码",
152
+    "passwordInputLabelRule": "请输入新密码!",
153
+    "passwordInputPromiseText": "两次输入密码不一致",
154
+
155
+    "phoneTitle": "修改手机号",
156
+    "phoneInput1": "原始手机号",
157
+    "phoneInput2": "新手机号",
158
+    "phoneInputLabel": "确认新手机号",
159
+    "phoneInputLabelRule": "请输入新手机号!",
160
+    "phoneInputPromiseText": "两次输入手机号不一致"
73 161
   }
74 162
 }

+ 71
- 0
src/pages/accountsettings/components/ChangeModalEmail.jsx 查看文件

@@ -0,0 +1,71 @@
1
+import React, { useEffect, useState } from "react";
2
+import {
3
+  ModalForm,
4
+  ProFormText,
5
+  ProFormDependency,
6
+} from "@ant-design/pro-components";
7
+import md5 from "md5";
8
+import { changeEmail } from "@/services/login";
9
+import { useNavigate } from "react-router-dom";
10
+import { useTranslation } from 'react-i18next';
11
+
12
+export default (props) => {
13
+  const { opEmail, setOpEmail } = props;
14
+  const navigate = useNavigate();
15
+  const { t } = useTranslation();
16
+
17
+  const onFinish = async (values) => {
18
+    const data = {
19
+      originEmail: md5(values.email),
20
+      newEmail: md5(values.newEmail),
21
+    };
22
+    await changeEmail(data);
23
+    navigate(`/login`);
24
+
25
+    return true;
26
+  };
27
+
28
+  return (
29
+    <ModalForm
30
+      title={t('accountsettings.emailTitle')}
31
+      width="480px"
32
+      open={opEmail}
33
+      modalProps={{
34
+        onCancel: () => setOpEmail(false),
35
+      }}
36
+      onFinish={onFinish}
37
+    >
38
+      <ProFormText.Password
39
+        label={t('accountsettings.emailInput1')}
40
+        name="email"
41
+        rules={[{ required: true }]}
42
+      />
43
+      <ProFormText.Password
44
+        label={t('accountsettings.emailInput2')}
45
+        name="newEmail"
46
+        rules={[{ required: true }]}
47
+      />
48
+
49
+      <ProFormDependency name={["newEmail"]}>
50
+        {({ newEmail }) => (
51
+          <ProFormText.Password
52
+            label={t('accountsettings.emailInputLabel')}
53
+            name="newEmail2"
54
+            rules={[
55
+              { required: true, message: t('accountsettings.emailInputLabelRule') },
56
+              () => ({
57
+                validator (_, value) {
58
+                  if (!value || value == newEmail) {
59
+                    return Promise.resolve();
60
+                  }
61
+
62
+                  return Promise.reject(t('accountsettings.emailInputPromiseText'));
63
+                },
64
+              }),
65
+            ]}
66
+          />
67
+        )}
68
+      </ProFormDependency>
69
+    </ModalForm>
70
+  )
71
+}

+ 71
- 0
src/pages/accountsettings/components/ChangeModalPassword.jsx 查看文件

@@ -0,0 +1,71 @@
1
+import React, { useEffect, useState } from "react";
2
+import {
3
+  ModalForm,
4
+  ProFormText,
5
+  ProFormDependency,
6
+} from "@ant-design/pro-components";
7
+import md5 from "md5";
8
+import { changePassword } from "@/services/login";
9
+import { useNavigate } from "react-router-dom";
10
+import { useTranslation } from 'react-i18next';
11
+
12
+export default (props) => {
13
+  const { visible, setVisible } = props;
14
+  const navigate = useNavigate();
15
+  const { t } = useTranslation();
16
+
17
+  const onFinish = async (values) => {
18
+    const data = {
19
+      originPassword: md5(values.password),
20
+      newPassword: md5(values.newPassword),
21
+    };
22
+    await changePassword(data);
23
+    navigate(`/login`);
24
+
25
+    return true;
26
+  };
27
+
28
+  return (
29
+    <ModalForm
30
+      title={t('accountsettings.passwordTitle')}
31
+      width="480px"
32
+      open={visible}
33
+      modalProps={{
34
+        onCancel: () => setVisible(false),
35
+      }}
36
+      onFinish={onFinish}
37
+    >
38
+      <ProFormText.Password
39
+        label={t('accountsettings.passwordInput1')}
40
+        name="password"
41
+        rules={[{ required: true }]}
42
+      />
43
+      <ProFormText.Password
44
+        label={t('accountsettings.passwordInput2')}
45
+        name="newPassword"
46
+        rules={[{ required: true }]}
47
+      />
48
+
49
+      <ProFormDependency name={["newPassword"]}>
50
+        {({ newPassword }) => (
51
+          <ProFormText.Password
52
+            label={t('accountsettings.passwordInputLabel')}
53
+            name="newPassword2"
54
+            rules={[
55
+              { required: true, message: t('accountsettings.passwordInputLabelRule') },
56
+              () => ({
57
+                validator (_, value) {
58
+                  if (!value || value == newPassword) {
59
+                    return Promise.resolve();
60
+                  }
61
+
62
+                  return Promise.reject(t('accountsettings.passwordInputPromiseText'));
63
+                },
64
+              }),
65
+            ]}
66
+          />
67
+        )}
68
+      </ProFormDependency>
69
+    </ModalForm>
70
+  )
71
+}

+ 71
- 0
src/pages/accountsettings/components/ChangeModalPhone.jsx 查看文件

@@ -0,0 +1,71 @@
1
+import React, { useEffect, useState } from "react";
2
+import {
3
+  ModalForm,
4
+  ProFormText,
5
+  ProFormDependency,
6
+} from "@ant-design/pro-components";
7
+import md5 from "md5";
8
+import { changePhone } from "@/services/login";
9
+import { useNavigate } from "react-router-dom";
10
+import { useTranslation } from 'react-i18next';
11
+
12
+export default (props) => {
13
+  const { opPhone, setOpPhone } = props;
14
+  const navigate = useNavigate();
15
+  const { t } = useTranslation();
16
+
17
+  const onFinish = async (values) => {
18
+    const data = {
19
+      originPhone: md5(values.phone),
20
+      newPhone: md5(values.newPhone),
21
+    };
22
+    await changePhone(data);
23
+    navigate(`/login`);
24
+
25
+    return true;
26
+  };
27
+
28
+  return (
29
+    <ModalForm
30
+      title={t('accountsettings.emailTitle')}
31
+      width="480px"
32
+      open={opPhone}
33
+      modalProps={{
34
+        onCancel: () => setOpPhone(false),
35
+      }}
36
+      onFinish={onFinish}
37
+    >
38
+      <ProFormText.Password
39
+        label={t('accountsettings.phoneInput1')}
40
+        name="phone"
41
+        rules={[{ required: true }]}
42
+      />
43
+      <ProFormText.Password
44
+        label={t('accountsettings.phoneInput2')}
45
+        name="newPhone"
46
+        rules={[{ required: true }]}
47
+      />
48
+
49
+      <ProFormDependency name={["newPhone"]}>
50
+        {({ newPhone }) => (
51
+          <ProFormText.Password
52
+            label={t('accountsettings.phoneInputLabel')}
53
+            name="newPhone2"
54
+            rules={[
55
+              { required: true, message: t('accountsettings.phoneInputLabelRule') },
56
+              () => ({
57
+                validator (_, value) {
58
+                  if (!value || value == newPhone) {
59
+                    return Promise.resolve();
60
+                  }
61
+
62
+                  return Promise.reject(t('accountsettings.phoneInputPromiseText'));
63
+                },
64
+              }),
65
+            ]}
66
+          />
67
+        )}
68
+      </ProFormDependency>
69
+    </ModalForm>
70
+  )
71
+}

+ 98
- 2
src/pages/accountsettings/index.jsx 查看文件

@@ -1,6 +1,102 @@
1
-import React from 'react'
1
+import React, { useState } from 'react'
2
+import Page from "@/components/Page";
3
+import { Col, Row, Card, Button } from 'antd';
4
+import { useTranslation } from 'react-i18next';
5
+import ChangeModalPhone from "./components/ChangeModalPhone";
6
+import ChangeModalPassword from "./components/ChangeModalPassword";
7
+import ChangeModalEmail from "./components/ChangeModalEmail";
8
+import { useNavigate } from "react-router-dom";
9
+
2 10
 export default (props) => {
11
+  const [visible, setVisible] = useState(false);
12
+  const [opPhone, setOpPhone] = useState(false);
13
+  const [opEmail, setOpEmail] = useState(false);
14
+
15
+  const navigate = useNavigate();
16
+
17
+  const { t } = useTranslation();
18
+
19
+  const onOpenPhone = () => {
20
+    setOpPhone(true);
21
+  }
22
+  const onOpenPassword = () => {
23
+    setVisible(true);
24
+  }
25
+  const onOpenEmail = () => {
26
+    setOpEmail(true);
27
+  }
3 28
   return (
4
-    <div></div>
29
+    <Page>
30
+      <div style={{ width: '460px', display: 'inline-block', marginRight: '24px' }}>
31
+        <Card>
32
+          <div style={{ display: "flex", alignItems: "stretch" }}>
33
+            <div style={{ flex: 0.5 }}>
34
+              <img src="https://qbitnetwork.com/app/img/password-qbit.957e234a.png" alt={t('accountsettings.title1')} width="100" />
35
+            </div>
36
+            <div style={{ flex: 1.5 }}>
37
+              <div style={{ display: "flex", justifyContent: "space-between", paddingTop: '10px' }}>
38
+                <div style={{ fontSize: "16px", fontWeight: "bold" }}>{t('accountsettings.title1')}</div>
39
+                <Button type="primary" onClick={onOpenPassword}>{t('accountsettings.btnText1')}</Button>
40
+              </div>
41
+              <div style={{ paddingTop: '1em', color: '#bfbfbf' }}>{t('accountsettings.text1')}</div>
42
+            </div>
43
+          </div>
44
+        </Card>
45
+      </div>
46
+      <div style={{ width: '460px', display: 'inline-block' }}>
47
+        <Card>
48
+          <div style={{ display: "flex", alignItems: "stretch" }}>
49
+            <div style={{ flex: 0.5 }}>
50
+              <img src="https://qbitnetwork.com/app/img/phone-qbit.5eab89b2.png" alt={t('accountsettings.title2')} width="100" />
51
+            </div>
52
+            <div style={{ flex: 1.5 }}>
53
+              <div style={{ display: "flex", justifyContent: "space-between", paddingTop: '10px' }}>
54
+                <div style={{ fontSize: "16px", fontWeight: "bold" }}>{t('accountsettings.title2')}</div>
55
+                <Button type="primary" onClick={onOpenPhone}>{t('accountsettings.btnText2')}</Button>
56
+              </div>
57
+              <div style={{ paddingTop: '1em', color: '#bfbfbf' }}>{t('accountsettings.text2')}+8***77</div>
58
+            </div>
59
+          </div>
60
+        </Card>
61
+      </div>
62
+
63
+      <div style={{ width: '460px', marginTop: '24px' }}>
64
+        <Card>
65
+          <div style={{ display: "flex", alignItems: "stretch" }}>
66
+            <div style={{ flex: 0.5 }}>
67
+              <img src="/img/email.png" alt={t('accountsettings.title3')} width="100" />
68
+            </div>
69
+            <div style={{ flex: 1.5 }}>
70
+              <div style={{ display: "flex", justifyContent: "space-between", paddingTop: '10px' }}>
71
+                <div style={{ fontSize: "16px", fontWeight: "bold" }}>{t('accountsettings.title3')}</div>
72
+                <Button type="primary" onClick={onOpenEmail}>{t('accountsettings.btnText3')}</Button>
73
+              </div>
74
+              <div style={{ paddingTop: '1em', color: '#bfbfbf' }}>{t('accountsettings.text3')}99****qq.com</div>
75
+            </div>
76
+          </div>
77
+        </Card>
78
+      </div>
79
+
80
+      <div style={{ margin: '24px 0', fontWeight: '400', fontSize: '24px' }}>{t('accountsettings.sumTitle')}</div>
81
+      <div style={{ width: '460px', marginTop: '24px' }}>
82
+        <Card>
83
+          <div style={{ display: "flex", alignItems: "stretch" }}>
84
+            <div style={{ flex: 0.5 }}>
85
+              <img src="	https://qbitnetwork.com/app/img/business-report-qbit.99ec4666.png" alt={t('accountsettings.title4')} width="100" />
86
+            </div>
87
+            <div style={{ flex: 1.5 }}>
88
+              <div style={{ display: "flex", justifyContent: "space-between", paddingTop: '10px' }}>
89
+                <div style={{ fontSize: "16px", fontWeight: "bold" }}>{t('accountsettings.title4')}</div>
90
+                <Button type="primary" onClick={() => navigate('/authentication')} >{t('accountsettings.btnText4')}</Button>
91
+              </div>
92
+              <div style={{ paddingTop: '1em', color: '#bfbfbf' }}>{t('accountsettings.text4')}</div>
93
+            </div>
94
+          </div>
95
+        </Card>
96
+      </div>
97
+      <ChangeModalPhone opPhone={opPhone} setOpPhone={setOpPhone} />
98
+      <ChangeModalPassword visible={visible} setVisible={setVisible} />
99
+      <ChangeModalEmail opEmail={opEmail} setOpEmail={setOpEmail} />
100
+    </Page>
5 101
   )
6 102
 }

+ 57
- 0
src/pages/authentication/components/Authentication.jsx 查看文件

@@ -0,0 +1,57 @@
1
+import React from "react";
2
+import { Divider, Card, Steps, Button, Radio, Form, Input, Row, Col, Select, Image } from "antd";
3
+import { useTranslation } from 'react-i18next';
4
+
5
+export default (props) => {
6
+  const { index, setIndex } = props;
7
+  const { t } = useTranslation();
8
+  const [form] = Form.useForm();
9
+
10
+  const onFinish = () => {
11
+
12
+  };
13
+  const onClick = () => {
14
+    setIndex(index + 1);
15
+  }
16
+  return (
17
+    <>
18
+      <div style={{ fontSize: '24px', fontWeight: '400' }}>{t('authentication.AuthenticationTitle')}</div>
19
+      <Card bordered={false} style={{ width: '900px' }}>
20
+        <div style={{ fontSize: '16px', fontWeight: '600' }}>{t('authentication.AuthenticationContent1')}</div>
21
+        <Form
22
+          form={form}
23
+          size="large"
24
+          layout="vertical"
25
+          onFinish={onFinish}
26
+          style={{ marginTop: '4em' }}
27
+          wrapperCol={{ span: 14 }}
28
+        >
29
+          <Form.Item label={t('authentication.AuthenticationLabel1')}>
30
+            <Select defaultValue="中国大陆">
31
+            </Select>
32
+          </Form.Item>
33
+          <Form.Item label={t('authentication.AuthenticationLabel2')}>
34
+            <Input placeholder={t('authentication.AuthenticationPlaceholder1')} />
35
+          </Form.Item>
36
+          <div style={{ fontSize: '11px', color: '#bfbfbf', marginTop: '-20px' }}>{t('authentication.AuthenticationTip')}</div>
37
+          <Form.Item label={t('authentication.AuthenticationLabel3')}>
38
+            <Input placeholder={t('authentication.AuthenticationPlaceholder2')} />
39
+          </Form.Item>
40
+          <Form.Item label={t('authentication.AuthenticationLabel4')}>
41
+            <div style={{ marginTop: '-24px' }}>
42
+              <Radio style={{ fontSize: '16px' }}>{t('authentication.AuthenticationYes')}</Radio>
43
+              <Radio style={{ fontSize: '16px' }}>{t('authentication.AuthenticationNo')}</Radio>
44
+            </div>
45
+          </Form.Item>
46
+          <Form.Item style={{ marginTop: '24px' }}>
47
+            <Button
48
+              type="primary"
49
+              size="large"
50
+              onClick={onClick}
51
+            >{t('authentication.AuthenticationBtn')}</Button>
52
+          </Form.Item>
53
+        </Form>
54
+      </Card>
55
+    </>
56
+  )
57
+}

+ 5
- 0
src/pages/authentication/components/DirectorInfo.jsx 查看文件

@@ -4,9 +4,13 @@ import { useTranslation } from 'react-i18next';
4 4
 import "../style.less";
5 5
 
6 6
 export default (props) => {
7
+  const { index, setIndex } = props;
7 8
   const { t } = useTranslation();
8 9
   const [form] = Form.useForm();
9 10
 
11
+  const onNext = () => {
12
+    setIndex(index + 1)
13
+  }
10 14
   const onFinish = () => {
11 15
 
12 16
   };
@@ -84,6 +88,7 @@ export default (props) => {
84 88
           </Form.Item>
85 89
           {/* 其他董事 */}
86 90
           <div style={{ fontSize: '16px', fontWeight: '600' }}>{t('authentication.directorInfoOtherDirectors')}</div>
91
+          <Button type="primary" onClick={onNext} >{t('authentication.foundationInfoNextBtn')}</Button>
87 92
         </Card>
88 93
 
89 94
       </Form>

+ 71
- 0
src/pages/authentication/components/EveryoneInfo.jsx 查看文件

@@ -0,0 +1,71 @@
1
+import React from "react";
2
+import { Divider, Card, Steps, Button, Radio, Form, Input, Row, Col, Select, Image } from "antd";
3
+import UploadFile from "@/components/Upload/UploadFile";
4
+import { useTranslation } from 'react-i18next';
5
+import "../style.less";
6
+
7
+export default (props) => {
8
+  const { index, setIndex } = props;
9
+  const { t } = useTranslation();
10
+  const [form] = Form.useForm();
11
+
12
+  const onFinish = () => {
13
+
14
+  };
15
+  const onBack = () => {
16
+    setIndex(index - 1);
17
+  };
18
+  const onSubmit = () => {
19
+    setIndex(index + 1);
20
+  };
21
+
22
+  return (
23
+    <>
24
+      <div style={{ fontSize: '24px', fontWeight: '400' }}>{t('authentication.everyoneInfoTitle')}</div>
25
+      <Card bordered={false} style={{ width: '900px', marginBottom: '24px' }}>
26
+        <div style={{ fontSize: '16px', marginBottom: '24px' }}>{t('authentication.everyoneInfoContent1')}</div>
27
+        <div style={{ fontSize: '16px', fontWeight: '600' }}>{t('authentication.everyoneInfoContent2')}</div>
28
+        <Form
29
+          form={form}
30
+          layout="vertical"
31
+          onFinish={onFinish}
32
+          style={{ marginTop: '4em' }}
33
+        >
34
+          <Form.Item label={t('authentication.everyoneInfoInputLabel1')}>
35
+            <Radio style={{ fontSize: '16px' }}>{t('authentication.everyoneInfoInputRadioValue1')}</Radio>
36
+            <Radio style={{ fontSize: '16px' }}>{t('authentication.everyoneInfoInputRadioValue2')}</Radio>
37
+          </Form.Item>
38
+          <Form.Item>
39
+            <div style={{ marginTop: '40px', fontSize: '16px' }}>{t('authentication.everyoneInfoUploadTitle')}</div>
40
+            <div style={{ display: 'flex', alignItems: 'stretch ' }}>
41
+              <div className="authentication-right-upload-box">
42
+                <UploadFile />
43
+              </div>
44
+              <div style={{ flex: 1.2 }}>
45
+                <div style={{ padding: '0 15px', color: '#bfbfbf' }}>{t('authentication.everyoneInfoUploadText1')}</div>
46
+                <div style={{ padding: '0 15px', color: '#bfbfbf' }}>{t('authentication.everyoneInfoUploadText2')}</div>
47
+                <div style={{ padding: '0 15px', color: '#bfbfbf' }}>{t('authentication.everyoneInfoUploadText3')}</div>
48
+                <Button type="link">{t('authentication.uploadBtnText')}</Button>
49
+              </div>
50
+            </div>
51
+          </Form.Item>
52
+          <Form.Item label={t('authentication.everyoneInfoInputLabel2')}>
53
+            <Radio style={{ fontSize: '16px' }}>{t('authentication.everyoneInfoInputRadioValue1')}</Radio>
54
+            <Radio style={{ fontSize: '16px' }}>{t('authentication.everyoneInfoInputRadioValue2')}</Radio>
55
+            <div style={{ color: '#ffac00' }}>{t('authentication.everyoneInfoRadioTip')}</div>
56
+          </Form.Item>
57
+          <Radio>
58
+            {t('authentication.everyoneInfoAgreement')}
59
+            <a>{t('authentication.everyoneInfoAgreementTitle1')}</a>
60
+            {t('authentication.everyoneInfoAgreementEnd')}
61
+            <a>{t('authentication.everyoneInfoAgreementTitle2')}</a>
62
+          </Radio>
63
+        </Form>
64
+        <Form.Item style={{ marginTop: '24px' }}>
65
+          <Button size="large" style={{ width: '6vw', marginRight: '2vw' }} onClick={onBack}>{t('authentication.everyoneInfoBack')}</Button>
66
+          <Button size="large" type="primary" style={{ width: '6vw' }} onClick={onSubmit}>{t('authentication.everyoneInfoSubmit')}</Button>
67
+        </Form.Item>
68
+      </Card>
69
+    </>
70
+  )
71
+}

+ 40
- 0
src/pages/authentication/components/FaceRecognition.jsx 查看文件

@@ -0,0 +1,40 @@
1
+import React, { useState } from "react";
2
+import { Tag, Card, Steps, Button, Radio, Form, Input, Row, Col, Select, Image } from "antd";
3
+import { useTranslation } from 'react-i18next';
4
+import FaceRecognitionModal from "./FaceRecognitionModal";
5
+import "../style.less";
6
+
7
+export default (props) => {
8
+  const { t } = useTranslation();
9
+  const [open, setOpen] = useState(false)
10
+
11
+  const onOpen = () => {
12
+    setOpen(true)
13
+  }
14
+
15
+  return (
16
+    <>
17
+      <div style={{ fontSize: '24px', fontWeight: '400' }}>{t('authentication.FaceRecognitionTitle')}</div>
18
+      <Card bordered={false} style={{ width: '900px', paddingBottom: '3vw' }}>
19
+        <div style={{ fontSize: '16px', marginBottom: '24px' }}>{t('authentication.FaceRecognitionContent1')}</div>
20
+        <div style={{ fontSize: '16px', fontWeight: 'bold', marginBottom: '12px' }}>{t('authentication.FaceRecognitionSubTitle')}</div>
21
+        <div className="face-recognition-box">
22
+          <div style={{ flex: 0.3 }}>
23
+            <div style={{ fontSize: '16px' }}>{t('authentication.FaceRecognitionName')}</div>
24
+            <div style={{ fontSize: '16px', fontWeight: 'bold' }}>XXX</div>
25
+          </div>
26
+          <div style={{ flex: 0.4 }}>
27
+            <div style={{ fontSize: '16px' }}>{t('authentication.FaceRecognitionState')}</div>
28
+            <div><Tag color="orange">{t('authentication.FaceRecognitionTag1')}</Tag></div>
29
+          </div>
30
+          <div style={{ flex: 0.3 }}>
31
+            <Button type="primary" onClick={onOpen}>{t('authentication.FaceRecognitionBtn1')}</Button>
32
+          </div>
33
+        </div>
34
+        <div style={{ fontSize: '16px', marginTop: '12px', marginBottom: '40px' }}>{t('authentication.FaceRecognitionContent2')}</div>
35
+        <Button size="large" style={{ width: '6vw' }}>{t('authentication.FaceRecognitionBtn2')}</Button>
36
+      </Card>
37
+      <FaceRecognitionModal open={open} setOpen={setOpen} />
38
+    </>
39
+  )
40
+}

+ 38
- 0
src/pages/authentication/components/FaceRecognitionModal.jsx 查看文件

@@ -0,0 +1,38 @@
1
+import React from "react";
2
+import { Modal, Statistic, Button } from "antd";
3
+import { LinkOutlined } from '@ant-design/icons'
4
+import { useTranslation } from 'react-i18next';
5
+const { Countdown } = Statistic;
6
+
7
+export default (props) => {
8
+  const { open, setOpen } = props;
9
+  const { t } = useTranslation();
10
+  return (
11
+    <Modal
12
+      title={
13
+        <div style={{ textAlign: "center", fontWeight: "bold" }}>
14
+          {t('authentication.FaceRecognitionModalTitle')}
15
+        </div>
16
+      }
17
+      open={open}
18
+      onOk={props.onOk}
19
+      onCancel={() => setOpen(false)}
20
+      footer={null}
21
+    >
22
+      <div style={{ fontSize: "15px", marginBottom: "12px" }}>{t('authentication.FaceRecognitionModalContent1')}</div>
23
+      <div style={{ fontSize: "14px" }}>
24
+        {t('authentication.FaceRecognitionModalTip1')}
25
+        <Countdown
26
+          value={Date.now() + 10 * 1000}
27
+          format="mm:ss"
28
+          style={{ color: "red", display: "inline-block" }}
29
+        />
30
+        {t('authentication.FaceRecognitionModalTip2')}
31
+      </div>
32
+      <div style={{ fontSize: "16px", margin: "24px 0", textAlign: "center" }}>{t('authentication.FaceRecognitionDirector')}XX</div>
33
+      <div style={{ display: "flex", justifyContent: "center" }}>
34
+        <Button type="primary"><LinkOutlined />{t('authentication.FaceRecognitionBtn')}</Button>
35
+      </div>
36
+    </Modal>
37
+  )
38
+}

+ 16
- 16
src/pages/authentication/components/FoundationInfo.jsx 查看文件

@@ -11,7 +11,7 @@ export default (props) => {
11 11
 
12 12
   const onFinish = () => {
13 13
 
14
-  };     
14
+  };
15 15
 
16 16
   const onNext = () => {
17 17
     setIndex(index + 1)
@@ -20,10 +20,10 @@ export default (props) => {
20 20
   return (
21 21
     <>
22 22
       <div style={{ fontSize: '24px', fontWeight: '400' }}>{t('authentication.titleRight')}</div>
23
-      <Card bordered={false} style={{ width: '900px', marginBottom: '24px' }}>
23
+      {/* <Card bordered={false} style={{ width: '900px', marginBottom: '24px' }}>
24 24
         <div style={{ color: 'red', fontWeight: '600' }}>{t('authentication.rightTopSubTitle')}</div>
25 25
         <div style={{ color: '#bfbfbf' }}>{t('authentication.rightTopText')}</div>
26
-      </Card>
26
+      </Card> */}
27 27
       <Form
28 28
         form={form}
29 29
         layout="vertical"
@@ -38,9 +38,9 @@ export default (props) => {
38 38
                 <UploadFile />
39 39
               </div>
40 40
               <div style={{ flex: 1.2 }}>
41
-                <div style={{ padding: '0 15px' }}>{t('authentication.uploadPromptText1')}</div>
42
-                <div style={{ padding: '0 15px' }}>{t('authentication.uploadPromptText2')}</div>
43
-                <div style={{ padding: '0 15px' }}>{t('authentication.uploadPromptText3')}</div>
41
+                <div style={{ padding: '0 15px', color: '#bfbfbf' }}>{t('authentication.uploadPromptText1')}</div>
42
+                <div style={{ padding: '0 15px', color: '#bfbfbf' }}>{t('authentication.uploadPromptText2')}</div>
43
+                <div style={{ padding: '0 15px', color: '#bfbfbf' }}>{t('authentication.uploadPromptText3')}</div>
44 44
                 <Button type="link">{t('authentication.uploadBtnText')}</Button>
45 45
               </div>
46 46
             </div>
@@ -52,9 +52,9 @@ export default (props) => {
52 52
                 <UploadFile />
53 53
               </div>
54 54
               <div style={{ flex: 1.2 }}>
55
-                <div style={{ padding: '0 15px' }}>{t('authentication.uploadPromptText1')}</div>
56
-                <div style={{ padding: '0 15px' }}>{t('authentication.uploadPromptText2')}</div>
57
-                <div style={{ padding: '0 15px' }}>{t('authentication.uploadPromptText3')}</div>
55
+                <div style={{ padding: '0 15px', color: '#bfbfbf' }}>{t('authentication.uploadPromptText1')}</div>
56
+                <div style={{ padding: '0 15px', color: '#bfbfbf' }}>{t('authentication.uploadPromptText2')}</div>
57
+                <div style={{ padding: '0 15px', color: '#bfbfbf' }}>{t('authentication.uploadPromptText3')}</div>
58 58
                 <div style={{ padding: '0 15px', fontWeight: '600' }}>4.{t('authentication.uploadPromptTextII4')}</div>
59 59
                 <Button type="link">{t('authentication.uploadBtnText')}</Button>
60 60
               </div>
@@ -67,10 +67,10 @@ export default (props) => {
67 67
                 <UploadFile />
68 68
               </div>
69 69
               <div style={{ flex: 1.2 }}>
70
-                <div style={{ padding: '0 15px' }}>{t('authentication.uploadPromptText1')}</div>
71
-                <div style={{ padding: '0 15px' }}>{t('authentication.uploadPromptText2')}</div>
72
-                <div style={{ padding: '0 15px' }}>{t('authentication.uploadPromptText3')}</div>
73
-                <div style={{ padding: '0 15px' }}>{t('authentication.uploadPromptTextIII4')}</div>
70
+                <div style={{ padding: '0 15px', color: '#bfbfbf' }}>{t('authentication.uploadPromptText1')}</div>
71
+                <div style={{ padding: '0 15px', color: '#bfbfbf' }}>{t('authentication.uploadPromptText2')}</div>
72
+                <div style={{ padding: '0 15px', color: '#bfbfbf' }}>{t('authentication.uploadPromptText3')}</div>
73
+                <div style={{ padding: '0 15px', color: '#bfbfbf' }}>{t('authentication.uploadPromptTextIII4')}</div>
74 74
                 <div style={{ padding: '0 15px', fontWeight: '600' }}>5.{t('authentication.uploadPromptTextII4')}</div>
75 75
                 <Button type="link">{t('authentication.uploadBtnText')}</Button>
76 76
               </div>
@@ -83,9 +83,9 @@ export default (props) => {
83 83
                 <UploadFile />
84 84
               </div>
85 85
               <div style={{ flex: 1.2 }}>
86
-                <div style={{ padding: '0 15px' }}>{t('authentication.uploadPromptText1')}</div>
87
-                <div style={{ padding: '0 15px' }}>{t('authentication.uploadPromptText2')}</div>
88
-                <div style={{ padding: '0 15px' }}>{t('authentication.uploadPromptText3')}</div>
86
+                <div style={{ padding: '0 15px', color: '#bfbfbf' }}>{t('authentication.uploadPromptText1')}</div>
87
+                <div style={{ padding: '0 15px', color: '#bfbfbf' }}>{t('authentication.uploadPromptText2')}</div>
88
+                <div style={{ padding: '0 15px', color: '#bfbfbf' }}>{t('authentication.uploadPromptText3')}</div>
89 89
                 <Button type="link">{t('authentication.uploadBtnText')}</Button>
90 90
               </div>
91 91
             </div>

+ 24
- 3
src/pages/authentication/index.jsx 查看文件

@@ -1,8 +1,11 @@
1 1
 import React, { useState } from "react";
2 2
 import { Divider, Card, Steps, Button, Radio, Form, Input, Row, Col, Select } from "antd";
3 3
 import Page from "@/components/Page";
4
+import Authentication from "./components/Authentication";
4 5
 import FoundationInfo from "./components/FoundationInfo";
5 6
 import DirectorInfo from "./components/DirectorInfo";
7
+import EveryoneInfo from "./components/EveryoneInfo";
8
+import FaceRecognition from "./components/FaceRecognition";
6 9
 import { useTranslation } from 'react-i18next';
7 10
 import "./style.less";
8 11
 
@@ -21,6 +24,9 @@ export default (props) => {
21 24
               current={index}
22 25
               direction="vertical"
23 26
               items={[
27
+                {
28
+                  title: t('authentication.stepsTitle'),
29
+                },
24 30
                 {
25 31
                   title: t('authentication.stepsTitle1'),
26 32
                 },
@@ -43,12 +49,27 @@ export default (props) => {
43 49
         <div style={{ flex: 1.5 }}>
44 50
           {
45 51
             index === 0 && (
46
-              <FoundationInfo index={index} setIndex={setIndex} />
52
+              <Authentication index={index} setIndex={setIndex} />
47 53
             )
48
-          },
54
+          }
49 55
           {
50 56
             index === 1 && (
51
-              <DirectorInfo />
57
+              <FoundationInfo index={index} setIndex={setIndex} />
58
+            )
59
+          }
60
+          {
61
+            index === 2 && (
62
+              <DirectorInfo index={index} setIndex={setIndex} />
63
+            )
64
+          }
65
+          {
66
+            index === 3 && (
67
+              <EveryoneInfo index={index} setIndex={setIndex} />
68
+            )
69
+          }
70
+          {
71
+            index === 4 && (
72
+              <FaceRecognition index={index} setIndex={setIndex} />
52 73
             )
53 74
           }
54 75
         </div>

+ 7
- 1
src/pages/authentication/style.less 查看文件

@@ -13,7 +13,7 @@
13 13
     display: flex;
14 14
     justify-content: center;
15 15
     align-items: center;
16
-    border: 1px dashed;
16
+    border: 1px dashed #1890ff;
17 17
     display: 1;
18 18
     flex: 0.8;
19 19
   }
@@ -27,4 +27,10 @@
27 27
     width: 600px;
28 28
     background-color: #bfbfbf;
29 29
   }
30
+  .face-recognition-box {
31
+    display: flex;
32
+    align-items: center;
33
+    background-color: rgba(191, 191, 191, 0.1);
34
+    padding: 24px;
35
+  }
30 36
 }

+ 1
- 1
src/pages/firstPage/components/DetailedPlan.jsx 查看文件

@@ -89,7 +89,7 @@ export default (props) => {
89 89
                   <div className="title">实时互转</div>
90 90
                   <div style={{ height: "12px" }}></div>
91 91
                   <div className="nicety">
92
-                    <div>无额外成本,0费用完成Qbit账户间互转。</div>
92
+                    <div>无额外成本,0费用完成快云账户间互转。</div>
93 93
                     <div>不必提现,实时收付境内外供应商费用。</div>
94 94
                   </div>
95 95
                 </div>

+ 10
- 3
src/pages/firstPage/components/InWebsite.jsx 查看文件

@@ -1,13 +1,20 @@
1 1
 import { ContainerOutlined } from "@ant-design/icons";
2
+import { useNavigate } from "react-router-dom";
2 3
 import React from "react";
3 4
 export default (props) => {
4
-  const onLogin=()=>{}
5
-  const onRegister=()=>{}
5
+  const navigate = useNavigate();
6
+
7
+  const onLogin = () => {
8
+    navigate(`/qLogin`)
9
+  }
10
+  const onRegister = () => {
11
+    navigate(`/qRegister`)
12
+  }
6 13
   return (
7 14
     <div className="InWebsite">
8 15
       <ContainerOutlined />
9 16
       <div onClick={onLogin}>登录</div>
10
-      <div className="flicker"  onClick={onRegister}>
17
+      <div className="flicker" onClick={onRegister}>
11 18
         <span >注册</span>
12 19
       </div>
13 20
     </div>

+ 12
- 9
src/pages/qLogin/QLogin.jsx 查看文件

@@ -1,5 +1,5 @@
1 1
 import React, { useEffect, useState } from "react";
2
-import { useNavigate } from "react-router-dom";
2
+import { useNavigate, useParams } from "react-router-dom";
3 3
 import md5 from "md5";
4 4
 import { Button, Form, Input, Radio, Select, Row, Col, message } from "antd";
5 5
 import { login } from "@/services/login";
@@ -10,17 +10,19 @@ export default (props) => {
10 10
   const [loading, setLoading] = React.useState(false);
11 11
 
12 12
   const [form] = Form.useForm();
13
+
13 14
   const onFinish = (values) => {
15
+
14 16
     setLoading(true);
15 17
     login({
16 18
       loginName: values.loginName,
17
-      loginType: "platform.pc",
19
+      loginType: "admin.pc",
18 20
       password: md5(values.password),
19 21
     })
20 22
       .then((res) => {
21 23
         setLoading(true);
22 24
         try {
23
-          navigate("/authentication");
25
+          navigate('/authentication');
24 26
         } catch (e) {
25 27
           message.error(e);
26 28
         }
@@ -36,7 +38,7 @@ export default (props) => {
36 38
 
37 39
   return (
38 40
     <div className="qlogin-right-box">
39
-      <div className="qlogin-right-title">登录你的Qbit账户</div>
41
+      <div className="qlogin-right-title">登录你的快云账户</div>
40 42
       <Form
41 43
         form={form}
42 44
         layout="vertical"
@@ -44,11 +46,11 @@ export default (props) => {
44 46
         onFinish={onFinish}
45 47
       >
46 48
         <Form.Item
47
-          label="手机号"
49
+          label="登录名"
48 50
           name="loginName"
49
-        // rules={[{ required: true }]}
51
+          rules={[{ required: true }]}
50 52
         >
51
-          <Input.Group>
53
+          {/* <Input.Group>
52 54
             <Row>
53 55
               <Col span={8}>
54 56
                 <Select defaultValue="+86">
@@ -58,7 +60,8 @@ export default (props) => {
58 60
               </Col>
59 61
               <Col span={16}><Input placeholder="请输入手机号" /></Col>
60 62
             </Row>
61
-          </Input.Group>
63
+          </Input.Group> */}
64
+          <Input placeholder="请输入登录名" />
62 65
         </Form.Item>
63 66
         <Form.Item
64 67
           label="密 码"
@@ -82,7 +85,7 @@ export default (props) => {
82 85
         </Form.Item>
83 86
       </Form>
84 87
       <div style={{ display: 'flex', alignItems: 'center' }}>
85
-        <div>还没有Qbit账户?</div><Button type="link" onClick={() => navigate('/qRegister')}>立即注册</Button>
88
+        <div>还没有快云账户?</div><Button type="link" onClick={() => navigate('/qRegister')}>立即注册</Button>
86 89
       </div>
87 90
     </div>
88 91
   )

+ 50
- 15
src/pages/qRegister/QRegister.jsx 查看文件

@@ -1,20 +1,48 @@
1
-import React, { useEffect } from "react";
1
+import React, { useEffect, useRef, useState } from "react";
2 2
 import { useNavigate } from "react-router-dom";
3
-import { Button, Form, Input, Radio, Select, Row, Col, Checkbox } from "antd";
3
+import {
4
+  ProForm,
5
+  ProFormText,
6
+  ProFormDependency,
7
+} from "@ant-design/pro-components";
8
+import { Button, Form, Input, Radio, Select, Row, Col, Checkbox, message } from "antd";
9
+import { register } from "@/services/login";
4 10
 import "./style.less";
5 11
 
6 12
 export default (props) => {
7 13
   const navigate = useNavigate();
8
-
14
+  const [loading, setLoading] = useState(false);
9 15
   const { Search } = Input;
10 16
   const [form] = Form.useForm();
11
-  const onFinish = () => {
17
+  const formRef = useRef();
18
+
19
+  const onFinish = (values) => {
20
+    setLoading(true);
21
+    register({
22
+      userName: values.userName,
23
+      loginType: "platform.pc",
24
+      password: values.password,
25
+      phone: values.phone
26
+    })
27
+      .then((res) => {
28
+        setLoading(true);
29
+        try {
30
+          navigate("/qLogin");
31
+        } catch (e) {
32
+          message.error(e);
33
+        }
34
+        setLoading(false);
35
+      })
36
+      .catch((err) => {
37
+        setLoading(false);
38
+      });
12 39
 
40
+    setLoading(false);
13 41
   }
14 42
 
15 43
   return (
16 44
     <div className="qregister-right-box">
17
-      <div className="qregister-right-title">开通Qbit账户</div>
45
+      <div className="qregister-right-title">开通快云账户</div>
18 46
       <div style={{ display: 'flex', alignItems: 'center', marginBottom: '40px' }}>
19 47
         <div>已有账户?</div><Button type="link" onClick={() => navigate('/qLogin')}>去登陆</Button>
20 48
       </div>
@@ -25,11 +53,17 @@ export default (props) => {
25 53
         onFinish={onFinish}
26 54
       >
27 55
         <Form.Item
28
-          label="手机号"
29
-          name="loginName"
56
+          label="用户名(选填)"
57
+          name="userName"
58
+        >
59
+          <Input placeholder="请输入用户名" />
60
+        </Form.Item>
61
+        <Form.Item
62
+          label="手机号(账户)"
63
+          name="phone"
30 64
           rules={[{ required: true }]}
31 65
         >
32
-          <Input.Group>
66
+          {/*<Input.Group>
33 67
             <Row>
34 68
               <Col span={8}>
35 69
                 <Select defaultValue="+86">
@@ -39,10 +73,11 @@ export default (props) => {
39 73
               </Col>
40 74
               <Col span={16}><Input placeholder="请输入手机号" /></Col>
41 75
             </Row>
42
-          </Input.Group>
76
+          </Input.Group> */}
77
+          <Input placeholder="请输入手机号" />
43 78
         </Form.Item>
44 79
 
45
-        <Form.Item
80
+        {/* <Form.Item
46 81
           label="验证码"
47 82
           name="loginName"
48 83
           rules={[{ required: true }]}
@@ -55,7 +90,7 @@ export default (props) => {
55 90
               <Col span={9}><Button type="primary">获取验证码</Button></Col>
56 91
             </Row>
57 92
           </Input.Group>
58
-        </Form.Item>
93
+        </Form.Item> */}
59 94
         <Form.Item
60 95
           label="设置密码"
61 96
           name="password"
@@ -66,7 +101,7 @@ export default (props) => {
66 101
             style={{ borderRadius: "4px" }}
67 102
           />
68 103
         </Form.Item>
69
-        <Form.Item
104
+        {/* <Form.Item
70 105
           label="确认密码"
71 106
           name="password"
72 107
           rules={[{ required: true }]}
@@ -75,16 +110,16 @@ export default (props) => {
75 110
             placeholder="请再次输入密码"
76 111
             style={{ borderRadius: "4px" }}
77 112
           />
78
-        </Form.Item>
113
+        </Form.Item> */}
79 114
         <Form.Item
80 115
           label="微信号(选填)"
81
-          name="loginName"
116
+          name="wxId"
82 117
         >
83 118
           <Input placeholder="请输入微信号/手机号" style={{ borderRadius: "4px" }} />
84 119
         </Form.Item>
85 120
         <Form.Item
86 121
           label="邀请码(选填)"
87
-          name="loginName"
122
+          name="ycCode"
88 123
         >
89 124
           <Input placeholder="若有,请输入邀请码" style={{ borderRadius: "4px" }} />
90 125
         </Form.Item>

+ 10
- 6
src/routes/routes.jsx 查看文件

@@ -43,9 +43,13 @@ import QRegister from "@/pages/qRegister/index";
43 43
 
44 44
 export const authRoutes = [
45 45
   {
46
-    // index: true,
47
-    element: <Navigate to="/homepage" />,
46
+    index: true,
47
+    element: <Navigate to="/authentication" />,
48 48
   },
49
+  // {
50
+  //   path: "/qLogin",
51
+  //   element: <QLogin />,
52
+  // },
49 53
   // 实名认证流程
50 54
   {
51 55
     path: "/authentication",
@@ -198,10 +202,10 @@ export const defaultRoutes = [
198 202
     element: <QLogin />,
199 203
   },
200 204
   // q注册页
201
-  // {
202
-  //   path: "/qRegister",
203
-  //   element: <QRegister />,
204
-  // },
205
+  {
206
+    path: "/qRegister",
207
+    element: <QRegister />,
208
+  },
205 209
   // {
206 210
   //   path: "/login",
207 211
   //   element: <Login />,

+ 18
- 0
src/services/login.js 查看文件

@@ -6,12 +6,30 @@ import request from "@/utils/request";
6 6
 export const changePassword = (data) =>
7 7
   request(`/change-password`, { data, method: "put" });
8 8
 
9
+/*
10
+ * 修改手机号
11
+ */
12
+export const changePhone = (data) =>
13
+  request(`/change-phone`, { data, method: "put" });
14
+
15
+/*
16
+ * 修改邮箱
17
+ */
18
+export const changeEmail = (data) =>
19
+  request(`/change-email`, { data, method: "put" });
20
+
9 21
 /*
10 22
  * 后台登录
11 23
  */
12 24
 export const login = (data) =>
13 25
   request("/login", { data, method: "post" });
14 26
 
27
+/*
28
+* 后台注册
29
+*/
30
+export const register = (data) =>
31
+  request("/register", { data, method: "post" });
32
+
15 33
 /*
16 34
 * 登出
17 35
 */

+ 17
- 16
src/store/models/user.js 查看文件

@@ -4,7 +4,7 @@ import { getMenuItems } from "@/routes/menus";
4 4
 import { currentUser } from "@/services/login";
5 5
 import { getAuthedRoutes } from "@/routes/permissions";
6 6
 
7
-export default function useUser() {
7
+export default function useUser () {
8 8
   const [user, setUser] = useState(null);
9 9
   const menusRef = useRef();
10 10
   const routesRef = useRef();
@@ -12,22 +12,23 @@ export default function useUser() {
12 12
 
13 13
   const getCurrentUser = () =>
14 14
     new Promise((resolve, reject) => {
15
-      console.log(1);
16
-      // currentUser()
17
-      //   .then((res) => {
15
+      // console.log(1);
16
+      currentUser()
17
+        .then((res) => {
18 18
 
19
-      // dbMenusRef.current = res?.menuList || [];
20
-      // const permissions = dbMenusRef.current.map((x) => x.menuCode);
21
-      // authRoutes 是所有待验证授权的路由
22
-      // authedRoutes 是已经被授权的路由
23
-      const authedRoutes = getAuthedRoutes(authRoutes, []);
24
-      console.log(authedRoutes);
25
-      menusRef.current = getMenuItems(authedRoutes);
26
-      routesRef.current = mergeAuthRoutes(defaultRoutes, authedRoutes);
27
-      setUser({ userId: 2 });
28
-      resolve({ userId: 2 });
29
-      // })
30
-      // .catch(reject);
19
+          dbMenusRef.current = res?.menuList || [];
20
+          const permissions = dbMenusRef.current.map((x) => x.menuCode);
21
+          // authRoutes 是所有待验证授权的路由
22
+          // authedRoutes 是已经被授权的路由
23
+          const authedRoutes = getAuthedRoutes(authRoutes, permissions || []);
24
+          // console.log(authedRoutes);
25
+          menusRef.current = getMenuItems(authedRoutes);
26
+          routesRef.current = mergeAuthRoutes(defaultRoutes, authedRoutes);
27
+          setUser(res);
28
+          // { userId: 2 }
29
+          resolve();
30
+        })
31
+        .catch(reject);
31 32
     });
32 33
 
33 34
   return {