页面优化
This commit is contained in:
@@ -5,10 +5,12 @@ import { getGameAPI } from "@/apis";
|
||||
import TeamResult from "@/components/TeamResult.vue";
|
||||
import MeleeResult from "@/components/MeleeResult.vue";
|
||||
import Avatar from "@/components/Avatar.vue";
|
||||
import { getHomeData } from "@/apis";
|
||||
import useStore from "@/store";
|
||||
import { storeToRefs } from "pinia";
|
||||
const store = useStore();
|
||||
const { user } = storeToRefs(store);
|
||||
const { updateUser } = store;
|
||||
|
||||
const battleId = ref("");
|
||||
const ifWin = ref(false);
|
||||
@@ -22,7 +24,6 @@ onLoad(async (options) => {
|
||||
// options.battleId || "BATTLE-1749386862250435325-854"
|
||||
options.battleId || "BATTLE-1750142722977234017-746"
|
||||
);
|
||||
console.log(1212, result);
|
||||
data.value = result;
|
||||
if (result.mode === 1 && result.redPlayers[user.value.id]) {
|
||||
totalPoints.value = result.redTotal;
|
||||
@@ -40,7 +41,10 @@ onLoad(async (options) => {
|
||||
function exit() {
|
||||
uni.navigateBack();
|
||||
}
|
||||
onMounted(async () => {});
|
||||
onMounted(async () => {
|
||||
const result = await getHomeData();
|
||||
if (result.user) updateUser(result.user);
|
||||
});
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
||||
Reference in New Issue
Block a user