From 33d41268472adfae4deb83e9b643c552e4a7d3ae Mon Sep 17 00:00:00 2001 From: lys <971387674@qq.com> Date: Fri, 14 Feb 2025 11:14:06 +0800 Subject: [PATCH] =?UTF-8?q?custom/=E9=A2=86=E6=82=A6=E4=B8=9A=E5=8A=A1?= =?UTF-8?q?=E7=BA=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../hrmSalary/pages/mobilePayroll/index.js | 31 ++++++++++++++++--- 1 file changed, 26 insertions(+), 5 deletions(-) diff --git a/pc4mobx/hrmSalary/pages/mobilePayroll/index.js b/pc4mobx/hrmSalary/pages/mobilePayroll/index.js index b155e6cb..b29f0c50 100644 --- a/pc4mobx/hrmSalary/pages/mobilePayroll/index.js +++ b/pc4mobx/hrmSalary/pages/mobilePayroll/index.js @@ -14,6 +14,7 @@ import PassSetDialog from "./passSetDialog"; import { ConfirmBtns } from "../mySalary/mySalaryView"; import Content from "../../components/pcTemplate/content"; import MobileTemplate from "../../components/mobileTemplate"; +import LyCheckSecondaryVerifyDialog from "../custom-pages/lingyue/components/ly_checkSecondaryVerifyDialog"; import "../mySalary/index.less"; const getLabel = WeaLocaleProvider.getLabel; @@ -33,7 +34,9 @@ export default class MobilePayroll extends React.Component { employeeInformation: {}, salaryTemplate: [] }, - salaryBillToken: {} + salaryBillToken: {}, + // 领悦二开二次验证 + LYCheckSecVerify: false }; this.id = ""; } @@ -48,7 +51,7 @@ export default class MobilePayroll extends React.Component { if (status && data === "PWD") { // init(false, () => this.getMySalaryBill(this.id)); //领悦二开 - this.initLY(); + await this.initLY(); } else { this.setState({ captchaVisible: true }); } @@ -56,8 +59,24 @@ export default class MobilePayroll extends React.Component { type === "phone" && await this.initMobile(); } - initLY = () => { - + initLY = async () => { + const params = this.getUrlkey(); + const { data } = await salaryBillGetToken({ + id: _.pick(params, ["id"]).id, + recipient: _.pick(params, ["recipient"]).recipient, + salaryCode: _.pick(params, ["salaryCode"]).salaryCode + }); + this.setState({ salaryBillToken: data }, () => { + API.isNeedSecondPwdVerify({ mouldCode: "HRM", itemCode: "SALARY" }, this.state.salaryBillToken) + .then(({ status, isNeedSecondAuth }) => { + if (status && isNeedSecondAuth) { + this.setState({ LYCheckSecVerify: true }); + } else { + this.getMySalaryBill(getQueryString("id")); + setInitEmVerify(); + } + }); + }); }; initMobile = async () => { const { mySalaryStore: { setInitEmVerify } } = this.props; @@ -183,7 +202,7 @@ export default class MobilePayroll extends React.Component { render() { const { mySalaryStore: { clearLoading, pwdForm } } = this.props; - const { mySalaryBillData, visible, captchaVisible, notSetting, pwdSetVisible } = this.state; + const { salaryBillToken, visible, captchaVisible, notSetting, pwdSetVisible, LYCheckSecVerify } = this.state; const type = getQueryString("type"); if (_.isEmpty(toJS(this.props.mySalaryStore.mySalaryBill))) return