<template>
	<view class="page" :style="{'min-height':h+'px'}">
		<image src="https://oss.familydaf.cn/sxsnfile/20260119/2322ddce87aa42e7b4906e4286c7ffe1.png" mode="widthFix" @click="handleHome"></image>
	</view>
</template>

<script>
	export default {
		data(){
			return {
				
			}
		},
		onLoad(options) {
			this.handleLaunchOrShow(options)
		},
		methods:{
			async handleLaunchOrShow(options) {
				if(options.q){
					try{
						const decodedUrl = decodeURIComponent(options.q);
						const codeMatch = decodedUrl.match(/type=([^&]+)/);
						const stationCode = codeMatch ? codeMatch[1] : null;
						if(stationCode === 'scan') {
							// 关闭首页的加载/渲染，避免闪烁
							uni.hideHomeButton();
							return;
						}
						uni.reLaunch({ url: '/pages/home' });
					}catch(e){
						uni.reLaunch({ url: '/pages/home' });
					}
				}
			},
			handleHome(){
				uni.reLaunch({
					url:'/pages/home'
				})
			}
		}
	}
</script>

<style scoped lang="scss">
	.page{
		box-sizing: border-box;
		image{
			width: 100%;
		}
	}
</style>