liukangdong
2024-07-30 1a6905045d38bb50b0c6554c3440bdfd339c8d23
wechat_jiaxuan/pages/index/index.js
@@ -12,6 +12,7 @@
  HYEventBus
} = require('hy-event-store')
const eventBus = new HYEventBus()
const app = getApp()
Page({
  /**
@@ -48,10 +49,15 @@
    HOME_CLASS_B2: '',
    HOME_CLASS_C: '',
  },
  onLoadLogin(options){
    // 已经登录,可以走依赖token的逻辑了
    console.log('首页的onLoadLogin',options,`{"token":"${app.globalData.token}"}`);
    this.initData()
  },
  onShow() {
    let that = this
    const member = wx.getStorageSync('member')
    if (member && (member.authStatus == '1' || member.authStatus == '2')) {
    const member = wx.getStorageSync('member') || {}
    if (member && member.id) {
      getMemberInfo().then(res => {
        this.setData({
          member: res.data
@@ -70,9 +76,6 @@
  onLoad(options) {
    const member = wx.getStorageSync('member')
    this.initDictData()
    setTimeout(() => {
      this.initData()
    }, 1200)
  },
  changePath(e) {
    let index = e.currentTarget.dataset.type
@@ -230,9 +233,13 @@
    })
  },
  bannerbindload(e) {
    const height = e.detail.height
    const {
      height,
      width
    } = e.detail
    let activeHeight = height * 670 / width
    this.setData({
      bannerImgHeight: height
      bannerImgHeight: activeHeight
    })
  },
  consultbindload(e) {
@@ -242,7 +249,7 @@
    } = e.detail
    let activeHeight = height * 670 / width
    this.setData({
      consultImgHeight: activeHeight
      consultImgHeight: activeHeight + 100
    })
  },
  consultClick(e) {