|
|
@@ -441,7 +441,8 @@
|
|
|
content: '' // 公告通知
|
|
|
},
|
|
|
popType: true,
|
|
|
- shopHomeData: {}
|
|
|
+ shopHomeData: {},
|
|
|
+ typeListTop: ''
|
|
|
}
|
|
|
},
|
|
|
|
|
|
@@ -523,7 +524,7 @@
|
|
|
this.bgckgroundSearch = '';
|
|
|
// this.bgckgroundType = '';
|
|
|
}
|
|
|
- if (e.scrollTop > 1180) {
|
|
|
+ if (e.scrollTop > (this.BarH+this.typeListTop+this.indexSearchHeight+45)) {
|
|
|
this.bgckgroundType = '#fff';
|
|
|
} else {
|
|
|
this.bgckgroundType = 'transparent';
|
|
|
@@ -645,8 +646,16 @@
|
|
|
// data是选中元素的大小及位置信息
|
|
|
if (data) {
|
|
|
// 元素的高度
|
|
|
+ // console.log(data, 'e.scrollTop');
|
|
|
this.indexSearchHeight = data.height;
|
|
|
- console.log('元素的高度:', this.indexSearchHeight);
|
|
|
+ // console.log('元素的高度:', this.indexSearchHeight);
|
|
|
+ }
|
|
|
+ }).exec(); // 执行选择器查询
|
|
|
+ query.select('.type-list-box').boundingClientRect(data => {
|
|
|
+ // data是选中元素的大小及位置信息
|
|
|
+ if (data) {
|
|
|
+ // 元素的高度
|
|
|
+ this.typeListTop = data.top + data.height
|
|
|
}
|
|
|
}).exec(); // 执行选择器查询
|
|
|
},
|