小程序滚动视图
<!-- <scroll-view scroll-y class="screenheght" bindscrolltoupper="upper" bindscrolltolower="lower" bindscroll="scroll" scroll-into-view="{{toView}}" scroll-top="{{scrollTop}}">
<block wx:for="{{imgUrls}}" wx:key="{{index}}">
<image src="{{item}}" class="scroll-view-item"/>
</block>
</scroll-view> -->
左右滑动手势
var distanceX = event.changedTouches[0].pageX - this.startX;
var distanceY = event.changedTouches[0].pageY - this.startY
if (Math.abs(distanceX) > Math.abs(distanceY) && distanceX > 0) {
console.log('往右滑动');
} else if (Math.abs(distanceX) > Math.abs(distanceY) && distanceX < 0) {
console.log('往左滑动');
} else {
console.log('上下滑动');
}