调试重新进入比赛

This commit is contained in:
kron
2025-07-03 21:13:55 +08:00
parent 18ce93b12f
commit 79c869a3f3
7 changed files with 68 additions and 20 deletions

View File

@@ -54,6 +54,21 @@ const halfTimeTip = ref(false);
const total = ref(90);
onLoad(async (options) => {
if (options.battleId) {
const battleInfo = uni.getStorageSync(`battle-${options.battleId}`);
console.log("----battleInfo", battleInfo);
if (battleInfo) {
battleId.value = battleInfo.id;
start.value = true;
redTeam.value = battleInfo.redTeam;
blueTeam.value = battleInfo.blueTeam;
currentRound.value = battleInfo.currentRound;
bluePoints.value = battleInfo.blueScore;
redPoints.value = battleInfo.redScore;
totalRounds.value = battleInfo.maxRound;
roundResults.value = battleInfo.roundResults;
}
}
if (options.roomNumber) {
roomNumber.value = options.roomNumber;
const result = await getRoomAPI(options.roomNumber);

View File

@@ -19,7 +19,7 @@ const roomNumber = ref("");
const enterRoom = debounce(async () => {
const isGaming = await isGamingAPI();
if (isGaming) {
uni.$showHint("当前正在对战中");
uni.$showHint(1);
return;
}
if (!roomNumber.value) {

View File

@@ -75,7 +75,7 @@ const toTeamMatchPage = async (gameType, teamSize) => {
}
const isGaming = await isGamingAPI();
if (isGaming) {
uni.$showHint("当前正在对战中");
uni.$showHint(1);
return;
}
uni.navigateTo({
@@ -92,7 +92,7 @@ const toMeleeMatchPage = async (gameType, teamSize) => {
}
const isGaming = await isGamingAPI();
if (isGaming) {
uni.$showHint("当前正在对战中");
uni.$showHint(1);
return;
}
uni.navigateTo({