修改升级接收方式
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
<script setup>
|
||||
import { ref, watch, onMounted, onUnmounted } from "vue";
|
||||
import { onLoad } from "@dcloudio/uni-app";
|
||||
import { onLoad, onShow, onHide } from "@dcloudio/uni-app";
|
||||
import Container from "@/components/Container.vue";
|
||||
import BowTarget from "@/components/BowTarget.vue";
|
||||
import ShootProgress from "@/components/ShootProgress.vue";
|
||||
@@ -155,7 +155,7 @@ async function onReceiveMessage(messages = []) {
|
||||
tips.value = "准备下半场";
|
||||
}
|
||||
if (msg.constructor === MESSAGETYPES.MatchOver) {
|
||||
uni.setStorageSync("last-battle", { ...msg.endStatus, lvl: msg.lvl });
|
||||
uni.setStorageSync("last-battle", msg.endStatus);
|
||||
if (msg.endStatus.noSaved) {
|
||||
uni.showToast({
|
||||
title: "游戏结束",
|
||||
@@ -177,6 +177,7 @@ const onBack = () => {
|
||||
uni.$showHint(3);
|
||||
}
|
||||
};
|
||||
onShow(() => {});
|
||||
onMounted(() => {
|
||||
uni.setKeepScreenOn({
|
||||
keepScreenOn: true,
|
||||
|
||||
Reference in New Issue
Block a user