返回游戏流程完善
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user