Commit 2376f8c7 by chengzhichun

限时特惠

parent 8fa9993f
...@@ -77,7 +77,7 @@ ...@@ -77,7 +77,7 @@
<cube-nav :datas="item1"></cube-nav> <cube-nav :datas="item1"></cube-nav>
</div> </div>
<div v-else-if="item1.componentCode == 'time-limited-discount' && item1.componentInfo.visible == 1"> <div v-else-if="item1.componentCode == 'time-limited-discount' && item1.componentInfo.visible == 1">
<time-limited-discount :datas="item1"></time-limited-discount> <time-limited-discount :datas="item1" class="time-limited-discount" :id="'time-limited-discount' + index"></time-limited-discount>
</div> </div>
<div v-if="item1.componentCode == 'links' && item1.componentInfo.visible == 1"> <div v-if="item1.componentCode == 'links' && item1.componentInfo.visible == 1">
<links :datas="item1"></links> <links :datas="item1"></links>
...@@ -353,7 +353,15 @@ export default { ...@@ -353,7 +353,15 @@ export default {
mounted() { mounted() {
this.$nextTick(() => { this.$nextTick(() => {
this.getAllTabWidth(); this.getAllTabWidth();
setTimeout(() => {
if(this.$parent.$mp.page.selectAllComponents('.time-limited-discount')){
this.$parent.$mp.page.selectAllComponents('.time-limited-discount').forEach(item => {
item.loaded = false;
item.isContain = false;
item.getScroll()
})
}
},2000)
}); });
}, },
methods: { methods: {
...@@ -365,7 +373,22 @@ export default { ...@@ -365,7 +373,22 @@ export default {
this.tabInfoList=rect[0]||[]; this.tabInfoList=rect[0]||[];
this.initTabs(0); this.initTabs(0);
}, },
getScroll(){
if(this.$parent.$mp.page.selectAllComponents('.time-limited-discount')){
this.$parent.$mp.page.selectAllComponents('.time-limited-discount').forEach(item => {
item.getScroll()
})
}
},
changeTab(res) { changeTab(res) {
console.log(this.$parent.$mp.page.selectAllComponents('.time-limited-discount'),'====111111222')
if(this.$parent.$mp.page.selectAllComponents('.time-limited-discount')){
this.$parent.$mp.page.selectAllComponents('.time-limited-discount').forEach(item => {
item.loaded = false;
item.isContain = false;
item.getScroll()
})
}
this.active=res.target.index; this.active=res.target.index;
}, },
timeOutInitTabs(notGetAllTabWidth) { timeOutInitTabs(notGetAllTabWidth) {
......
...@@ -70,7 +70,7 @@ ...@@ -70,7 +70,7 @@
<official-account></official-account> <official-account></official-account>
</div> </div>
<div v-if="item.componentCode == 'transverse-label' && item.componentInfo.visible == 1"> <div v-if="item.componentCode == 'transverse-label' && item.componentInfo.visible == 1">
<transverse-label :datas="item" :componentIndex="index"></transverse-label> <transverse-label :datas="item" :ref="'transverse-label' + index" :componentIndex="index"></transverse-label>
</div> </div>
<div v-if="item.componentCode == 'photo-gallery' && item.componentInfo.visible == 1"> <div v-if="item.componentCode == 'photo-gallery' && item.componentInfo.visible == 1">
<photo-gallery :datas="item"></photo-gallery> <photo-gallery :datas="item"></photo-gallery>
...@@ -292,6 +292,8 @@ export default { ...@@ -292,6 +292,8 @@ export default {
this.active=checkTabbarPage('/') this.active=checkTabbarPage('/')
} }
console.log(this,'this--==================')
this.$mp.page.onPageScroll= (el)=>{ this.$mp.page.onPageScroll= (el)=>{
throttle(this.scrolls(el),100) throttle(this.scrolls(el),100)
}; };
...@@ -430,6 +432,10 @@ export default { ...@@ -430,6 +432,10 @@ export default {
let com=this.$mp.page.selectComponent(".merchants-list"+i) ; let com=this.$mp.page.selectComponent(".merchants-list"+i) ;
com && com.getScroll(el); com && com.getScroll(el);
} }
if(element.componentCode=="transverse-label"){
let com=this.$refs["transverse-label"+i][0];
com && com.getScroll();
}
} }
} }
......
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