Commit 31b550d5 authored by 李纪文's avatar 李纪文

feat: 弥勒登录页增加验证码登录

parent cb0faf13
Pipeline #93904 waiting for manual action with stages
......@@ -130,7 +130,7 @@ export default {
rules: [
{
required: true,
message: '请输入验证码',
message: '请输入验证码!',
},
],
},
......
......@@ -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();
......
This diff was suppressed by a .gitattributes entry.
......@@ -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 = () => {
......
......@@ -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;
......
......@@ -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}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment