返回游戏流程完善

This commit is contained in:
kron
2025-07-21 10:40:43 +08:00
parent 9e83bf89f7
commit 200c05a288
9 changed files with 185 additions and 207 deletions

View File

@@ -1,6 +1,6 @@
<script setup>
import { ref, onMounted } from "vue";
import { onShow, onHide } from "@dcloudio/uni-app";
import { ref } from "vue";
import { onShow } from "@dcloudio/uni-app";
import Container from "@/components/Container.vue";
import Avatar from "@/components/Avatar.vue";
import { getRankListAPI, isGamingAPI } from "@/apis";
@@ -37,15 +37,6 @@ const handleSelect = (index) => {
}
};
onShow(async () => {
const result = await getHomeData();
currentList.value = result.rank;
rankData.value = result;
const { userGameStats, seasonList } = result;
seasonData.value = seasonList;
updateData();
});
const toTeamMatchPage = async (gameType, teamSize) => {
if (!device.value.deviceId) {
return uni.showToast({
@@ -137,10 +128,14 @@ const updateData = () => {
});
}
};
onShow,
() => {
showSeasonList.value = false;
};
onShow(async () => {
const result = await getHomeData();
rankData.value = result;
handleSelect(selectedIndex.value);
seasonData.value = result.seasonList;
updateData();
showSeasonList.value = false;
});
</script>
<template>