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

+ 6
- 3
src/pages/authentication/components/FaceRecognition.jsx 查看文件

@@ -17,11 +17,13 @@ import FaceRecognitionModal from "./FaceRecognitionModal";
17 17
 import "../style.less";
18 18
 import { getTaCompanyLegalItemAllCompany } from "@/services/taCompanyLegalItem";
19 19
 import FaceAuthenticationList from "./FaceAuthenticationList";
20
+import FaceRecognitionModalTip from "./FaceRecognitionModalTip";
20 21
 
21 22
 export default (props) => {
22 23
   const { t } = useTranslation();
23 24
   const [open, setOpen] = useState(false);
24 25
   const [itemIdentify, setItemIdentify] = useState(false);
26
+  const [tip, setTip] = useState(false);
25 27
 
26 28
   const onOpen = (item) => {
27 29
     setItemIdentify(item)
@@ -34,7 +36,7 @@ export default (props) => {
34 36
       .then((res) => {
35 37
         setList(res);
36 38
       })
37
-      .catch((err) => {});
39
+      .catch((err) => { });
38 40
   }, []);
39 41
 
40 42
   return (
@@ -56,11 +58,12 @@ export default (props) => {
56 58
         >
57 59
           {t("authentication.FaceRecognitionContent2")}
58 60
         </div>
59
-        <Button size="large" style={{ width: "6vw" }}>
61
+        <Button size="large" style={{ width: "6vw" }} onClick={() => setTip(true)}>
60 62
           {t("authentication.FaceRecognitionBtn2")}
61 63
         </Button>
62 64
       </Card>
63
-      <FaceRecognitionModal  itemIdentify={itemIdentify}open={open} setOpen={setOpen} />
65
+      <FaceRecognitionModal itemIdentify={itemIdentify} open={open} setOpen={setOpen} />
66
+      <FaceRecognitionModalTip tip={tip} setTip={setTip} />
64 67
     </>
65 68
   );
66 69
 };

+ 43
- 0
src/pages/authentication/components/FaceRecognitionModalTip.jsx 查看文件

@@ -0,0 +1,43 @@
1
+import React from "react";
2
+import { Modal, Statistic, Button } from "antd";
3
+import {
4
+  InfoCircleTwoTone
5
+} from '@ant-design/icons';
6
+import { useTranslation } from "react-i18next";
7
+
8
+export default (props) => {
9
+  const { tip, setTip } = props;
10
+  const { t } = useTranslation();
11
+
12
+  return (
13
+    <Modal
14
+      title={
15
+        <div style={{ textAlign: "center", fontSize: '20px', fontWeight: 'bold' }}>Tips</div>
16
+      }
17
+      open={tip}
18
+      // onOk={props.onOk}
19
+      onCancel={() => setTip(false)}
20
+      footer={
21
+        <div style={{ textAlign: "center" }}>
22
+          <Button size="large" onClick={() => setTip(false)} style={{ width: '6vw' }}>CanCel</Button>
23
+          <Button
24
+            size="large"
25
+            type="primary"
26
+            style={{ width: '6vw', marginLeft: '3vw' }}
27
+            onClick={() => setTip(false)}
28
+          >确认</Button>
29
+        </div>
30
+      }
31
+    >
32
+      <div style={{ textAlign: "center" }}><InfoCircleTwoTone twoToneColor="#ffac00" style={{ fontSize: '48px' }} /></div>
33
+      <div style={{ fontWeight: 'bold', marginTop: '1em' }}>请检查是否是以下情况导致核验失败:</div>
34
+      <div>您拍摄的人像不清晰或不完整</div>
35
+      <div>您在拍摄时光线过暗</div>
36
+      <div>您在拍摄时未正视摄像头</div>
37
+      <div>您在拍摄时距离摄像头过远或过近</div>
38
+      <div>您在拍摄时佩戴了帽子或眼镜</div>
39
+      <div>您的网络环境较差</div>
40
+      <div style={{ fontWeight: 'bold' }}>若非以上原因导致的核验失败请联系客服</div>
41
+    </Modal>
42
+  )
43
+}

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

@@ -11,7 +11,7 @@ import "./style.less";
11 11
 
12 12
 export default (props) => {
13 13
   const { t } = useTranslation();
14
-  const [index, setIndex] = useState(3);
14
+  const [index, setIndex] = useState(0);
15 15
   return (
16 16
     <Page>
17 17
       <div className="authentication-box">