update:优化比赛

This commit is contained in:
2026-07-09 11:43:06 +08:00
parent af07d09ab6
commit f8efe4c4a4
9 changed files with 130 additions and 86 deletions
+2 -5
View File
@@ -4,6 +4,7 @@ import { onShow } from "@dcloudio/uni-app";
import { getBattleAPI, getUserGameState } from "@/apis";
import { debounce } from "@/util";
import { returnToBattle } from "@/utils/matchReturn";
import useStore from "@/store";
import { storeToRefs } from "pinia";
@@ -67,11 +68,7 @@ const onClick = debounce(async () => {
const result = await getBattleAPI();
if (result && result.matchId) {
await uni.$checkAudio();
if (result.mode <= 3) {
await navigateOnce(`/pages/team-battle/index?battleId=${result.matchId}`);
} else {
await navigateOnce(`/pages/melee-battle?battleId=${result.matchId}`);
}
await returnToBattle(result, navigateOnce);
return;
}
if (game.value.roomID) {