|
|
|
@ -1,43 +1,41 @@
|
|
|
|
|
|
|
|
|
|
Component({
|
|
|
|
|
data: {
|
|
|
|
|
selected: 0,//当前选中的tab下标
|
|
|
|
|
selected: 0, //当前选中的tab下标
|
|
|
|
|
color: "#1E1E1E",
|
|
|
|
|
selectedColor: "#646464",//tabbar选中字体颜色
|
|
|
|
|
selectedColor: "#646464", //tabbar选中字体颜色
|
|
|
|
|
list: [{
|
|
|
|
|
"pagePath": "pages/index/index",
|
|
|
|
|
"iconPath": "/components/tabbarComponent/icons/home.png",
|
|
|
|
|
"iconPath": "icons/home.png",
|
|
|
|
|
"selectedIconPath": "icons/homeActive.png",
|
|
|
|
|
"text": "首页"
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"pagePath": "pages/insight/index",
|
|
|
|
|
"iconPath": "/components/tabbarComponent/icons/insight.png",
|
|
|
|
|
"iconPath": "icons/insight.png",
|
|
|
|
|
"selectedIconPath": "icons/insightActive.png",
|
|
|
|
|
"text": "洞察"
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"pagePath": "pages/brandSearch/index",
|
|
|
|
|
"iconPath": "/components/tabbarComponent/icons/appSearch.png",
|
|
|
|
|
"iconPath": "icons/appSearch.png",
|
|
|
|
|
"selectedIconPath": "icons/appSearchActive.png",
|
|
|
|
|
"text": "品牌搜索"
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"pagePath": "pages/varComm/index",
|
|
|
|
|
"iconPath": "/components/tabbarComponent/icons/varComm.png",
|
|
|
|
|
"iconPath": "icons/varComm.png",
|
|
|
|
|
"selectedIconPath": "icons/varCommActive.png",
|
|
|
|
|
"text": "对比"
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"pagePath": "pages/mine/index",
|
|
|
|
|
"iconPath": "/components/tabbarComponent/icons/mine.png",
|
|
|
|
|
"iconPath": "icons/mine.png",
|
|
|
|
|
"selectedIconPath": "icons/mineActive.png",
|
|
|
|
|
"text": "我的"
|
|
|
|
|
}
|
|
|
|
|
],//tabbar循环数据集
|
|
|
|
|
},
|
|
|
|
|
attached() {
|
|
|
|
|
], //tabbar循环数据集
|
|
|
|
|
},
|
|
|
|
|
attached() {},
|
|
|
|
|
methods: {
|
|
|
|
|
switchTab(e) {
|
|
|
|
|
const data = e.currentTarget.dataset;
|
|
|
|
@ -45,8 +43,9 @@ Component({
|
|
|
|
|
this.setData({
|
|
|
|
|
selected: data.index
|
|
|
|
|
})
|
|
|
|
|
wx.switchTab({url})
|
|
|
|
|
wx.switchTab({
|
|
|
|
|
url
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
})
|