Commit 2d14cf14 authored by XieZhiXiong's avatar XieZhiXiong

chore: 添加 catch

parent a92e4fc4
...@@ -76,12 +76,14 @@ const DetailInfo: React.FC<DetailInfoProps> = ({ ...@@ -76,12 +76,14 @@ const DetailInfo: React.FC<DetailInfoProps> = ({
if (res.code === 1000) { if (res.code === 1000) {
setQuotaInfo(res.data); setQuotaInfo(res.data);
setQuotaValues({ setQuotaValues({
applyQuota: res.data.apply.applyQuota, applyQuota: res.data?.apply?.applyQuota,
billDay: res.data.apply.billDay, billDay: res.data?.apply?.billDay,
repayPeriod: res.data.apply.repayPeriod, repayPeriod: res.data?.apply?.repayPeriod,
fileList: res.data.apply.fileList ? res.data.apply.fileList.map(item => normalizeFiledata(item.fileUrl)) : [], fileList: res.data?.apply?.fileList ? res.data.apply.fileList.map(item => normalizeFiledata(item.fileUrl)) : [],
}); });
} }
}).catch((err) => {
console.warn(err);
}).finally(() => { }).finally(() => {
setInfoloading(false); setInfoloading(false);
}); });
......
...@@ -87,6 +87,8 @@ const UploadVoucherModal: React.FC<UploadVoucherModalProps> = (props: UploadVouc ...@@ -87,6 +87,8 @@ const UploadVoucherModal: React.FC<UploadVoucherModalProps> = (props: UploadVouc
if (res.code === 1000) { if (res.code === 1000) {
setBankAccount(res.data); setBankAccount(res.data);
} }
}).catch((err) => {
console.warn(err);
}).finally(() => { }).finally(() => {
setLoading(false); setLoading(false);
}); });
......
...@@ -47,6 +47,8 @@ const QuotaMenageDetail: React.FC = () => { ...@@ -47,6 +47,8 @@ const QuotaMenageDetail: React.FC = () => {
if (res.code === 1000) { if (res.code === 1000) {
setCreditInfo(res.data); setCreditInfo(res.data);
} }
}).catch((err) => {
console.warn(err);
}).finally(() => { }).finally(() => {
setInfoLoading(false); setInfoLoading(false);
}); });
...@@ -118,6 +120,8 @@ const QuotaMenageDetail: React.FC = () => { ...@@ -118,6 +120,8 @@ const QuotaMenageDetail: React.FC = () => {
if (res.code === 1000) { if (res.code === 1000) {
setCreditOverdueList(res.data.data); setCreditOverdueList(res.data.data);
} }
}).catch((err) => {
console.warn(err);
}).finally(() => { }).finally(() => {
setCreditOverdueListLoading(false); setCreditOverdueListLoading(false);
}); });
......
...@@ -105,10 +105,10 @@ const DetailInfo: React.FC<DetailInfoProps> = (props) => { ...@@ -105,10 +105,10 @@ const DetailInfo: React.FC<DetailInfoProps> = (props) => {
// 审批信息不存在 或者 审批信息里边 审批额度不存在 // 审批信息不存在 或者 审批信息里边 审批额度不存在
// 说明没有 修改过 审批信息,手动赋值 授信申请里的数据 // 说明没有 修改过 审批信息,手动赋值 授信申请里的数据
if ((!verify || !lodash.isNumber(verify.quota)) && res.data.member.innerStatus === CREDIT_INNER_STATUS_UNCOMMITTED) { if ((!verify || !lodash.isNumber(verify.quota)) && res.data?.member?.innerStatus === CREDIT_INNER_STATUS_UNCOMMITTED) {
quotaValuesData.quota = apply.applyQuota; quotaValuesData.quota = apply?.applyQuota;
quotaValuesData.billDay = apply.billDay; quotaValuesData.billDay = apply?.billDay;
quotaValuesData.repayPeriod = apply.repayPeriod; quotaValuesData.repayPeriod = apply?.repayPeriod;
} }
// 如果有审批信息则直接赋值 审批信息 // 如果有审批信息则直接赋值 审批信息
...@@ -121,13 +121,13 @@ const DetailInfo: React.FC<DetailInfoProps> = (props) => { ...@@ -121,13 +121,13 @@ const DetailInfo: React.FC<DetailInfoProps> = (props) => {
setQuotaInfo({ setQuotaInfo({
...res.data, ...res.data,
quotaInfo: { quotaInfo: {
originalQuota: res.data.apply.originalQuota, originalQuota: res.data?.apply?.originalQuota,
applyQuota: res.data.apply.applyQuota, applyQuota: res.data?.apply?.applyQuota,
billDay: res.data.apply.billDay, billDay: res.data?.apply?.billDay,
repayPeriod: res.data.apply.repayPeriod, repayPeriod: res.data?.apply?.repayPeriod,
applyTime: res.data.apply.applyTime, applyTime: res.data?.apply?.applyTime,
fileList: res.data.apply.fileList ? res.data.apply.fileList.map(item => normalizeFiledata(item.fileUrl)) : [], fileList: res.data?.apply?.fileList ? res.data.apply.fileList.map(item => normalizeFiledata(item.fileUrl)) : [],
applyType: res.data.apply.applyType, applyType: res.data?.apply?.applyType,
}, },
verify: lodash.isNumber(quotaValuesData.quota) ? { verify: lodash.isNumber(quotaValuesData.quota) ? {
quota: quotaValuesData.quota, quota: quotaValuesData.quota,
...@@ -138,6 +138,8 @@ const DetailInfo: React.FC<DetailInfoProps> = (props) => { ...@@ -138,6 +138,8 @@ const DetailInfo: React.FC<DetailInfoProps> = (props) => {
} : null, } : null,
}); });
} }
}).catch((err) => {
console.warn(err);
}).finally(() => { }).finally(() => {
setInfoloading(false); setInfoloading(false);
}); });
......
...@@ -45,6 +45,8 @@ const QuotaMenageDetail: React.FC = () => { ...@@ -45,6 +45,8 @@ const QuotaMenageDetail: React.FC = () => {
if (res.code === 1000) { if (res.code === 1000) {
setCreditInfo(res.data); setCreditInfo(res.data);
} }
}).catch((err) => {
console.warn(err);
}).finally(() => { }).finally(() => {
setInfoLoading(false); setInfoLoading(false);
}); });
...@@ -116,6 +118,8 @@ const QuotaMenageDetail: React.FC = () => { ...@@ -116,6 +118,8 @@ const QuotaMenageDetail: React.FC = () => {
if (res.code === 1000) { if (res.code === 1000) {
setCreditOverdueList(res.data.data); setCreditOverdueList(res.data.data);
} }
}).catch((err) => {
console.warn(err);
}).finally(() => { }).finally(() => {
setCreditOverdueListLoading(false); setCreditOverdueListLoading(false);
}); });
......
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