custom-联特
This commit is contained in:
parent
b99b178f61
commit
535ee6b6ed
|
|
@ -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);
|
||||
};
|
||||
|
|
|
|||
|
|
@ -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 && <SecondarypwdVerify {...this.props} salaryBillToken={this.state.salaryBillToken}
|
||||
onSuccess={() => this.setState({ pwdSetVisible: false }, () => this.initMobile())}/>}
|
||||
{pwdModifyVisible && <SecondarypwdModify {...this.props} salaryBillToken={this.state.salaryBillToken}
|
||||
onSuccess={() => this.setState({ pwdModifyVisible: false }, () => this.initMobile())}/>}
|
||||
{/*发送验证码*/}
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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 !== "") {
|
||||
|
|
|
|||
Loading…
Reference in New Issue