(e)
| 38 | this._getProductData(this.data.currentType); |
| 39 | }, |
| 40 | scrollPosition(e) { |
| 41 | // 1.获取滚动的顶部 |
| 42 | const position = e.detail.scrollTop; |
| 43 | |
| 44 | // 2.设置是否显示 |
| 45 | this.setData({ |
| 46 | showBackTop: position > BACK_TOP_POSITION, |
| 47 | }) |
| 48 | |
| 49 | wx.createSelectorQuery().select('.tab-control').boundingClientRect((rect) => { |
| 50 | const show = rect.top > 0 |
| 51 | this.setData({ |
| 52 | showTabControl: !show |
| 53 | }) |
| 54 | }).exec() |
| 55 | }, |
| 56 | onImageLoad() { |
| 57 | wx.createSelectorQuery().select('.tab-control').boundingClientRect((rect) => { |
| 58 | this.setData({ |
nothing calls this directly
no outgoing calls
no test coverage detected