index.js 298 B

123456789101112131415161718
  1. Page({
  2. /**
  3. * 页面的初始数据
  4. */
  5. data: {},
  6. /**
  7. * 生命周期函数--监听页面加载
  8. */
  9. onShow() {
  10. if (typeof this.getTabBar === 'function') {
  11. this.getTabBar().setData({
  12. selected: 1
  13. })
  14. }
  15. },
  16. })