update:语音加载优化,修复大乱斗未重连比赛服问题
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user