Commit 14680dae by zhangxw

工作台吸顶体验优化

1 parent 8d6f8646
...@@ -216,20 +216,20 @@ Page({ ...@@ -216,20 +216,20 @@ Page({
[`list[${pageNum - 1}]`]: list [`list[${pageNum - 1}]`]: list
}) })
} }
if (repload) { // if (repload) {
const query = wx.createSelectorQuery().in(this) // const query = wx.createSelectorQuery().in(this)
query.select('.top-box').boundingClientRect() // query.select('.top-box').boundingClientRect()
query.exec(res => { // query.exec(res => {
let topBoxHeight = res[0].height // let topBoxHeight = res[0].height
if (scrollTop >= topBoxHeight) { // if (scrollTop >= topBoxHeight) {
setTimeout(() => { // setTimeout(() => {
this.setData({ // this.setData({
setScrollTop: topBoxHeight // setScrollTop: topBoxHeight
}) // })
}, 200) // }, 200)
} // }
}) // })
} // }
this.setData({ this.setData({
total, total,
flag: true, flag: true,
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!