index.js 601 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. // index.js
  2. // 获取应用实例
  3. const app = getApp()
  4. Page({
  5. data: {
  6. },
  7. // 事件处理函数
  8. bindViewTap() {
  9. wx.navigateTo({
  10. url: '../logs/logs'
  11. })
  12. },
  13. //生命周期
  14. onLoad() {
  15. if (wx.getUserProfile) {
  16. this.setData({
  17. canIUseGetUserProfile: true
  18. })
  19. }
  20. },
  21. /**
  22. * 生命周期函数--监听页面显示
  23. */
  24. onShow() {
  25. if (typeof this.getTabBar === 'function' &&
  26. this.getTabBar()) {
  27. this.getTabBar().setData({
  28. //唯一标识(其它设置不同的整数)
  29. selected: 0
  30. })
  31. }
  32. },
  33. })