| | |
| | | }, |
| | | touchmove(e) { |
| | | var touchMove = e.detail.scrollTop; |
| | | if(touchMove - touchDot > 60){ |
| | | if(touchDot - touchMove > 16){ |
| | | touchDot = touchMove |
| | | this.fadeOut(); |
| | | } |
| | | if(touchDot - touchMove > 60){ |
| | | this.fadeIn(); |
| | | this.setData({ showCate: true }) |
| | | if(touchDot - touchMove > 16){ |
| | | touchDot = touchMove |
| | | setTimeout(() => { |
| | | this.setData({ showCate: true }) |
| | | this.fadeIn(); |
| | | }, 200) |
| | | } |
| | | }, |
| | | fadeIn: function () { |
| | |
| | | this.setData({ |
| | | animationData: this.animation.export() |
| | | }); |
| | | |
| | | }, |
| | | fadeOut: function () { |
| | | this.animation.opacity(0).step(); |
| | |
| | | }); |
| | | setTimeout(() => { |
| | | this.setData({ showCate: false }); |
| | | }, 500); // 动画持续时间 |
| | | }, 200); // 动画持续时间 |
| | | }, |
| | | /** |
| | | * 生命周期函数--监听页面显示 |