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
this.setState({ pwdSetVisible: false })}/> + {/*领悦二开*/} +
; const { salaryTemplate, salaryGroups, employeeInformation,