<template>
	<view class="container cart clearfix"> 	
		<cart ref="cart" :pathType='pathType'></cart>
	</view>
</template>
<script>
	import { mapState,mapMutations } from 'vuex';
	import cart from '@/components/cm-module/cm-cart-temp/index.vue'
	export default{
		components:{
			cart
		},
		data(){
			return{
				pathType:0
			}
		},
		onLoad(){
			
		},
		computed: {
			...mapState(['hasLogin','userInfo','isWxAuthorize'])
		},
		methods:{
			...mapMutations(['updateNoticeNum'])
		},
		onPullDownRefresh() {//下拉刷新
			this.$refs.cart.initData()
			uni.stopPullDownRefresh()
		},
		onShow(){
			if(this.hasLogin){
				this.$refs.cart.initData()
			}else{
				this.$api.redirectTo('/pages/login/login')
			}
		},
	}
</script>

<style lang="scss">
	
</style>