Commit 49fcb96d by 程智春

fix

parent a9f186ef
......@@ -12,8 +12,8 @@ export default {
JSON.stringify(extConfig) == "{}"
) {
// extConfig = { mixid: "jordan", shopid: 471 };
extConfig = { "mixid":"xyyx",
"shopid":133 };
extConfig = { "mixid":"antgood",
"shopid":67 };
}
console.log("1444444444", extConfig);
this.$store.commit("setExtConfig", extConfig.mixid);
......
......@@ -10,7 +10,7 @@
<banner :datas="item"></banner>
</div>
<div v-else-if="item.componentCode=='goods-list' && item.componentInfo.visible == 1" style="height:100%;">
<goods-list class="merchants-list" :datas="item"></goods-list>
<goods-list :class="'goodsListItem' + index" :datas="item"></goods-list>
</div>
<div v-else-if="item.componentCode == 'area-navigation' && item.componentInfo.visible == 1">
<area-navigation :datas="item" :changeLocation="changeLocation"></area-navigation>
......@@ -82,7 +82,7 @@
<share-picture :datas="item"></share-picture>
</div>
<div v-if="item.componentCode == 'merchants-list' && item.componentInfo.visible == 1">
<merchants-list class="goodsListItem" :datas="item"></merchants-list>
<merchants-list :class="'merchants-list' +index" :datas="item"></merchants-list>
</div>
</div>
<bottomCont></bottomCont>
......@@ -269,12 +269,12 @@ export default {
let com=this.$mp.page.selectComponent(".time-limited-discount"+i) ;
com && com.getScroll(el);
}
if(element.componentCode=="merchants-list"){
let com=this.$mp.page.selectComponent(".merchants-list"+i) ;
if(element.componentCode=="goods-list"){
let com=this.$mp.page.selectComponent(".goodsListItem"+i) ;
com && com.getScroll(el);
}
if(element.componentCode=="goodsListItem"){
let com=this.$mp.page.selectComponent(".goodsListItem"+i) ;
if(element.componentCode=="merchants-list"){
let com=this.$mp.page.selectComponent(".merchants-list"+i) ;
com && com.getScroll(el);
}
......
......@@ -162,34 +162,57 @@ Component({
},
getScroll(el) {
let _this = this
this.createSelectorQuery().select("#ItemModule0").boundingClientRect(function(res){
let query = wx.createSelectorQuery().in(this)
let { windowHeight } = wx.getSystemInfoSync()
query.select("#ItemModule0").boundingClientRect(function(res){
if(res){
let scrollTop = parseInt(el.scrollTop);
let domHeight = parseInt(res.height);
if (
scrollTop + _this.data.clientHeight >= domHeight - 150 &&
_this.data.finished == false
) {
// let scrollTop = parseInt(el.scrollTop);
// let domHeight = parseInt(res.height);
if (res.top < windowHeight && res.top + res.height > 0 && _this.data.finished == false) {
_this.loadHandle(2);
}
// if (
// scrollTop + _this.data.clientHeight >= domHeight - 150 &&
// _this.data.finished == false
// ) {
// console.log(scrollTop + _this.data.clientHeight, '44444444444')
// _this.loadHandle(2);
// }
}
}).exec()
this.createSelectorQuery().select("#ItemModule1").boundingClientRect(function(res){
query.select("#ItemModule1").boundingClientRect(function (res) {
if (res) {
let scrollTop = parseInt(el.scrollTop);
let domHeight = parseInt(res.height);
// 窗口高度+滚动高度等于 = 元素整体高度 -(预留一段距离加载) 触发父组件查询接口
if (
scrollTop + _this.data.clientHeight >= domHeight - 150 &&
_this.data.finished == false
) {
// let scrollTop = parseInt(el.scrollTop);
// let domHeight = parseInt(res.height);
if (res.top < windowHeight && res.top + res.height > 0 && _this.data.finished == false) {
_this.loadHandle(2);
}
// if (
// scrollTop + _this.data.clientHeight >= domHeight - 150 &&
// _this.data.finished == false
// ) {
// console.log(scrollTop + _this.data.clientHeight, '44444444444')
// _this.loadHandle(2);
// }
}
}).exec()
// wx.createSelectorQuery().in(this).select("#ItemModule1").boundingClientRect(function(res){
// if (res) {
// let scrollTop = parseInt(el.scrollTop);
// let domHeight = parseInt(res.height);
// // 窗口高度+滚动高度等于 = 元素整体高度 -(预留一段距离加载) 触发父组件查询接口
// if (
// scrollTop + _this.data.clientHeight >= domHeight - 150 &&
// _this.data.finished == false
// ) {
// _this.loadHandle(2);
// }
// }
// }).exec()
},
scrolltolower(){
if(this.data.finished == false){
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment