收藏
回答

wxs 编辑器运行可以 真机运行无响应?

wxml 文件代码

<wxs src="list.wxs" module="list_refresh" />

<!-- 选择器 -->

<template is="Screen" data="{{...screenData}}" />

<!-- BODY -->

<scroll-view id='content' bindtouchstart="touchTest" bindtouchmove="{{list_refresh.touchMove}}" bindtouchend="{{list_refresh.touchEnd}}" scroll-y upper-threshold="-50" lower-threshold='80' scroll-with-animation='true' bindscrolltolower="onReachBottom" class='{{noneScroll}}' hidden='{{hideView}}'>

wxs 文件代码

var touchStartX = 0,touchStartY = 0;


function touchStart(e,ins){

console.log('touchStart')

var touch = e.touches[0] || e.changedTouches[0]

touchStartX = touch.pageX

touchStartY = touch.pageY

console.log([touchStartX,touchStartY]);

}

function touchMove(e,ins){

console.log('touchMove')

var touch = e.touches[0] || e.changedTouches[0]

console.log(touch)

}

function touchEnd(e,ins){

console.log("touchEnd")

var touch = e.touches[0] || e.changedTouches[0]

console.log(touch)

}

module.exports = {

touchStart:touchStart,

touchMove:touchMove,

touchEnd:touchEnd

}

js 文件部分代码

touchTest:function(e){

console.log(e);

console.log('test')

},


最后一次编辑于  2019-08-07
回答关注问题邀请回答
收藏

1 个回答

  • 疯狂的小辣椒
    疯狂的小辣椒
    2019-08-07

    你好,麻烦提供出现问题的具体机型、微信版本号、系统版本号,以及能复现问题的代码片段(https://developers.weixin.qq.com/miniprogram/dev/devtools/minicode.html)

    2019-08-07
    有用
    回复 4
登录 后发表内容
问题标签