From abbf593c993a3de734c524247c15836dc8fc76fa Mon Sep 17 00:00:00 2001 From: lys <971387674@qq.com> Date: Fri, 25 Apr 2025 15:58:01 +0800 Subject: [PATCH] =?UTF-8?q?feature/2.19.1.2501.01-=E9=AA=8C=E8=AF=81?= =?UTF-8?q?=E7=A0=81=E9=AA=8C=E8=AF=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/captchaModal/index.js | 8 +------- .../hrmSalary/pages/mobilePayroll/index.js | 19 +++++++++++-------- 2 files changed, 12 insertions(+), 15 deletions(-) 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