Commit cb006e89 by 张立顺

feat 模拟请求修改

1 parent 6f037237
import { mapAbnormalFlowDeclarationApproveResponse } from "./adapters/abnormalFlowDeclaration/mapAbnormalFlowDeclarationApproveResponse"; import { mapAbnormalFlowDeclarationApproveResponse } from "./adapters/abnormalFlowDeclaration/mapAbnormalFlowDeclarationApproveResponse";
import { mapAbnormalFlowDeclarationDetailResponse } from "./adapters/abnormalFlowDeclaration/mapAbnormalFlowDeclarationDetailResponse"; import { mapAbnormalFlowDeclarationDetailResponse } from "./adapters/abnormalFlowDeclaration/mapAbnormalFlowDeclarationDetailResponse";
function delay(result, ms = 300) { function delay(result, ms = 300) {
return new Promise((resolve) => { return new Promise((resolve) => {
setTimeout(() => resolve(result), ms); setTimeout(() => resolve(result), ms);
...@@ -220,16 +220,16 @@ export function mockPcAbnormalFlowDeclarationDetail(data = {}) { ...@@ -220,16 +220,16 @@ export function mockPcAbnormalFlowDeclarationDetail(data = {}) {
if (!item) { if (!item) {
return delayReject(new Error("报备记录不存在")); return delayReject(new Error("报备记录不存在"));
} }
return delay(mapAbnormalFlowDeclarationDetailResponse({ return delay(mapAbnormalFlowDeclarationDetailResponse({
tradeInfo: buildTradeFields(item), tradeInfo: buildTradeFields(item),
declarationInfo: { declarationInfo: {
abnormalType: item.abnormalType, abnormalType: item.abnormalType,
remark: item.remark, remark: item.remark,
createdBy: item.createdBy, createdBy: item.createdBy,
createdDate: item.createdDate, createdDate: item.createdDate,
voucherImageUrls: item.voucherImageUrls, voucherImageUrls: item.voucherImageUrls,
}, },
approvalLogs: item.approvalLogs || [], approvalLogs: item.approvalLogs || [],
})); }));
} }
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!