Component({
	data: {
		selected: 0,
		color: "#C6C6C6",
		selectedColor: "#333333",
		list: [{
				"index": 0,
				"pagePath": "/pages/shouye/index",
				"iconPath": "/static/tabbar/m1.png",
				"selectedIconPath": "/static/tabbar/s1.png",
				"text": "首页"
			},
			{
				"index": 2,
				"pagePath": "/pages/mall/index",
				"iconPath": "/static/tabbar/m5.png",
				"selectedIconPath": "/static/tabbar/s5.png",
				"text": "商城"
			},
			{
				"index": 3,
				"pagePath": "/pages/sangdai/sangdai",
				"iconPath": "/static/tabbar/m3.png",
				"selectedIconPath": "/static/tabbar/s3.png",
				"text": "盒柜"
			},
			{
				"index": 1,
				"pagePath": "/pages/infinite/index",
				"iconPath": "/static/tabbar/m2.png",
				"selectedIconPath": "/static/tabbar/s2.png",
				"text": "福利"
			},
			{
				"index": 4,
				"pagePath": "/pages/user/index",
				"iconPath": "/static/tabbar/m4.png",
				"selectedIconPath": "/static/tabbar/s4.png",
				"text": "我的"
			}
		]
	},
	attached() {},
	methods: {
		switchTab(e) {
			const data = e.currentTarget.dataset
			const url = data.path
			console.log(e, data, url, data.index)
			wx.switchTab({
				url
			})
			// console.log('aaaaaaaa', this.selected, data.index);
			this.setData({
				selected: data.index
			})
		}
	}
})