/* * 二次验证 * 登录密码验证 * @Author: 黎永顺 * @Date: 2025/4/23 * @Wechat: * @Email: 971387674@qq.com * @description: */ import React, { Component } from "react"; import { WeaDialog, WeaLocaleProvider } from "ecCom"; import { WeaForm } from "comsMobx"; import { Button } from "antd"; import FormInfo from "../../components/FormInfo"; import { loginCondition } from "./pwdCondtion"; import { RSAEcrypt } from "../../util/RSAUtil"; import * as API from "../../apis/mySalaryBenefits"; const form = new WeaForm(); const getLabel = WeaLocaleProvider.getLabel; class LoginVerifyPC extends Component { constructor(props) { super(props); this.state = { loading: false }; } componentWillReceiveProps(nextProps, nextContext) { if (nextProps.visible !== this.props.visible && nextProps.visible) { form.initFormFields(loginCondition); } else { form.resetForm(); } } save = async () => { form.validateForm().then(f => { if (f.isValid) { RSAEcrypt("1", { ...form.getFormParams() }, this.props.salaryBillToken) .then(RSAParam => { API.checkPassword({ ...RSAParam }).then(({ result }) => { if (result) { this.props.onCancel(); this.props.onSetPwdSet(); } else { form.showError("password", getLabel(504343, "登录密码错误")); } }); }); } else { f.showErrors(); } }); }; render() { const { loading } = this.state; return ( (pre += cur.items.length), 0) * 47 + 33 }} initLoadCss title={getLabel(111, "请先输入登录密码")} buttons={[ ]}> ); } } export default LoginVerifyPC;