这样调接口取参数id怎么会报错呢?这是个弹出框 有两个页面会公用这个弹出框 另一个页面调完没有问题 这个就报错了报错: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}};
添加回答
举报
0/150
提交
取消