''
liukangdong
2024-08-02 1cee3a660c5f8e5f4290ae894c2898c4966a834d
wechat_jiaxuan/pages/index/index.js
@@ -12,6 +12,7 @@
  eventBus
} from '../../utils/eventBus'
const app = getApp()
var touchDot = 0; //触摸时的原点
Page({
  /**
@@ -21,6 +22,8 @@
    // 顶部nav
    topHeadStyle: 1,
    top: 0,
    open: false,
    desc: true,
    font_color: '#ffffff',
    ZSZXCata: {},
@@ -56,6 +59,10 @@
    // 已经登录,可以走依赖token的逻辑了
    console.log('首页的onLoadLogin', options, `{"token":"${app.globalData.token}"}`);
    this.initData()
    const member = wx.getStorageSync('member')
    this.setData({
      member
    })
  },
  onReady() {
    const windowInfo = wx.getWindowInfo()
@@ -75,7 +82,6 @@
    this.setData({
      member
    })
    eventBus.once("reloadHome", () => {
      console.log('reloadHome');
      this.onLoad()
@@ -121,6 +127,7 @@
            url: '/pages/design/design'
          })
        } else {
          wx.setStorageSync('tempPath', '/pages/auth/auth')
          wx.navigateTo({
            url: '/pages/auth/auth',
          })
@@ -375,6 +382,24 @@
      id
    })
  },
  hdBtn() {
    this.setData({ showWhiteHead: true, open: true,font_color: "#000000", sty: '',topHeadStyle: 1, desc: false })
  },
  touchStart: function (e) {
    touchDot = e.touches[0].pageY;
  },
  touchMove: function (e) {
    var touchMove = e.touches[0].pageY;
    if (touchMove - touchDot <= 0 && this.data.top <= 1 && this.data.desc) {
      this.setData({ showWhiteHead: true, open: false, desc: false })
      setTimeout(() => {
        this.setData({ open: true, sty: '' })
      }, 1000)
    }
    if (touchMove - touchDot >= 50 && this.data.top <= 1 && !this.data.desc) {
      this.setData({ showWhiteHead: false, open: false, desc: true, sty: 'overflow: hidden;' })
    }
  },
  onPageScroll(e) {
    const { videoTop, windowHeight, videoPlay } = this.data
    if(e.scrollTop - 100 > videoTop - (windowHeight / 2) && videoPlay ){