From 205f0ca45a8c4a0cde931eb35249be09fac98aaf Mon Sep 17 00:00:00 2001 From: zhangzhen <525765282@qq.com> Date: Mon, 9 Jun 2025 15:34:18 +0800 Subject: [PATCH] 新增用户注册功能; --- src/components/UserRegistration/index.jsx | 78 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/components/login/Login.css | 8 ++++++++ src/components/login/Login.js | 394 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-------------------------------------------------------------------------------------------------------------------------------------------- 3 files changed, 340 insertions(+), 140 deletions(-) create mode 100644 src/components/UserRegistration/index.jsx diff --git a/src/components/UserRegistration/index.jsx b/src/components/UserRegistration/index.jsx new file mode 100644 index 0000000..3d56621 --- /dev/null +++ b/src/components/UserRegistration/index.jsx @@ -0,0 +1,78 @@ +import { ConfigProvider, Modal, Form, Input, Select } from "antd"; + +const UserRegistration = ({ _this }) => { + const { userRegisterMode } = _this.state; + if (!userRegisterMode) return ""; + + const [form] = Form.useForm(); + + const handleCancel = () => { + _this.setState({ + userRegisterMode: false, + }); + }; + + const handleOk = () => { + form.submit(); + }; + + const onFinish = values => { + console.log("=====Success:", values); + }; + + return ( + + +
+ + + + + + + + + + } placeholder={pleaseInputUserName} />)} + })( + } + placeholder={pleaseInputUserName} + /> + )} - {getFieldDecorator('password', { + {getFieldDecorator("password", { rules: [{ required: true, message: pleaseInputPassword }], - })(} type="password" placeholder={pleaseInputPassword} />)} + })( + } + type="password" + placeholder={pleaseInputPassword} + /> + )} - } + )} {/**/} {/* {getFieldDecorator('username', {*/} {/* rules: [{ required: true, message: pleaseInputUserName }],*/} @@ -427,35 +466,110 @@ class LoginForm extends Component { {/*屏蔽人脸*/} -
- +
+ { ['project.xlyprint.cn', 'localhost'].includes(location.hostname) ? ( + + ) : "" } + 普通登录 扫脸登录
+
- {xlyFootLogo && logo} - ©{Copyright} {AddrOne} - { - commonUtils.isNotEmptyArr(footer) ? ( - <> - {footer.map(item => { - const { sIcon, sLink, sName } = item; - let sPart = ''; - const sIconPart = sIcon ? : ''; - if (sLink) { - sPart = <> | {sIconPart} {sName}; - } else { - sPart = <> | {sIconPart}{sName}; - } - return sPart; - })} - - ) : <> | {AddrTwo} | {AddrThree} | {AddrFour} | {AddrFive} | {AddrSix} | {AddrSeven} | {AddrEight} | {AddrIcp} - } + {xlyFootLogo && logo}©{Copyright}{" "} + + + {AddrOne} + {" "} + + {commonUtils.isNotEmptyArr(footer) ? ( + <> + {footer.map(item => { + const { sIcon, sLink, sName } = item; + let sPart = ""; + const sIconPart = sIcon ? : ""; + if (sLink) { + sPart = ( + <> + {" "} + |{" "} + + + {" "} + {sIconPart} {sName} + + + + ); + } else { + sPart = ( + <> + {" "} + |{" "} + + {sIconPart} + {sName} + + + ); + } + return sPart; + })} + + ) : ( + <> + {" "} + |{" "} + + + {AddrTwo} + {" "} + {" "} + |{" "} + + + {AddrThree} + + {" "} + |{" "} + + + {AddrFour} + + {" "} + |{" "} + + + {AddrFive} + + {" "} + |{" "} + + + {AddrSix} + + {" "} + |{" "} + + + {AddrSeven} + + {" "} + | {AddrEight} |{" "} + + + {" "} + {AddrIcp} + + + + )} {/* ©{Copyright} {AddrOne} | {AddrTwo} | {AddrThree} | {AddrFour} | {AddrFive} | {AddrSix} | {AddrSeven} | {AddrEight} | {AddrIcp} */}
-- libgit2 0.22.2