update:语音加载优化,修复大乱斗未重连比赛服问题

This commit is contained in:
2026-07-13 14:50:21 +08:00
parent 1796d4aa40
commit 080af14be8
16 changed files with 340 additions and 447 deletions
-10
View File
@@ -1,6 +1,3 @@
import { connectMatchWebSocket } from "@/matchWebsocket";
import useStore from "@/store";
export const MATCH_RETURN_SNAPSHOT_KEY = "match-return-snapshot";
function getMatchId(battleInfo) {
@@ -29,14 +26,7 @@ export async function returnToBattle(battleInfo, navigate) {
return false;
}
const store = useStore();
uni.setStorageSync(MATCH_RETURN_SNAPSHOT_KEY, battleInfo);
connectMatchWebSocket({
serverAddr: battleInfo.serverAddr,
matchId,
userId: store.user?.id,
});
await navigate(getBattlePageUrl(battleInfo));
return true;
}