Browse Source

fix: 空值导致总计为空

zhangyong/feature-20250716164232-金币前端
lihui 4 days ago
parent
commit
bce68e4b43
  1. 2
      src/views/usergold/gold/clientCountBalance.vue
  2. 4
      src/views/usergold/gold/clientCountDetail.vue

2
src/views/usergold/gold/clientCountBalance.vue

@ -139,7 +139,7 @@ const get = async function (val) {
// ElMessage.warning('') // ElMessage.warning('')
} }
// , result.data.list // , result.data.list
if(resultGoldTotal.data===0){
else if(resultGoldTotal.data===0){
// //
tableData.value = [] tableData.value = []
// 0 // 0

4
src/views/usergold/gold/clientCountDetail.vue

@ -203,15 +203,13 @@ const get = async function (val) {
totalFreeGold.value = data.freeGolds totalFreeGold.value = data.freeGolds
totalTaskGold.value = data.taskGolds totalTaskGold.value = data.taskGolds
totalGoldTotal.value = data.sumGolds totalGoldTotal.value = data.sumGolds
}
if (totalResult.code === 0) {
} else if (totalResult.code === 0) {
// //
tableData.value = [] tableData.value = []
totalPermanentGold.value = 0 totalPermanentGold.value = 0
totalFreeGold.value = 0 totalFreeGold.value = 0
totalTaskGold.value = 0 totalTaskGold.value = 0
totalGoldTotal.value = 0 totalGoldTotal.value = 0
} else { } else {
ElMessage.error('获取合计数据失败') ElMessage.error('获取合计数据失败')
} }

Loading…
Cancel
Save