Commit 48f1002c by zhangquan

分享吸顶优化

1 parent b574b857
...@@ -29,10 +29,8 @@ Component({ ...@@ -29,10 +29,8 @@ Component({
lifetimes:{ lifetimes:{
ready: function (){ ready: function (){
wx.$eventbus.on('evt_page_scroll',(e)=>{ wx.$eventbus.on('evt_page_scroll',(e)=>{
// console.log(e)
wx.$util.getViewInfo('.header',async (res)=> { wx.$util.getViewInfo('.header',async (res)=> {
let heightTop = res.height let heightTop = this.data.isShare ? 0 : (res?.height || 0)
let prodArr = await this.getHeight('.prod-wrap') let prodArr = await this.getHeight('.prod-wrap')
heightTop += prodArr[0].height heightTop += prodArr[0].height
let imgArr = await this.getHeight('.img-item') let imgArr = await this.getHeight('.img-item')
...@@ -97,7 +95,7 @@ Component({ ...@@ -97,7 +95,7 @@ Component({
}) })
this.data.throttle = true this.data.throttle = true
wx.$util.getViewInfo('.header',async (res)=> { wx.$util.getViewInfo('.header',async (res)=> {
let heightTop = res.height let heightTop = this.data.isShare ? 0 : (res?.height || 0)
let prodArr = await this.getHeight('.prod-wrap') let prodArr = await this.getHeight('.prod-wrap')
heightTop += prodArr[0].height heightTop += prodArr[0].height
let imgArr = await this.getHeight('.img-item') let imgArr = await this.getHeight('.img-item')
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!