From 31b550d5f559d65984fdd063d9d016ba4c8e4d7a Mon Sep 17 00:00:00 2001 From: lijiwen <961370825@qq.com> Date: Thu, 14 Nov 2024 15:27:06 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=BC=A5=E5=8B=92=E7=99=BB=E5=BD=95?= =?UTF-8?q?=E9=A1=B5=E5=A2=9E=E5=8A=A0=E9=AA=8C=E8=AF=81=E7=A0=81=E7=99=BB?= =?UTF-8?q?=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/user/login/components/Login/map.js | 2 +- src/pages/user/login/login.js | 2 +- .../template/project/miLe/images/validate.png | Bin 0 -> 530 bytes .../user/login/template/project/miLe/index.js | 6 ++++-- .../user/login/template/project/miLe/index.less | 12 ++++++++++++ .../login/template/project/miLe/useAccount.js | 4 +++- 6 files changed, 21 insertions(+), 5 deletions(-) create mode 100644 src/pages/user/login/template/project/miLe/images/validate.png diff --git a/src/pages/user/login/components/Login/map.js b/src/pages/user/login/components/Login/map.js index de819aa4..21af6ff1 100644 --- a/src/pages/user/login/components/Login/map.js +++ b/src/pages/user/login/components/Login/map.js @@ -130,7 +130,7 @@ export default { rules: [ { required: true, - message: '璇疯緭鍏ラ獙璇佺爜', + message: '璇疯緭鍏ラ獙璇佺爜!', }, ], }, diff --git a/src/pages/user/login/login.js b/src/pages/user/login/login.js index d989a7b8..6ee3e8ed 100644 --- a/src/pages/user/login/login.js +++ b/src/pages/user/login/login.js @@ -1564,7 +1564,7 @@ class Login { loginHandlerValidate(user, pwd, userPhone, isRememberPWD, ref, validateCode = '') { const self = this; - if(this.globalConfig?.isVerification == 1) return self.loginValidate(user, pwd, userPhone, isRememberPWD, SERVICE_APP_LOGIN_MODE.password, validateCode); + if((this.globalConfig?.isVerification || 0) * 1 === 1) return self.loginValidate(user, pwd, userPhone, isRememberPWD, SERVICE_APP_LOGIN_MODE.password, validateCode); if (user && pwd) { if (self.loginFailed && self.captchaObj) { self.captchaObj.verify(); diff --git a/src/pages/user/login/template/project/miLe/images/validate.png b/src/pages/user/login/template/project/miLe/images/validate.png new file mode 100644 index 0000000000000000000000000000000000000000..451bd4175ae61d6ac90a3f4351f4a2c305067847 GIT binary patch literal 530 zcmV+t0`2{YP)<h;3K|Lk000e1NJLTq000yK000&U1^@s6z(KqQ0005mNkl<ZIE}59 zJxEqz6vuzpKA<IsAgG|Fu)#qw0-<oQEhDH&1M_CkXubDDQ)3N*_XrX6v2>&wA{Rj# zLNG;akO(mX!No~(s)i&4-+1D@ak=lkex!f6!*iZ<ew_21^W2BsRup*EYPA#_C+TtE z3GfBDXDVxDzEKpF1LGv!58MRq1C4H;18$qjhb;l)By9lB09Sxs;7Ca_v%o80)Kr%0 zfPIz0yTEziG;nB}$GQl71|AO&-I?0!#)sR4WOdTNkj#mO9f0!M6V^Kcegl5xjsFV_ zT|Na|-woh9pbJ>@vDy?^0j_yKUT=ZRz&_x;PsXOe@22t+xC*Ri>@R>GAM#1yY*G3( z;Bv<HJWkR}rZVE02IwQ;25=OZ0a^-JD_P)7W+Rj{5+`Y=sk{c-P30EQ1bp<FE7Eip zXgP-f9dqbxoTP0YaI6FtG)(Pp(^nacJj?c+(<<=P%RRUO?2V~(hr9eYLsO}G&}z={ zfOmZ(SQzku+TvfAP35b1alJIOUg4&6naWBX(4nJ1f5{By^%J;gDxb3Ux;ZqJaJUz| zlrk*<=S*cH?@)O4Ol2Hs2A%=GGh07^2SBT-%ooLO<xM#Zboen$m`W(MP*D`|2cT(# U)a&P~G5`Po07*qoM6N<$f)Cs7ZU6uP literal 0 HcmV?d00001 diff --git a/src/pages/user/login/template/project/miLe/index.js b/src/pages/user/login/template/project/miLe/index.js index 24f56fa0..ff51bfef 100644 --- a/src/pages/user/login/template/project/miLe/index.js +++ b/src/pages/user/login/template/project/miLe/index.js @@ -26,6 +26,7 @@ const renderQRCode = props => { }; const MiLeLogin = forwardRef((props, _ref) => { + const isValidate = (window?.globalConfig?.isVerification || 0) * 1 === 1; const sliVerify = useRef(); const loginFormRef = useRef(); const formRef = useRef(null); @@ -46,12 +47,13 @@ const MiLeLogin = forwardRef((props, _ref) => { /* eslint-disable */ action && (type === 'Account' - ? action.loginHandler( + ? action.loginHandlerValidate( values.userName, values.password, null, autoLogin, sliVerify, + values?.validate, ) : type === 'Mobile' ? action.phoneLoginFormHandler(values.mobile, values.captcha) @@ -118,7 +120,7 @@ const MiLeLogin = forwardRef((props, _ref) => { updateLoginMode: props.updateLoginMode, welcome: null, }; - return <Account {...params} />; + return <Account {...params} isValidate={isValidate} />; }; const handleWeek = () => { diff --git a/src/pages/user/login/template/project/miLe/index.less b/src/pages/user/login/template/project/miLe/index.less index 1ddcb8f6..23cb51d4 100644 --- a/src/pages/user/login/template/project/miLe/index.less +++ b/src/pages/user/login/template/project/miLe/index.less @@ -28,6 +28,18 @@ .panda-console-base-form-item{ margin-bottom: 30px; } + + .panda-console-base-input-affix-wrapper { + border-radius: 5px !important; + padding: 4px 11px !important; + } + + .panda-console-basesrc-pages-user-login-components-login-index-validate_img { + height: 47.5px !important; + width: 102px !important; + border-radius: 5px !important; + } + .panda-console-base-form-item-control-input-content { &>span { border-radius: 5px !important; diff --git a/src/pages/user/login/template/project/miLe/useAccount.js b/src/pages/user/login/template/project/miLe/useAccount.js index e5f011b3..213490a6 100644 --- a/src/pages/user/login/template/project/miLe/useAccount.js +++ b/src/pages/user/login/template/project/miLe/useAccount.js @@ -5,9 +5,10 @@ import LoginForm from '../../../components/Login'; import LoginMessage from '../../../js/loginMessage'; import passwordIcon from './images/password.png'; import userIcon from './images/user.png'; +import validateIcon from './images/validate.png'; /* eslint-disable */ -const { UserName, Password, Submit } = LoginForm; +const { UserName, Password, Validate, Submit } = LoginForm; const useAccount = props => ( <LoginForm onSubmit={props.onSubmit} welcome={props.welcome}> {props.status === 'error' && props.type === 'account' && !props.submitting && ( @@ -47,6 +48,7 @@ const useAccount = props => ( ]} prefix={<img src={passwordIcon}/>} /> + {props?.isValidate ? <Validate name="validate" prefix={<img src={validateIcon}/>} /> : null} <div> <Checkbox checked={props.autoLogin} -- 2.17.1