From f2027627f4bc7be765c8a3c6a7fe66b6c1662f75 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=8E=E6=B0=B8=E9=A1=BA?= <971387674@qq.com> Date: Thu, 12 Oct 2023 14:08:48 +0800 Subject: [PATCH] hotfix/2.9.42310.01 --- .../hrmSalary/pages/mobilePayroll/index.js | 30 +++++++++++++++---- 1 file changed, 24 insertions(+), 6 deletions(-) diff --git a/pc4mobx/hrmSalary/pages/mobilePayroll/index.js b/pc4mobx/hrmSalary/pages/mobilePayroll/index.js index bd152a29..69329ae3 100644 --- a/pc4mobx/hrmSalary/pages/mobilePayroll/index.js +++ b/pc4mobx/hrmSalary/pages/mobilePayroll/index.js @@ -54,9 +54,7 @@ export default class MobilePayroll extends React.Component { initMobile = async () => { const { mySalaryStore: { setInitEmVerify } } = this.props; - const params = this.getUrlkey(); - const { data } = await salaryBillGetToken({ uid: _.pick(params, ["recipient"]).recipient }); - this.setState({ salaryBillToken: data }, () => { + if (window.em) { API.isNeedSecondPwdVerify({ mouldCode: "HRM", itemCode: "SALARY" }, this.state.salaryBillToken) .then(({ status, isNeedSecondAuth }) => { if (status && isNeedSecondAuth) { @@ -71,7 +69,26 @@ export default class MobilePayroll extends React.Component { setInitEmVerify(); } }); - }); + } else { + const params = this.getUrlkey(); + const { data } = await salaryBillGetToken({ uid: _.pick(params, ["recipient"]).recipient }); + this.setState({ salaryBillToken: data }, () => { + API.isNeedSecondPwdVerify({ mouldCode: "HRM", itemCode: "SALARY" }, this.state.salaryBillToken) + .then(({ status, isNeedSecondAuth }) => { + if (status && isNeedSecondAuth) { + this.setState({ visible: true }, () => { + API.getSecondAuthForm({ mouldCode: "HRM", itemCode: "SALARY" }, this.state.salaryBillToken) + .then(({ status, notSetting }) => { + this.setState({ notSetting }); + }); + }); + } else { + this.getMySalaryBill(getQueryString("id")); + setInitEmVerify(); + } + }); + }); + } }; doSecondAuth = () => { const { salaryBillToken } = this.state; @@ -143,7 +160,7 @@ export default class MobilePayroll extends React.Component { const { salaryTemplate } = mySalaryBillData; const { feedbackUrl } = salaryTemplate; this.getMySalaryBill(getQueryString("id")); - window.location.href=`${window.ecologyContentPath || ""}${feedbackUrl}` + window.location.href = `${window.ecologyContentPath || ""}${feedbackUrl}`; // window.open(`${window.ecologyContentPath || ""}${feedbackUrl}`); } else { message.error(errorMsg); @@ -174,7 +191,8 @@ export default class MobilePayroll extends React.Component { ]} > - this.setState({ authCode })}/> + this.setState({ authCode })}/> { notSetting &&