From 6b1169ea4340e64c686b2ddd9017633e1321a12f Mon Sep 17 00:00:00 2001 From: woody Date: Fri, 26 Sep 2025 09:20:24 +0800 Subject: [PATCH] =?UTF-8?q?fix(rankingPopup):=20=20=E6=8E=92=E8=A1=8C?= =?UTF-8?q?=E6=A6=9C=E9=80=BB=E8=BE=91=E5=AE=8C=E5=96=84=EF=BC=8C=E5=A6=82?= =?UTF-8?q?=E6=9E=9C=E5=88=97=E8=A1=A8=E4=B8=BA=E7=A9=BA=E4=B8=8D=E5=B1=95?= =?UTF-8?q?=E7=A4=BA=E6=8E=92=E8=A1=8C=E6=A6=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/RankingPopup.vue | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/components/RankingPopup.vue b/components/RankingPopup.vue index 289253d..86d061a 100644 --- a/components/RankingPopup.vue +++ b/components/RankingPopup.vue @@ -295,9 +295,14 @@ export default { try { // 并行加载两个排行榜数据 await Promise.all([this.loadPeopleRanking(), this.loadAmountRanking()]) - // 先显示人数排行榜 - this.showPeopleRanking = true + if (this.peopleTopThree.length > 0) { + this.showPeopleRanking = true + } else if (this.amountTopThree.length > 0) { + this.showAmountRanking = true + } else { + this.$emit('onRankingComplete') + } } catch (error) { console.error('加载排行榜数据失败:', error) uni.showToast({ @@ -327,6 +332,7 @@ export default { faker: true, } const res = await api.getTopPeople(params) + console.log(res.data) if (res.code === 200 && res.data) { // 数据字段映射 const mappedData = res.data.map(item => ({