Browse Source

fix:金豆充值统计总数

zhangyong/feature-20250815160302-金币优化
ZhangYong 1 month ago
parent
commit
f0775eda93
  1. 13
      src/views/recharge/bean/beanOnlineRecharge.vue
  2. 18
      src/views/recharge/bean/beanSystemRecharge.vue

13
src/views/recharge/bean/beanOnlineRecharge.vue

@ -33,9 +33,16 @@ const getTotalBeans = async () => {
} }
}) })
if (result.code == 200) { if (result.code == 200) {
permanentBeans.value = result.data.permanentBean
num.value = result.data.num
money.value = result.data.money
if(result.data){
permanentBeans.value = result.data.permanentBean
num.value = result.data.num
money.value = result.data.money
}else{
permanentBeans.value = 0
num.value = 0
money.value = 0
}
console.log('金豆总数获取成功'); console.log('金豆总数获取成功');
} }
console.log('获取金豆总数失败:', result.msg); console.log('获取金豆总数失败:', result.msg);

18
src/views/recharge/bean/beanSystemRecharge.vue

@ -41,10 +41,18 @@ const getTotalBeans = async () => {
} }
}) })
if (result.code == 200) { if (result.code == 200) {
permanentBeans.value = result.data.permanentBean
freeBean.value = result.data.freeBean
beanNum.value = result.data.beanNum
money.value = result.data.money
if (result.data) {
permanentBeans.value = result.data.permanentBean
freeBean.value = result.data.freeBean
beanNum.value = result.data.beanNum
money.value = result.data.money
}else{
permanentBeans.value = 0
freeBean.value = 0
beanNum.value = 0
money.value = 0
}
console.log('金豆总数获取成功'); console.log('金豆总数获取成功');
} }
console.log('获取金豆总数失败:', result.msg); console.log('获取金豆总数失败:', result.msg);
@ -370,7 +378,7 @@ onMounted(async function () {
<template #default="scope"> <template #default="scope">
<span>{{ <span>{{
scope.$index + 1 + (getObj.pageNum - 1) * getObj.pageSize scope.$index + 1 + (getObj.pageNum - 1) * getObj.pageSize
}}</span>
}}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column fixed="left" prop="name" label="姓名" min-width="100" show-overflow-tooltip /> <el-table-column fixed="left" prop="name" label="姓名" min-width="100" show-overflow-tooltip />

Loading…
Cancel
Save