悠悠楠杉
网站页面
<view bindtouchstart="touchstart" bindtouchend="touchend">123456</view>
//touch start
touchstart: function(e) {
this.startTime = e.timeStamp;
console.log(this.startTime)
},
//touch end
touchend: function(e) {
this.endTime = e.timeStamp;
console.log(this.endTime)
console.log("endTime - startTime = " + (this.endTime-this.startTime));
if (this.endTime - this.startTime>600){
console.log('长按')
}
}