细节调整
This commit is contained in:
@@ -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" />
|
||||
|
||||
Reference in New Issue
Block a user