feat:比赛优化

This commit is contained in:
2026-05-26 11:43:35 +08:00
parent 8664ae9fe4
commit 8ef64f8f42
30 changed files with 4575 additions and 38 deletions

View File

@@ -35,7 +35,7 @@ const handleMatchTimeout = async () => {
if (battle && battle.matchId) {
uni.showToast({ title: "匹配成功,正在进入...", icon: "none" });
if (battle.mode <= 3) {
uni.redirectTo({ url: `/pages/team-battle?battleId=${battle.matchId}` });
uni.redirectTo({ url: `/pages/team-battle/index?battleId=${battle.matchId}` });
} else {
uni.redirectTo({ url: `/pages/melee-battle?battleId=${battle.matchId}` });
}
@@ -76,7 +76,7 @@ async function cancelMatch() {
const battle = await getBattleAPI();
if (battle && battle.matchId) {
if (battle.mode <= 3) {
uni.redirectTo({ url: `/pages/team-battle?battleId=${battle.matchId}` });
uni.redirectTo({ url: `/pages/team-battle/index?battleId=${battle.matchId}` });
} else {
uni.redirectTo({ url: `/pages/melee-battle?battleId=${battle.matchId}` });
}
@@ -100,7 +100,7 @@ async function onReceiveMessage(msg) {
// mode <= 3 为团队对抗mode > 3 为大乱斗,覆盖全部 gameType1~5不再遗漏
if (msg.mode <= 3) {
uni.redirectTo({
url: `/pages/team-battle?battleId=${msg.id}`,
url: `/pages/team-battle/index?battleId=${msg.id}`,
});
} else {
uni.redirectTo({