From 7ceb7df124939fb1a75db402be307d0908ac64a9 Mon Sep 17 00:00:00 2001 From: lys <971387674@qq.com> Date: Fri, 14 Mar 2025 10:05:36 +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 --- pc4mobx/hrmSalary/apis/payroll.js | 7 ++++--- pc4mobx/hrmSalary/pages/mobilePayroll/index.js | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/pc4mobx/hrmSalary/apis/payroll.js b/pc4mobx/hrmSalary/apis/payroll.js index cdf02662..5ff802bf 100644 --- a/pc4mobx/hrmSalary/apis/payroll.js +++ b/pc4mobx/hrmSalary/apis/payroll.js @@ -206,12 +206,13 @@ export const sendMobileCode = (params) => { return postFetch("/api/bs/hrmsalary/salaryBill/sendMobileCode", params); }; //工资单-验证方式 -export const payrollCheckType = header => { - return fetch(`/api/bs/hrmsalary/salaryBill/payrollCheckType`, { +export const payrollCheckType = async header => { + const res = await fetch(`/api/bs/hrmsalary/salaryBill/payrollCheckType`, { method: "GET", mode: "cors", headers: { "Content-Type": "application/json", ...header } - }).then(res => res.json()); + }); + return await res.json(); }; //工资单-反馈验证 export const feedBackSalaryBill = params => { diff --git a/pc4mobx/hrmSalary/pages/mobilePayroll/index.js b/pc4mobx/hrmSalary/pages/mobilePayroll/index.js index 0ff55c6e..9b7c09da 100644 --- a/pc4mobx/hrmSalary/pages/mobilePayroll/index.js +++ b/pc4mobx/hrmSalary/pages/mobilePayroll/index.js @@ -60,7 +60,7 @@ export default class MobilePayroll extends React.Component { }); this.setState({ salaryBillToken: data }, () => { //领悦二开 - payrollCheckType().then(({ data, status }) => { + payrollCheckType(this.state.salaryBillToken).then(({ data, status }) => { if (status && data === "PWD") { API.isNeedSecondPwdVerify({ mouldCode: "HRM", itemCode: "SALARY" }, this.state.salaryBillToken) .then(({ status, isNeedSecondAuth }) => {