From b2d360d9113b6955287108ca9e90d76a1f3c1419 Mon Sep 17 00:00:00 2001
From: liukangdong <898885815@qq.com>
Date: 星期日, 29 九月 2024 15:05:11 +0800
Subject: [PATCH] Merge branch 'master' of http://139.186.142.91:10010/r/productDev/zbomyoujia
---
wechat_staff/pages/index/index.js | 8 +++-----
1 files changed, 3 insertions(+), 5 deletions(-)
diff --git a/wechat_staff/pages/index/index.js b/wechat_staff/pages/index/index.js
index 571385e..8507d8d 100644
--- a/wechat_staff/pages/index/index.js
+++ b/wechat_staff/pages/index/index.js
@@ -49,8 +49,6 @@
rect.top // 鑺傜偣鐨勪笂杈圭晫鍧愭爣
rect.bottom // 鑺傜偣鐨勪笅杈圭晫鍧愭爣
}).exec(res => {
- console.log('res', res);
- console.log(windowInfo.windowHeight)
this.setData({ videoTop: res[0].top,windowHeight: windowInfo.windowHeight})
})
}, 2000)
@@ -61,7 +59,7 @@
fileType: '0'
}).then(res => {
this.setData({
- DailyUpdates: res.data
+ DailyUpdates: res.data || {}
})
})
// 浜у搧瑙嗛
@@ -69,7 +67,7 @@
pageSize: 1,
pageNum: 1
}).then(res => {
- if (res.data.records && res.data.records.length > 0) {
+ if (res.data && res.data.records && res.data.records.length > 0) {
this.setData({
productVideo: res.data.records
})
@@ -129,7 +127,7 @@
},
onPageScroll(e) {
const { videoTop, windowHeight, videoPlay } = this.data
- if(e.scrollTop > videoTop - (windowHeight / 2) && videoPlay ){
+ if(e.scrollTop + 60 > videoTop - (windowHeight / 2) && videoPlay ){
this.setData({ videoPlay: false })
let videoplay = wx.createVideoContext('myvideo', this)
videoplay.play();
--
Gitblit v1.9.3