<template>
	<view class="bg" @click="goIndex()">
		<image
		  style="height: 60rpx;position: absolute;top: 250rpx;z-index: 999;width: 408rpx;right: 171rpx;"
		  :src="showImg('/uploads/20250909/53b42f2f8deb630dc6f0e505f6be188c.png')"
		></image>
		<image :src="showImg(screenPng)" class="img"></image>
		<image src="https://des.dayunyuanjian.cn/epicSoul/startBtn.png" mode="widthFix" class="btn"></image>
		<MusicControl />
	</view>
</template>

<script>
	import MusicControl from '@/components/MusicControl.vue';
	export default {
		components: {
		    MusicControl
		},
		data() {
			return {
				screenPng: "",
				count:1

			}
		},
		onLoad() {
			
		},
		onReady () {
			
			// 小轮播
			this.Post({
				type_id: 3,
				position: 5,
			}, '/api/adv/getAdv').then(res => {
				if(res.data && res.data.length>0) {
					this.screenPng = '/uploads/20250827/7e760074b1081141e6ffac1351308ae8.gif'
					
					// setTimeout(() => {
					// 	this.goIndex()
					// },3000)
				}
			});
		},
		mounted() {
			const app = getApp();
			app.initBackgroundMusic(); // 初始化背景音乐
			uni.$bgMusic.play(); // 播放音乐
			
		},
		methods: {
			goIndex () {
				uni.switchTab({
					url:"/pages/index/index"
				})
			},
		},
		// #ifdef MP-WEIXIN
		onShareAppMessage() {
		    return {
		        title: 'Epic Soul 交响',
		        mpId: 'wx9660f8c5776663e0',
		        path: '/pages/stratIndex',
		        imageUrl: 'https://des.dayunyuanjian.cn/epicSoul/epicShare.png'
		    };
		},
		onShareTimeline() {
		    return {
		        title: 'Epic Soul 交响',
		        query: '',
		        imageUrl: 'https://des.dayunyuanjian.cn/epicSoul/epicShare.png'
		    };
		}
		// #endif
	}
</script>

<style lang="scss" scoped>
	.bg{
		height: 100vh;
		.img{
			width: 100%;
			height: 100%;
			position: fixed;
			top: 0;
			left: 0;
		}
	}
	
	.btn {
		position: fixed;
		left: 0;
		right: 0;
		margin: 0 auto;
		width: 300rpx;
		bottom: 250rpx;
	}
</style>