91e9e0c4 by lttnew

容错

1 parent 8ac0bb4d
......@@ -26,7 +26,11 @@
</view>
<view class="info-row">
<text class="label">认证地址</text>
<text class="value">{{ form.provinceStr + form.cityStr + form.regionStr || '-' }}</text>
<text class="value">{{
(form.provinceStr || '') +
(form.cityStr || '') +
(form.regionStr || '')
}}</text>
</view>
<view class="info-row">
<text class="label">详细地址</text>
......
......@@ -135,17 +135,24 @@ async function getList() {
renewYear: 0,
newCount: 0
}
const res = await api.listNewAPI(queryParams.value)
list.value = res.rows
for (const val of list.value) {
statistical.value.renewYear += val.renewYear
statistical.value.totalCost += val.finalPrice * 1
if (val.isNew == 1) {
statistical.value.newCount += 1
try {
const res = await api.listNewAPI(queryParams.value)
list.value = res.rows || []
for (const val of list.value) {
statistical.value.renewYear += val.renewYear
statistical.value.totalCost += val.finalPrice * 1
if (val.isNew == 1) {
statistical.value.newCount += 1
}
statistical.value.allCount += 1
}
statistical.value.allCount += 1
total.value = res.total
} catch (e) {
console.error('获取列表失败', e)
list.value = []
} finally {
uni.hideLoading()
}
total.value = res.total
}
function audit(recordId, flag) {
......@@ -201,6 +208,13 @@ function doApproval(recordId, flag, reason) {
icon: 'none'
})
getList()
}).catch((e) => {
console.error('审批操作失败', e)
uni.hideLoading()
uni.showToast({
title: '操作失败',
icon: 'none'
})
})
}
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!