细节调整

This commit is contained in:
kron
2025-11-11 16:31:47 +08:00
parent 6df7986c47
commit 59a2b173a6
8 changed files with 46 additions and 32 deletions

View File

@@ -39,10 +39,6 @@ const showRoundTip = ref(false);
const isFinalShoot = ref(false);
const isEnded = ref(false);
const onBack = () => {
uni.$showHint(2);
};
function recoverData(battleInfo) {
uni.removeStorageSync("last-awake-time");
battleId.value = battleInfo.id;
@@ -282,6 +278,12 @@ onLoad(async (options) => {
setTimeout(getCurrentGameAPI, 2000);
}
}
uni.enableAlertBeforeUnload({
message: "离开比赛可能导致比赛失败,是否继续?",
success: (res) => {
console.log("已启用离开提示");
},
});
});
onMounted(async () => {
uni.setKeepScreenOn({
@@ -319,7 +321,7 @@ onHide(() => {
</script>
<template>
<Container :bgType="start ? 3 : 1" :onBack="onBack">
<Container :bgType="start ? 3 : 1">
<view class="container">
<BattleHeader v-if="!start" :redTeam="redTeam" :blueTeam="blueTeam" />
<TestDistance v-if="!start" :guide="false" :isBattle="true" />