细节修改
This commit is contained in:
@@ -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");
|
||||
|
||||
Reference in New Issue
Block a user