feature/2.19.1.2501.01-验证码验证

This commit is contained in:
lys 2025-04-25 15:58:01 +08:00
parent 04b3415353
commit abbf593c99
2 changed files with 12 additions and 15 deletions

View File

@ -31,13 +31,7 @@ class Index extends Component {
componentWillUnmount() { componentWillUnmount() {
clearInterval(this.timeRef); clearInterval(this.timeRef);
} this.setState({ captcha: "", time: 60 });
componentWillReceiveProps(nextProps, nextContext) {
if (nextProps.visible !== this.props.visible && !nextProps.visible) {
clearInterval(this.timeRef);
this.setState({ captcha: "", time: 60 });
}
} }
handleSendCaptcha = () => { handleSendCaptcha = () => {

View File

@ -153,14 +153,17 @@ export default class MobilePayroll extends React.Component {
{pwdSetVisible && <SecondarypwdVerify {...this.props} salaryBillToken={this.state.salaryBillToken} {pwdSetVisible && <SecondarypwdVerify {...this.props} salaryBillToken={this.state.salaryBillToken}
onSuccess={() => this.setState({ pwdSetVisible: false }, () => this.initMobile())}/>} onSuccess={() => this.setState({ pwdSetVisible: false }, () => this.initMobile())}/>}
{/*发送验证码*/} {/*发送验证码*/}
<CaptchaModal {
visible={captchaVisible} id={getQueryString("id")} captchaVisible &&
onCancel={() => this.setState({ captchaVisible: false })} <CaptchaModal
onConfirm={() => { visible={captchaVisible} id={getQueryString("id")}
setInitEmVerify(); onCancel={() => this.setState({ captchaVisible: false })}
this.getMySalaryBill(getQueryString("id")); onConfirm={() => {
}} setInitEmVerify();
/> this.getMySalaryBill(getQueryString("id"));
}}
/>
}
</React.Fragment>; </React.Fragment>;
const { const {
salaryTemplate, salaryGroups, employeeInformation, sendTime, confirmStatus, showAck, showFeedback salaryTemplate, salaryGroups, employeeInformation, sendTime, confirmStatus, showAck, showFeedback