完成打乱斗数据调试
This commit is contained in:
@@ -5,7 +5,7 @@ import AppBackground from "@/components/AppBackground.vue";
|
||||
import Header from "@/components/Header.vue";
|
||||
import ScreenHint from "@/components/ScreenHint.vue";
|
||||
import BackToGame from "@/components/BackToGame.vue";
|
||||
import { getCurrentGameAPI, laserAimAPI } from "@/apis";
|
||||
import { laserAimAPI, getBattleAPI } from "@/apis";
|
||||
import { capsuleHeight, debounce } from "@/util";
|
||||
import AudioManager from "@/audioManager";
|
||||
const props = defineProps({
|
||||
@@ -111,15 +111,19 @@ const backToGame = debounce(async () => {
|
||||
|
||||
try {
|
||||
isLoading.value = true;
|
||||
const game = await getCurrentGameAPI();
|
||||
if (!game || !game.gameId) {
|
||||
uni.showToast({
|
||||
title: "没有进行中的对局",
|
||||
icon: "none",
|
||||
});
|
||||
const result = await getBattleAPI();
|
||||
if (result && result.matchId) {
|
||||
await checkAudioProgress();
|
||||
if (result.mode <= 3) {
|
||||
uni.navigateTo({
|
||||
url: `/pages/team-battle?battleId=${result.matchId}`,
|
||||
});
|
||||
} else {
|
||||
uni.navigateTo({
|
||||
url: `/pages/melee-battle?battleId=${result.matchId}`,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
showHint.value = false;
|
||||
} catch (error) {
|
||||
console.error("获取当前游戏失败:", error);
|
||||
} finally {
|
||||
|
||||
Reference in New Issue
Block a user