<template>
  <view>
    <Menu v-if="selectIndex===0"></Menu>
    <Order v-else-if="selectIndex===1"></Order>
    <Mine  v-else-if="selectIndex===2"></Mine>
	<taBar :select="selectIndex" @changeIndex="acceptIndex"></taBar>
  </view>
</template>

<script>
import Menu from '../menu/menu.vue'
import Mine from '../mine/mine.vue'
import Order from '../order/order.vue'
export default {
    components:{
        Menu,
        Mine,
        Order
    },
    data(){
        return {
            selectIndex: 0
        }
    },
    computed:{
        a(){
            console.log(uni.getStorage('tabIndex'),'ccccccccc')
            return uni.getStorageSync('tabIndex')
        }
    },
    mounted(){
        this.$nextTick(()=>{
            console.log(uni.getStorageSync('tabIndex'))
        })
        this.selectIndex = uni.getStorageSync('tabIndex')
    },
    methods:{
        acceptIndex(e){
            // console.log(e,'hhhhhhhhhhhhhhh')
            this.selectIndex = e
        }
    }
}
</script>

<style>

</style>