细节修改

This commit is contained in:
kron
2025-07-25 09:59:54 +08:00
parent 553e23ed46
commit 85f1f7e33d
9 changed files with 52 additions and 32 deletions

View File

@@ -466,17 +466,19 @@ async function onReceiveMessage(messages = []) {
tips.value = "准备下半场";
}
if (msg.constructor === MESSAGETYPES.MatchOver) {
uni.setStorageSync("last-battle", msg.endStatus);
if (msg.endStatus.noSaved) {
uni.showToast({
title: "本场比赛无人射箭,已取消",
icon: "none",
});
// uni.showToast({
// title: "本场比赛无人射箭,已取消",
// icon: "none",
// });
currentBluePoint.value = 0;
currentRedPoint.value = 0;
setTimeout(() => {
uni.navigateBack();
}, 1500);
} else {
isEnded.value = true;
uni.setStorageSync("last-battle", msg.endStatus);
setTimeout(() => {
uni.redirectTo({
url: "/pages/battle-result",
@@ -537,7 +539,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");