2023-05-10 10:49:40 +08:00

22 lines
460 B
JavaScript

// Pages/index/index.js
import { API } from './../../../utils/network/api'
const api = new API()
Page({
data: {
static_host: api.getStaticHost()
},
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
})
}
})