Browse Source

跳转tabbar禁止

epass
mk 2 months ago
parent
commit
6ad5de55ca
  1. 9
      custom-tab-bar/index.js

9
custom-tab-bar/index.js

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

Loading…
Cancel
Save