调试重新进入比赛
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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({
|
||||
|
||||
Reference in New Issue
Block a user