From 23041e460b96065d5eaa690a5e5868a60d3222e4 Mon Sep 17 00:00:00 2001 From: kron Date: Thu, 3 Jul 2025 11:40:03 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=8C=E5=96=84=E6=95=B0=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/rank-list.vue | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/src/pages/rank-list.vue b/src/pages/rank-list.vue index 953e917..4ce4912 100644 --- a/src/pages/rank-list.vue +++ b/src/pages/rank-list.vue @@ -10,15 +10,20 @@ const { getLvlName } = store; const isIos = ref(true); const selectedIndex = ref(0); const currentList = ref([]); +const myData = ref(null); onMounted(async () => { const deviceInfo = uni.getDeviceInfo(); isIos.value = deviceInfo.osName === "ios"; currentList.value = rankData.value.rank; + myData.value = rankData.value.rank.find( + (item) => item.userId === user.value.id + ); }); const handleSelect = (index) => { selectedIndex.value = index; + myData.value = null; if (index === 0) { currentList.value = rankData.value.rank; } else if (index === 2) { @@ -26,6 +31,9 @@ const handleSelect = (index) => { } else { currentList.value = []; } + myData.value = rankData.value.rank.find( + (item) => item.userId === user.value.id + ); }; const subTitles = ["排位赛积分", "本周MVP次数", "本周十环次数"]; @@ -121,18 +129,18 @@ const subTitles = ["排位赛积分", "本周MVP次数", "本周十环次数"]; > - + - {{ user.ranking }} + {{ myData.rank }} {{ user.nickName }} - {{ user.lvlName }},20场 + {{ user.lvlName }},{{ myData.TotalGames }}场 {{ user.scores }}{{ myData.totalScore }}