20 lines
391 B
JavaScript
20 lines
391 B
JavaScript
// Pages/index/index.js
|
|
Page({
|
|
/**
|
|
* 生命周期函数--监听页面显示
|
|
*/
|
|
onShow() {
|
|
if (typeof this.getTabBar === 'function' && this.getTabBar()) {
|
|
this.getTabBar().setData({
|
|
tabBarShow:false, //true/false
|
|
})
|
|
}
|
|
},
|
|
toGo(e){
|
|
console.log(e.currentTarget.dataset.url)
|
|
wx.switchTab({
|
|
url: e.currentTarget.dataset.url
|
|
})
|
|
}
|
|
|
|
}) |