update:优化跳转

This commit is contained in:
2026-07-09 14:43:25 +08:00
parent 12729a1cef
commit bf6b87b59c
+7 -1
View File
@@ -47,6 +47,7 @@ const enterRoom = debounce(async (number) => {
return;
}
loading.value = true;
let keepLoading = false;
try {
const room = await getRoomAPI(number);
if (!room.number) {
@@ -65,11 +66,15 @@ const enterRoom = debounce(async (number) => {
return;
}
}
keepLoading = true;
uni.navigateTo({
url: "/pages/battle-room?roomNumber=" + number,
fail: () => {
loading.value = false;
},
});
} finally {
loading.value = false;
if (!keepLoading) loading.value = false;
}
});
const onCreateRoom = debounce(async () => {
@@ -123,6 +128,7 @@ const goMyRecord = () => {
});
};
onShow(async () => {
loading.value = false;
if (user.value.id) {
const [result] = await Promise.all([
getBattleDataAPI(),