diff --git a/pc4mobx/hrmSalary/apis/mySalaryBenefits.js b/pc4mobx/hrmSalary/apis/mySalaryBenefits.js index 96869045..203f6eea 100644 --- a/pc4mobx/hrmSalary/apis/mySalaryBenefits.js +++ b/pc4mobx/hrmSalary/apis/mySalaryBenefits.js @@ -60,3 +60,6 @@ export const saveSecondaryPwd = (params, headers) => { export const salaryBillGetToken = params => { return postFetch("/api/bs/hrmsalary/salaryBill/getToken", params); }; +export const modifySecondaryPwd = (params, header = {}) => { + return postFetch("/api/bs/hrmsalary/salaryBill/saveSecondaryPwd", params, header); +}; diff --git a/pc4mobx/hrmSalary/pages/mobilePayroll/index.js b/pc4mobx/hrmSalary/pages/mobilePayroll/index.js index ab9b34d0..5eb3baa1 100644 --- a/pc4mobx/hrmSalary/pages/mobilePayroll/index.js +++ b/pc4mobx/hrmSalary/pages/mobilePayroll/index.js @@ -15,6 +15,7 @@ import Content from "../../components/pcTemplate/content"; import MobileTemplate from "../../components/mobileTemplate"; import SecondaryVerify from "./secondaryVerify"; import SecondarypwdModify from "./secondarypwdModify"; +import SecondarypwdVerify from "./secondarypwdVerify"; import LoginVerify from "./loginVerify"; import "../mySalary/index.less"; @@ -159,6 +160,8 @@ export default class MobilePayroll extends React.Component { onSetPwdSet={() => this.setState({ loginVisible: false, loginModifyVisible: false, pwdModifyVisible: true })}/>} + {pwdSetVisible && this.setState({ pwdSetVisible: false }, () => this.initMobile())}/>} {pwdModifyVisible && this.setState({ pwdModifyVisible: false }, () => this.initMobile())}/>} {/*发送验证码*/} diff --git a/pc4mobx/hrmSalary/pages/mobilePayroll/secondarypwdModify.js b/pc4mobx/hrmSalary/pages/mobilePayroll/secondarypwdModify.js index a6fdedc3..230e3092 100644 --- a/pc4mobx/hrmSalary/pages/mobilePayroll/secondarypwdModify.js +++ b/pc4mobx/hrmSalary/pages/mobilePayroll/secondarypwdModify.js @@ -46,7 +46,7 @@ class SecondarypwdModify extends Component { return; } RSAEcrypt("1", { newSecondaryPwd1, newSecondaryPwd2 }).then(RSAParam => { - API.saveSecondaryPwd({ ...RSAParam, validatecode }, this.props.salaryBillToken) + API.modifySecondaryPwd({ ...RSAParam, validatecode }, this.props.salaryBillToken) .then(({ sign, message: msg }) => { if (sign === "1") { message.success(msg); diff --git a/pc4mobx/hrmSalary/util/request.js b/pc4mobx/hrmSalary/util/request.js index 4fd7e4e4..ef487037 100644 --- a/pc4mobx/hrmSalary/util/request.js +++ b/pc4mobx/hrmSalary/util/request.js @@ -16,12 +16,12 @@ export const formHeaderPost = (url, method, params, header) => { body: formdata }).then(res => res.json()); }; -export const postFetch = (url, params) => { +export const postFetch = (url, params, header = {}) => { if (typeof localStorage.access_token === "string" && localStorage.access_token !== "") { params.access_token = localStorage.access_token; } url = server + url + "?__random__=" + (new Date()).valueOf(); - return fetch(url, getFetchParams("POST", params)).then(res => res.json()); + return fetch(url, getFetchParams("POST", params, header)).then(res => res.json()); }; export const headerRequestFetch = (url, method, params, header) => { if (typeof localStorage.access_token === "string" && localStorage.access_token !== "") {