From 29f628c60679ee4c66a9bfce8e30f8b71e1e866b Mon Sep 17 00:00:00 2001 From: lihui Date: Mon, 21 Jul 2025 11:00:02 +0800 Subject: [PATCH 1/2] =?UTF-8?q?fix:=20=E5=B7=A5=E4=BD=9C=E5=8F=B0=E6=8D=A2?= =?UTF-8?q?=20=E4=B8=BA=E5=A4=96=E5=B1=82=20=E5=AF=B9=E5=BA=94=E7=9A=84?= =?UTF-8?q?=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/workspace/index.vue | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/views/workspace/index.vue b/src/views/workspace/index.vue index ff245f5..0652dc2 100644 --- a/src/views/workspace/index.vue +++ b/src/views/workspace/index.vue @@ -408,8 +408,12 @@ const processData = (data) => { dailyRefund.value = yesterdayRefund.toFixed(2) yearlyRechargeNum.value = summary.yearlyRechargeNum - sumWow.value = (summary.sumWow / length.value).toFixed(2) - sumDaily.value = (summary.sumDaily / length.value).toFixed(2) + + // // 周同比 + // sumWow.value = (marketCards.sumWow / length.value).toFixed(2) + // // 日环比 + // sumDaily.value = (marketCards.sumDaily / length.value).toFixed(2) + rechargeNum.value = summary.rechargeNum firstRecharge.value = summary.firstRecharge } @@ -712,6 +716,11 @@ const getCardData = async () => { try { const response = await API({ url: '/workbench/getCard', data: {} }) workDataUpdateTime.value = response.updateTime + // 周同比 + sumWow.value = response.sumWow .toFixed(2) + // 日环比 + sumDaily.value = response.sumDaily.toFixed(2) + if (response && response.data) { processData(response.data) } else if (Array.isArray(response?.marketCards)) { From 9461d22012ac1126a95c4a6a4d5737055d904175 Mon Sep 17 00:00:00 2001 From: lihui Date: Mon, 21 Jul 2025 11:13:04 +0800 Subject: [PATCH 2/2] =?UTF-8?q?fix(usergold):=20=E8=BF=87=E6=BB=A4?= =?UTF-8?q?=E5=B8=82=E5=9C=BA=E6=95=B0=E6=8D=AE=E4=B8=AD=E7=9A=84=E7=A9=BA?= =?UTF-8?q?=E5=80=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/usergold/clientCountBalance.vue | 4 +++- src/views/usergold/clientCountDetail.vue | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/views/usergold/clientCountBalance.vue b/src/views/usergold/clientCountBalance.vue index ce4d2ba..5c33ec1 100644 --- a/src/views/usergold/clientCountBalance.vue +++ b/src/views/usergold/clientCountBalance.vue @@ -35,7 +35,9 @@ const getmarket = async () => { console.log('获取地区数据成功', result) // 假设后端返回的是字符串数组,转换为 { value, label } 格式 if (Array.isArray(result.data) && typeof result.data[0] === 'string') { - market.value = result.data.map(item => ({ value: item, label: item })); + market.value = result.data + .filter(item => item !== null && item !== undefined && item.trim() !== '') // 过滤空值 + .map(item => ({ value: item, label: item })); } else { market.value = result.data; } diff --git a/src/views/usergold/clientCountDetail.vue b/src/views/usergold/clientCountDetail.vue index 829c084..eee5735 100644 --- a/src/views/usergold/clientCountDetail.vue +++ b/src/views/usergold/clientCountDetail.vue @@ -101,7 +101,9 @@ const getArea = async () => { }); // 假设后端返回的是字符串数组,转换为 { value, label } 格式 if (Array.isArray(result.data) && typeof result.data[0] === 'string') { - market.value = result.data.map(item => ({ value: item, label: item })); + market.value = result.data + .filter(item => item !== null && item !== undefined && item.trim() !== '') // 过滤空值 + .map(item => ({ value: item, label: item })); } else { market.value = result.data; }