diff --git a/src/views/usergold/gold/clientCountBalance.vue b/src/views/usergold/gold/clientCountBalance.vue index 639ac40..3515991 100644 --- a/src/views/usergold/gold/clientCountBalance.vue +++ b/src/views/usergold/gold/clientCountBalance.vue @@ -139,7 +139,7 @@ const get = async function (val) { // ElMessage.warning('精网号不存在,请检查输入') } // 判断合计数是否存在,不存在时 result.data.list 为空数组 - if(resultGoldTotal.data===0){ + else if(resultGoldTotal.data===0){ // 将表格数据设置为空数组 tableData.value = [] // 将合计数设置为 0 diff --git a/src/views/usergold/gold/clientCountDetail.vue b/src/views/usergold/gold/clientCountDetail.vue index 1fd2daa..617265d 100644 --- a/src/views/usergold/gold/clientCountDetail.vue +++ b/src/views/usergold/gold/clientCountDetail.vue @@ -203,15 +203,13 @@ const get = async function (val) { totalFreeGold.value = data.freeGolds totalTaskGold.value = data.taskGolds totalGoldTotal.value = data.sumGolds - } - if (totalResult.code === 0) { + } else if (totalResult.code === 0) { // 将表格数据设置为空数组 tableData.value = [] totalPermanentGold.value = 0 totalFreeGold.value = 0 totalTaskGold.value = 0 totalGoldTotal.value = 0 - } else { ElMessage.error('获取合计数据失败') }