This commit is contained in:
yixu
2025-09-18 21:21:52 +08:00
parent a9dc9cda79
commit 67865139d3
2 changed files with 13 additions and 2 deletions

View File

@@ -9,15 +9,18 @@ import globalToastEvent, { ToastType } from '../globalToastEvent';
import { globalStore } from "../globalstore.js";
import Login from '../components/Login.vue'
import { isWeixin, isLogin, getParam, Storage, Request } from "../libs/utils"
import Lottery from '../components/Lottery.vue';
defineProps({
const props = defineProps({
show: true
})
const isMusicOn = ref(false);
const audioElement = ref(null);
const videoElement = ref(null);
const videoLoaded = ref(false);
const videoError = ref(false);
const lotteryShow = ref(false)
// 初始化全局音频实例
const initGlobalAudio = () => {
@@ -330,6 +333,13 @@ watch(() => mergeId, async (newVal) => {
}
}, { immediate: true })
globalToastEvent.on(ToastType.SHOW_LOTTERY, () => {
lotteryShow.value = true
})
watch(() => lotteryShow.value, async (newVal) => {
initUserGameInfos(true, true);
}, { immediate: true })
</script>
@@ -397,6 +407,7 @@ watch(() => mergeId, async (newVal) => {
<MyPhoto @go-photo-square="showPhotoSquare" v-model:show="isMyPhotoVisible" />
<PhotoSquare @go-my-photo="showMyPhoto" v-model:show="isPhotoSquareVisible" />
<Login :show="loginShow" @login-success="handleLoginSuccess" />
<Lottery :show="lotteryShow" @close="lotteryShow = false"></Lottery>
</template>
<style scoped>