细节修改

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

@@ -233,6 +233,7 @@ async function onReceiveMessage(messages = []) {
}
}
if (msg.constructor === MESSAGETYPES.FinalShoot) {
currentShooterId.value = 0;
if (!isFinalShoot.value) {
isFinalShoot.value = true;
showRoundTip.value = true;
@@ -240,17 +241,19 @@ async function onReceiveMessage(messages = []) {
}
}
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",
@@ -289,7 +292,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");