<template>
	<view>
		<!-- 首页 -->
		<HomePage v-if="showpage==0"></HomePage>
		<!-- 衣柜 -->
		<MardPage v-if="showpage==1" @fatherMethod="initBtn"></MardPage>
		<!-- 搭配 -->
		<DapeiPage v-if="showpage==2"></DapeiPage>
		<!-- 商城 -->
		<ShopPage v-if="showpage==3"></ShopPage>
		<!-- 我的 -->
		<UserPage v-if="showpage==4"></UserPage>
		<!-- 底部 -->
		<view>
			<tm-bottomnavigation :auto-selected="false" :activeIndex="showpage" @change="changepage" style="height:50px" :list="list_1"></tm-bottomnavigation>
		</view>
	</view>
</template>

<script>
import HomePage from "@/pages/shouye/index"
import MardPage from "@/pages/wardrobe/index"
import DapeiPage from "@/pages/dapei/index"
import ShopPage from "@/pages/shop/index"
import UserPage from "@/pages/user/index"
export default {
	components:{
		HomePage,
		MardPage,
		DapeiPage,
		ShopPage,
		UserPage
	},
	data() {
		return {
			list_1: [
				{iconSize: 60,showDot:false,icon: '/static/img/31.png',noIcon:'/static/img/31.png', value: '首页' },
				{iconSize: 60,showDot:false,icon: '/static/img/32.png',noIcon:'/static/img/32.png', value: '衣橱' },
				{iconSize: 60,showDot:false, icon: '/static/img/33.png',noIcon:'/static/img/33.png', value: '消息' },
				{iconSize: 60,showDot:false, icon: '/static/img/34.png',noIcon:'/static/img/34.png', value: '商城' },
				{iconSize: 60,showDot:false, icon: '/static/img/35.png',noIcon:'/static/img/35.png', value: '我的' }
			],
			showpage:0
		};
	},
	onLoad(index) {
		this.$tm.theme.setBlack(true);
		if(index.index==1){
			this.showpage=1;
		}else{
			this.showpage=0;
		}
		// console.log(index)
		
	},
	created() {
		
		console.log(222)
	},
	methods: {
		initBtn(){
			console.log(333)
		},
		changepage(info){
			this.showpage=info.index
		}
	}
};
</script>