细节优化
This commit is contained in:
@@ -95,6 +95,7 @@ onLoad(async (options) => {
|
||||
if (options.battleId) {
|
||||
const battleInfo = uni.getStorageSync("current-battle");
|
||||
if (battleInfo) recoverData(battleInfo);
|
||||
setTimeout(getCurrentGameAPI, 2000);
|
||||
} else {
|
||||
gameType.value = options.gameType;
|
||||
teamSize.value = options.teamSize;
|
||||
@@ -110,13 +111,6 @@ async function stopMatch() {
|
||||
|
||||
async function onReceiveMessage(messages = []) {
|
||||
messages.forEach((msg) => {
|
||||
if (
|
||||
!msg.id ||
|
||||
(battleId.value && msg.id === battleId.value) ||
|
||||
msg.constructor === MESSAGETYPES.WaitForAllReady
|
||||
) {
|
||||
console.log("收到消息:", getMessageTypeName(msg.constructor), msg);
|
||||
}
|
||||
if (msg.constructor === MESSAGETYPES.WaitForAllReady) {
|
||||
onComplete.value = () => {
|
||||
// 这里会掉多次;
|
||||
|
||||
Reference in New Issue
Block a user