diff --git a/custom-tab-bar/index.js b/custom-tab-bar/index.js index e6169da..daa6af3 100644 --- a/custom-tab-bar/index.js +++ b/custom-tab-bar/index.js @@ -53,11 +53,18 @@ Component({ */ methods: { switchTab(e) { - // console.log(e); + console.log(e); const data = e.currentTarget.dataset; const url = data.path; + if(url === '/pages/life/life'){ + wx.showToast({ + title: '暂未开放,敬请期待', + icon:'none' + }) + }else{ app.globalData.selected = data.index; wx.switchTab({url}) + } } } })