Files
AGuestSaas/custom-tab-bar/index.js
2020-12-28 15:27:42 +08:00

43 lines
936 B
JavaScript

/**
* Web唐明明
* 匆匆数载恍如梦,岁月迢迢华发增。
* 碌碌无为枉半生,一朝惊醒万事空。
*/
Component({
/**
* 组件的初始数据
*/
data: {
selected : getApp().globalData.storeModule.selected,
color : getApp().globalData.storeModule.color,
selectedColor: getApp().globalData.storeModule.selectedColor,
list : getApp().globalData.storeModule.list
},
/**
* 生命周期函数
*/
pageLifetimes: {
show(){
console.log("获取配置信息")
}
},
/**
* 组件的方法列表
*/
methods: {
switchTab(e) {
const data = e.currentTarget.dataset
const url = data.path
wx.switchTab({
url
})
this.setData({
selected: data.index
})
}
}
})