3 changed files with 30 additions and 22 deletions
@ -0,0 +1,24 @@ |
|||
// app.js
|
|||
App({ |
|||
globalData: { |
|||
userInfo: null, |
|||
currentTab: 'index' |
|||
}, |
|||
|
|||
// 更新当前选中的tab
|
|||
updateCurrentTab(tabName) { |
|||
this.globalData.currentTab = tabName; |
|||
}, |
|||
|
|||
onLaunch() { |
|||
console.log('App launched'); |
|||
}, |
|||
|
|||
onShow() { |
|||
console.log('App shown'); |
|||
}, |
|||
|
|||
onHide() { |
|||
console.log('App hidden'); |
|||
} |
|||
}); |
|||
Loading…
Reference in new issue