liukangdong
2024-08-05 00bf17838b496e6fcfed2e521f9c27f8f0e3e3c7
wechat_jiaxuan/pages/index/index.js
@@ -402,11 +402,12 @@
  },
  onPageScroll(e) {
    const { videoTop, windowHeight, videoPlay } = this.data
    if(e.scrollTop - 100 > videoTop - (windowHeight / 2) && videoPlay ){
    if(e.scrollTop + 100 > videoTop - (windowHeight / 2) && videoPlay ){
      this.setData({ videoPlay: false })
      let videoplay = wx.createVideoContext('myvideo', this)
      videoplay.play();
    }
    let scrollTop = e.scrollTop / 100
    if (scrollTop <= 0.1) {
      this.setData({