jiangping
2024-07-12 5776f4f5be2d5aa37a1e928ba95567dfc2e97d5c
wechat_jiaxuan/pages/mine/mine.js
@@ -5,16 +5,26 @@
   * 页面的初始数据
   */
  data: {
    clientHeight: 0,
    clientTop: 0,
  },
  /**
   * 生命周期函数--监听页面加载
   */
  onLoad(options) {
    const res = wx.getMenuButtonBoundingClientRect()
    this.setData({clientHeight: res.height})
    this.setData({clientTop: res.top})
  },
  changePath(e) {
    // 页面跳转
    let temp = ['mysub', 'collect', 'favorite', 'index']
    const index = e.currentTarget.dataset.index
    wx.navigateTo({
      url: `/pages/userinfo/${temp[index]}`,
    })
  },
  /**
   * 生命周期函数--监听页面初次渲染完成
   */