diff --git a/pc4mobx/hrmSalary/components/captchaModal/index.js b/pc4mobx/hrmSalary/components/captchaModal/index.js index 1ae52279..87da6745 100644 --- a/pc4mobx/hrmSalary/components/captchaModal/index.js +++ b/pc4mobx/hrmSalary/components/captchaModal/index.js @@ -31,13 +31,7 @@ class Index extends Component { componentWillUnmount() { 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 = () => { diff --git a/pc4mobx/hrmSalary/pages/mobilePayroll/index.js b/pc4mobx/hrmSalary/pages/mobilePayroll/index.js index 2c429758..47c46604 100644 --- a/pc4mobx/hrmSalary/pages/mobilePayroll/index.js +++ b/pc4mobx/hrmSalary/pages/mobilePayroll/index.js @@ -153,14 +153,17 @@ export default class MobilePayroll extends React.Component { {pwdSetVisible && this.setState({ pwdSetVisible: false }, () => this.initMobile())}/>} {/*发送验证码*/} - this.setState({ captchaVisible: false })} - onConfirm={() => { - setInitEmVerify(); - this.getMySalaryBill(getQueryString("id")); - }} - /> + { + captchaVisible && + this.setState({ captchaVisible: false })} + onConfirm={() => { + setInitEmVerify(); + this.getMySalaryBill(getQueryString("id")); + }} + /> + } ; const { salaryTemplate, salaryGroups, employeeInformation, sendTime, confirmStatus, showAck, showFeedback