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,14 +31,8 @@ class Index extends Component {
componentWillUnmount() { componentWillUnmount() {
clearInterval(this.timeRef); clearInterval(this.timeRef);
}
componentWillReceiveProps(nextProps, nextContext) {
if (nextProps.visible !== this.props.visible && !nextProps.visible) {
clearInterval(this.timeRef);
this.setState({ captcha: "", time: 60 }); this.setState({ captcha: "", time: 60 });
} }
}
handleSendCaptcha = () => { handleSendCaptcha = () => {
sendMobileCode({ id: this.props.id }).then(({ status, data }) => { sendMobileCode({ id: this.props.id }).then(({ status, data }) => {

View File

@ -153,6 +153,8 @@ 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())}/>}
{/*发送验证码*/} {/*发送验证码*/}
{
captchaVisible &&
<CaptchaModal <CaptchaModal
visible={captchaVisible} id={getQueryString("id")} visible={captchaVisible} id={getQueryString("id")}
onCancel={() => this.setState({ captchaVisible: false })} onCancel={() => this.setState({ captchaVisible: false })}
@ -161,6 +163,7 @@ export default class MobilePayroll extends React.Component {
this.getMySalaryBill(getQueryString("id")); this.getMySalaryBill(getQueryString("id"));
}} }}
/> />
}
</React.Fragment>; </React.Fragment>;
const { const {
salaryTemplate, salaryGroups, employeeInformation, sendTime, confirmStatus, showAck, showFeedback salaryTemplate, salaryGroups, employeeInformation, sendTime, confirmStatus, showAck, showFeedback