You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 

47 lines
1.3 KiB

Component({
data: {
selected: 0,
color: "#e2e2e2",
selectedColor: "#000000",
bordImg: "../assets/images/tabIcon/my-bord.png",
list: [{
pagePath: "/pages/calendar/calendar",
iconPath: "../assets/images/tabIcon/calendar.png",
selectedIconPath: "../assets/images/tabIcon/calendar-a.png",
text: "日历"
}, {
pagePath: "/pages/look/look",
iconPath: "../assets/images/tabIcon/look.png",
selectedIconPath: "../assets/images/tabIcon/look-a.png",
text: "看地"
},{
pagePath: "/pages/index/index",
iconPath: "../assets/images/tabIcon/air.png",
selectedIconPath: "../assets/images/tabIcon/air.png",
text: "首页"
},{
pagePath: "/pages/calculation/calculation",
iconPath: "../assets/images/tabIcon/calculation.png",
selectedIconPath: "../assets/images/tabIcon/calculation-a.png",
text: "测算"
},{
pagePath: "/pages/ucenter/ucenter",
iconPath: "../assets/images/tabIcon/ucenter.png",
selectedIconPath: "../assets/images/tabIcon/ucenter-a.png",
text: "我的"
}]
},
attached() {
},
methods: {
switchTab(e) {
const data = e.currentTarget.dataset
const url = data.path
console.log(data)
wx.switchTab({url})
this.setData({
selected: data.index
})
}
}
})