html52.com
我爱小程序-开发者交流社区

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')

},


网友回复

娇华:

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

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址

真正的个人免签约支付接口

云免签H5支付