Committed by
shuaiguo
修改tab切上报
Showing
2 changed files
with
9 additions
and
3 deletions
@@ -72,12 +72,14 @@ export default { | @@ -72,12 +72,14 @@ export default { | ||
72 | 72 | ||
73 | this.scrollTimer && clearTimeout(this.scrollTimer); | 73 | this.scrollTimer && clearTimeout(this.scrollTimer); |
74 | this.scrollTimer = setTimeout(this.onScrollEnd.bind(this), 400); | 74 | this.scrollTimer = setTimeout(this.onScrollEnd.bind(this), 400); |
75 | - if(!this.loading || !this.loading.noMore) { | 75 | + if (!this.loading || !this.loading.noMore) { |
76 | if (this.scrollHeight - top < this.$el.offsetHeight * 2) { | 76 | if (this.scrollHeight - top < this.$el.offsetHeight * 2) { |
77 | this._onPullingUp(); | 77 | this._onPullingUp(); |
78 | } | 78 | } |
79 | } | 79 | } |
80 | - | 80 | + }, |
81 | + getScrollTop() { | ||
82 | + return this.$el.scrollTop; | ||
81 | }, | 83 | }, |
82 | onScrollEnd() { | 84 | onScrollEnd() { |
83 | this.$emit('scroll-end', {y: -this.$el.scrollTop}); | 85 | this.$emit('scroll-end', {y: -this.$el.scrollTop}); |
@@ -207,6 +207,8 @@ export default { | @@ -207,6 +207,8 @@ export default { | ||
207 | 207 | ||
208 | // 点击tab flag, 0: 推荐, 1: 价格, 2: 人气, 3: 新品 | 208 | // 点击tab flag, 0: 推荐, 1: 价格, 2: 人气, 3: 新品 |
209 | async pressType(flag) { | 209 | async pressType(flag) { |
210 | + let yasEventFlag = this.$refs.scroll.getScrollTop(); | ||
211 | + | ||
210 | if (flag === this.selectedType && flag !== 1) { | 212 | if (flag === this.selectedType && flag !== 1) { |
211 | return; | 213 | return; |
212 | } | 214 | } |
@@ -243,6 +245,9 @@ export default { | @@ -243,6 +245,9 @@ export default { | ||
243 | this.changeArrow(); | 245 | this.changeArrow(); |
244 | this.yasShowPage(); | 246 | this.yasShowPage(); |
245 | this.yasTab(); | 247 | this.yasTab(); |
248 | + if (yasEventFlag === 0) { | ||
249 | + this.$refs.product.yasShowEvent(0); | ||
250 | + } | ||
246 | }, | 251 | }, |
247 | goSearch() { | 252 | goSearch() { |
248 | this.yasGoSearch(); | 253 | this.yasGoSearch(); |
@@ -348,7 +353,6 @@ export default { | @@ -348,7 +353,6 @@ export default { | ||
348 | z-index: 999; | 353 | z-index: 999; |
349 | background: #fff; | 354 | background: #fff; |
350 | position: absolute; | 355 | position: absolute; |
351 | - z-index: 1; | ||
352 | } | 356 | } |
353 | 357 | ||
354 | .filter-tab { | 358 | .filter-tab { |
-
Please register or login to post a comment