<template>
	<view class="bg bg-padding">
		<CustomTabBar :currentTab="0" />
	</view>
</template>

<script>
	import CustomTabBar from '@/components/CustomTabBar.vue';
	export default {
		components: {
			CustomTabBar
		},
		data() {
			return {
				url: "https://www.hwh5.cn/hwcm/lRCqyP0p"
			}
		},
		onLoad() {

		},
		onShow() {
			let inMap = false
			// #ifdef MP-WEIXIN
			inMap = this.$store.state.user.inMap
			// #endif
			
			// #ifdef H5
			inMap = uni.getStorageSync("changeInMap")
			// #endif
			
			if (inMap) {
				uni.switchTab({
					url:"/pages/index/index",
					success: () => {
						this.$store.commit("changeInMap",false);
						uni.setStorageSync("changeInMap",false)
					}
				})
			} else {
				uni.navigateTo({
					url:"/subPackages/webPage/webPage?url=https://www.hwh5.cn/hwcm/lRCqyP0p",
					success: () => {
						uni.setStorageSync("changeInMap",true)
					}
				})
			}
		},
		methods: {

		}
	}
</script>

<style>
	.bg {
		
	}
</style>
