Component({
	data: {
		selected: '-1',
		color: "#7A7E83",
		selectedColor: "#fff",
		list: [{
			pagePath: "/pages/canvasposter/canvasposter",
			iconPath: "/img/bg_w.png",
			selectedIconPath: "/img/bg_b.png",
			text: "首页"
		},{
			pagePath: "/pages/index/index",
			iconPath: "/img/bg_w.png",
			selectedIconPath: "/img/bg_b.png",
			text: "产品"
		}, {
			pagePath: "/pages/ranking/ranking",
			iconPath: "/img/bg_w.png",
			selectedIconPath: "/img/bg_b.png",
			text: "排行榜"
		}, {
			pagePath: "/pages/user/user",
			iconPath: "/img/bg_w.png",
			selectedIconPath: "/img/bg_b.png",
			text: "个人中心"
		}]
	},
	attached() {},
	methods: {
		switchTab(e) {
			const data = e.currentTarget.dataset
			const url = data.path
			wx.switchTab({
				url
			}) //可能是改变样式的原因
		}
	}
})
