BUG修复
This commit is contained in:
@@ -16,25 +16,28 @@ const addBg = ref("");
|
||||
onMounted(async () => {
|
||||
const menuBtnInfo = uni.getMenuButtonBoundingClientRect();
|
||||
capsuleHeight.value = menuBtnInfo.top - 9;
|
||||
currentList.value = rankData.value.rank;
|
||||
if (rankData.value.myRankPos) myData.value = rankData.value.myRankPos;
|
||||
handleSelect(0);
|
||||
});
|
||||
|
||||
const handleSelect = (index) => {
|
||||
selectedIndex.value = index;
|
||||
myData.value = {};
|
||||
currentList.value = [];
|
||||
if (index === 0) {
|
||||
currentList.value = rankData.value.rank;
|
||||
if (rankData.value.myRankPos) myData.value = rankData.value.myRankPos;
|
||||
} else if (index === 1) {
|
||||
currentList.value = rankData.value.mvpRank;
|
||||
if (rankData.value.myMvpRankPos) myData.value = rankData.value.myMvpRankPos;
|
||||
} else if (index === 2) {
|
||||
currentList.value = rankData.value.ringRank;
|
||||
if (rankData.value.myRingRankPos)
|
||||
myData.value = rankData.value.myRingRankPos;
|
||||
} else {
|
||||
myData.value = {};
|
||||
currentList.value = [];
|
||||
}
|
||||
if (user.value.id) {
|
||||
currentList.value.some((item) => {
|
||||
if (item.userId === user.value.id) {
|
||||
myData.value = item;
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
@@ -172,18 +175,24 @@ const subTitles = ["排位赛积分", "本周MVP次数", "本周十环次数"];
|
||||
<text class="truncate">{{ user.nickName }}</text>
|
||||
<text>{{ user.lvlName }},{{ myData.TotalGames }}场</text>
|
||||
</view>
|
||||
<text class="rank-item-integral" v-if="selectedIndex === 0">
|
||||
<text
|
||||
:style="{ fontSize: '14px', color: '#fff', marginRight: '5px' }"
|
||||
>{{ myData.totalScore }}</text
|
||||
>次</text
|
||||
>
|
||||
<text class="rank-item-integral" v-if="selectedIndex === 1">
|
||||
<text
|
||||
:style="{ fontSize: '14px', color: '#fff', marginRight: '5px' }"
|
||||
>{{ myData.TotalGames }}</text
|
||||
>次</text
|
||||
>
|
||||
<text class="rank-item-integral" v-if="selectedIndex === 2">
|
||||
<text
|
||||
:style="{ fontSize: '14px', color: '#fff', marginRight: '5px' }"
|
||||
>{{ rankData.myRankPos.TenRings }}</text
|
||||
>{{ myData.TenRings }}</text
|
||||
>次</text
|
||||
>
|
||||
<text class="rank-item-integral" v-else>
|
||||
<text
|
||||
:style="{ fontSize: '14px', color: '#fff', marginRight: '5px' }"
|
||||
>{{ rankData.myRingRankPos.totalScore }}</text
|
||||
>分</text
|
||||
>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</template>
|
||||
|
||||
Reference in New Issue
Block a user