完成用户升级交互

This commit is contained in:
kron
2025-07-23 20:47:31 +08:00
parent 76e85501d5
commit b1874ba830
6 changed files with 124 additions and 72 deletions

View File

@@ -175,7 +175,7 @@ async function onReceiveMessage(messages = []) {
isEnded.value = true;
setTimeout(() => {
uni.redirectTo({
url: `/pages/battle-result?battleId=${msg.id}`,
url: "/pages/battle-result",
});
}, 1500);
}
@@ -211,7 +211,7 @@ onUnmounted(() => {
const refreshTimer = ref(null);
onShow(async () => {
if (battleId.value) {
if (!isEnded.value && (await isGameEnded())) return;
if (!isEnded.value && (await isGameEnded(battleId.value))) return;
getCurrentGameAPI();
const refreshData = () => {
const lastAwakeTime = uni.getStorageSync("last-awake-time");