密码验证和登陆验证

master
wuzuowei 4 months ago
parent ca09d6b427
commit a6d71bc678

@ -238,7 +238,14 @@ export async function getInitialState() {
let model = new SystemData()
let params = await model.parameters()
//console.log("params", params)
const host: string = window.location.hostname
if (host.indexOf("localhost") !== -1) {
} else {
if (window.top === window.self) {
window.location.href = 'https://metal.dayesteel.com.cn';
return;
}
}
return {
userRoutes: MicroApps.runtimes.router.routeExtends,
userInfo: userData,

@ -183,12 +183,14 @@ const ManagementAccountEditor: React.FC<IManagementAccountEditor> = (props) => {
return null
}
},
"rules": [{
// pattern: '^[A-Za-z0-9]+$',
pattern: '^[A-Za-z0-9@!-]+$',
// message: '密码只能由英文字母和数字组成'
message: '密码只能包含数字字母和@!-'
}],
// "rules": [{
// // pattern: '^[A-Za-z0-9]+$',
// // pattern: '^[A-Za-z0-9@!-]+$',
// pattern: /^[A-Za-z0-9@!-]+$/,
// // message: '密码只能由英文字母和数字组成'
// message: '密码只能包含数字字母和@!-'
// }],
"inputComponent": <Input.Password iconRender={visible => (visible ? <EyeTwoTone /> : <EyeInvisibleOutlined />)}
/>
}, {
@ -411,6 +413,7 @@ const ManagementAccountEditor: React.FC<IManagementAccountEditor> = (props) => {
console.log("submit data", subvals, values)
submitData()
}}>
<div>222222222222222222222222222222222222222</div>
<Form form={thisForm} labelCol={{ span: 6 }} wrapperCol={{ span: 18 }}>
{
userColumns.slice(1, 9).map((col: any) => (

@ -107,8 +107,8 @@ const UserManager = (props: any) => {
}
},
"rules": [{ required: true }, {
pattern: '^[A-Za-z0-9@!-]+$',
// pattern: /^[A-Za-z0-9@!-]+$/,
// pattern: '^[A-Za-z0-9@!-]+$',
pattern: /^[A-Za-z0-9@!-]+$/,
// pattern: /^(?=.*[0-9])(?=.*[!@#$%^&*])(?=.*[a-z])(?=.*[A-Z]).{8,}$/,
message: '密码只能包含数字字母和@!-'
}],

@ -53,12 +53,12 @@ const TechLoginView = () => {
} else {
message.error('获取财智系统用户信息报错!');
// window.location.href = "https://metal.dayesteel.com.cn";
window.location.href = "https://metal.dayesteel.com.cn";
}
})
.catch((reason) => {
message.error('调取财智系统用户信息报错' + reason);
// window.location.href = "https://metal.dayesteel.com.cn";
window.location.href = "https://metal.dayesteel.com.cn";
});
};
const doLogin = async (UserId: string) => {

Loading…
Cancel
Save