Commit 96c4b91d authored by XieZhiXiong's avatar XieZhiXiong

chore: 添加 catch

parent 86c83dd6
......@@ -67,10 +67,12 @@ const DetailInfo: React.FC = () => {
setDetailInfo({
faultFileList,
fileList: faultFileList.map(item => normalizeFiledata(item.filePath)),
fileList: faultFileList?.map(item => normalizeFiledata(item.filePath)),
...rest,
});
}
}).catch((err) => {
console.warn(err);
}).finally(() => {
setInfoloading(false);
});
......@@ -92,6 +94,8 @@ const DetailInfo: React.FC = () => {
}
}).finally(() => {
setExchangeGoodsLoading(false);
}).catch((err) => {
console.warn(err);
});
};
......
......@@ -110,10 +110,12 @@ const DetailInfo: React.FC = () => {
faultFileList,
supplierName,
...rest,
fileList: faultFileList.map(item => normalizeFiledata(item.filePath)),
fileList: faultFileList?.map(item => normalizeFiledata(item.filePath)),
repairAddress: isJSONStr(repairAddress) || null,
});
}
}).catch((err) => {
console.warn(err);
}).finally(() => {
setInfoLoading(false);
});
......@@ -133,6 +135,8 @@ const DetailInfo: React.FC = () => {
if (res.code === 1000) {
setRepairGoodsList(res.data);
}
}).catch((err) => {
console.warn(err);
}).finally(() => {
setRepairGoodsLoading(false);
});
......
......@@ -209,10 +209,12 @@ const DetailInfo: React.FC<DetailInfoProps> = ({
setDetailInfo({
faultFileList,
fileList: faultFileList.map(item => normalizeFiledata(item.filePath)),
fileList: faultFileList?.map(item => normalizeFiledata(item.filePath)),
...rest,
});
}
}).catch((err) => {
console.warn(err);
}).finally(() => {
setInfoloading(false);
});
......@@ -232,6 +234,8 @@ const DetailInfo: React.FC<DetailInfoProps> = ({
if (res.code === 1000) {
setReturnGoodsList(res.data);
}
}).catch((err) => {
console.warn(err);
}).finally(() => {
setReturnGoodsLoading(false);
});
......
......@@ -46,6 +46,8 @@ const Balance: React.FC<BalanceProps> = ({
if (res.code === 1000) {
setBalance(res.data);
}
}).catch((err) => {
console.warn(err);
}).finally(() => {
setLoading(false);
});
......
......@@ -75,6 +75,8 @@ const Credit: React.FC<BalanceProps> = ({
if (res.code === 1000) {
setCredit(res.data);
}
}).catch((err) => {
console.warn(err);
}).finally(() => {
setLoading(false);
});
......
......@@ -155,6 +155,8 @@ const UploadPaymentVoucher: React.FC<IProps> = (props: IProps) => {
if (res.code === 1000) {
setBankAccount(res.data);
}
}).catch((err) => {
console.warn(err);
}).finally(() => {
setLoading(false);
});
......
......@@ -2,7 +2,7 @@
* @Author: XieZhiXiong
* @Date: 2020-12-18 15:31:25
* @LastEditors: XieZhiXiong
* @LastEditTime: 2020-12-18 15:32:37
* @LastEditTime: 2021-07-30 15:14:34
* @Description: 待退款
*/
import React, { useState, useRef } from 'react';
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment