添加全局返回游戏

This commit is contained in:
kron
2025-07-13 14:57:16 +08:00
parent b6d78d6070
commit fa959c73aa
10 changed files with 109 additions and 10 deletions

View File

@@ -4,6 +4,7 @@ import { onShow } from "@dcloudio/uni-app";
import AppBackground from "@/components/AppBackground.vue";
import Header from "@/components/Header.vue";
import ScreenHint from "@/components/ScreenHint.vue";
import BackToGame from "@/components/BackToGame.vue";
import { getCurrentGameAPI } from "@/apis";
import { debounce } from "@/util";
defineProps({
@@ -27,6 +28,10 @@ defineProps({
type: Boolean,
default: false,
},
showBackToGame: {
type: Boolean,
default: true,
},
});
const isIos = ref(true);
const showHint = ref(false);
@@ -55,6 +60,7 @@ const goBack = () => {
<view>
<AppBackground :type="bgType" />
<Header v-if="!isHome" :title="title" :onBack="onBack" />
<BackToGame v-if="showBackToGame" />
<view
class="content"
:style="{
@@ -66,7 +72,9 @@ const goBack = () => {
</view>
<ScreenHint :show="showHint">
<view v-if="hintType === 1" class="tip-content">
<text>完成进行中的对局才能开启新的您有正在进行中的对局是否进入?</text>
<text
>完成进行中的对局才能开启新的您有正在进行中的对局是否进入?</text
>
<view>
<button hover-class="none" @click="backToGame">进入</button>
<button hover-class="none" @click="() => (showHint = false)">