| | |
| | | import { getCataLogTagList, getZhongTaiWholecasePage, actionDo } from '../../api/index' |
| | | let touchDot = 0 |
| | | Component({ |
| | | /** |
| | | * 组件的属性列表 |
| | |
| | | menuButtonInfo: Object |
| | | }, |
| | | data: { |
| | | // 动画 |
| | | showTouch: true, |
| | | animationData: {}, |
| | | |
| | | activeIndex: -1, |
| | | activeParam: [], |
| | | selParam: '', |
| | |
| | | attached() { |
| | | this.getCatelist() |
| | | this.getList() |
| | | this.animation = wx.createAnimation({ |
| | | duration: 600, |
| | | timingFunction: 'ease', |
| | | }); |
| | | }, |
| | | methods: { |
| | | bindscrolltoupper() { |
| | | this.setData({ showTouch: true }) |
| | | this.fadeIn(); |
| | | }, |
| | | touchstart(e){ |
| | | touchDot = e.detail.scrollTop; |
| | | }, |
| | | touchmove(e) { |
| | | var touchMove = e.detail.scrollTop; |
| | | if(touchMove - touchDot > 60){ |
| | | this.fadeOut(); |
| | | } |
| | | if(touchDot - touchMove > 60){ |
| | | this.fadeIn(); |
| | | this.setData({ showTouch: true }) |
| | | } |
| | | }, |
| | | fadeIn: function () { |
| | | this.animation.opacity(1).step(); |
| | | this.setData({ |
| | | animationData: this.animation.export() |
| | | }); |
| | | }, |
| | | fadeOut: function () { |
| | | this.animation.opacity(0).step(); |
| | | this.setData({ |
| | | animationData: this.animation.export() |
| | | }); |
| | | setTimeout(() => { |
| | | this.setData({ showTouch: false }); |
| | | }, 500); // 动画持续时间 |
| | | }, |
| | | refreshCount(){ |
| | | let temData = wx.getStorageSync('conentCountTemp') |
| | | if(temData && this.data.dataList){ |