how can an error be reported by adjusting the API parameter id in this way?
this is a pop-up box, two pages will share this pop-up box, and the other page will have no problem when the other page is called.
error:
showApproveState(show,record) {
const {busiType} = this.props;
let busi_type = busiType?busiType:"";
this.props.getApplyAudit(record.id,busi_type=="container"?"container":"apply");
this.setState({
ApproveStateVisible: show,
})
}
//action
export function getApplyAudit(id,type,state) {
const path="/auditing/getApplyAuditInfo";
return{
type:"APPLY_AUDIT_INFO",
payload: {
promise: api.get(path, {
params:{
id,
type,
state
}
})
}
}
}
//reducer
case "APPLY_AUDIT_INFO_PENDING":
return {...state,auditStateList:{loading:true}};
case "APPLY_AUDIT_INFO_SUCCESS":
return {...state,auditStateList:{result:action.payload, loading:false}};
case "APPLY_AUDIT_INFO_ERROR":
return {...state,auditStateList:{loading:false}};