custom/领悦业务线
This commit is contained in:
parent
88f3397ff8
commit
ce26eadb13
|
|
@ -206,8 +206,12 @@ export const sendMobileCode = (params) => {
|
|||
return postFetch("/api/bs/hrmsalary/salaryBill/sendMobileCode", params);
|
||||
};
|
||||
//工资单-验证方式
|
||||
export const payrollCheckType = params => {
|
||||
return WeaTools.callApi("/api/bs/hrmsalary/salaryBill/payrollCheckType", "GET", params);
|
||||
export const payrollCheckType = header => {
|
||||
return fetch(`/api/bs/hrmsalary/salaryBill/payrollCheckType`, {
|
||||
method: "GET",
|
||||
mode: "cors",
|
||||
headers: { "Content-Type": "application/json", ...header }
|
||||
}).then(res => res.json());
|
||||
};
|
||||
//工资单-反馈验证
|
||||
export const feedBackSalaryBill = params => {
|
||||
|
|
|
|||
|
|
@ -46,16 +46,7 @@ export default class MobilePayroll extends React.Component {
|
|||
this.id = getQueryString("id");
|
||||
const { mySalaryStore: { init, setMySalaryBill } } = this.props;
|
||||
setMySalaryBill({});
|
||||
if (type !== "phone") {
|
||||
const { data, status } = await payrollCheckType();
|
||||
if (status && data === "PWD") {
|
||||
// init(false, () => this.getMySalaryBill(this.id));
|
||||
//领悦二开
|
||||
await this.initLY();
|
||||
} else {
|
||||
this.setState({ captchaVisible: true });
|
||||
}
|
||||
}
|
||||
type !== "phone" && await this.initLY();
|
||||
type === "phone" && await this.initMobile();
|
||||
}
|
||||
|
||||
|
|
@ -68,15 +59,22 @@ export default class MobilePayroll extends React.Component {
|
|||
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();
|
||||
}
|
||||
});
|
||||
//领悦二开
|
||||
payrollCheckType().then(({ data, status }) => {
|
||||
if (status && data === "PWD") {
|
||||
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();
|
||||
}
|
||||
});
|
||||
} else {
|
||||
this.setState({ captchaVisible: true });
|
||||
}
|
||||
});
|
||||
});
|
||||
};
|
||||
initMobile = async () => {
|
||||
|
|
|
|||
Loading…
Reference in New Issue