1.catchtap点击事件(与bindtap相比 可阻止冒泡) data-id 后面是你要传递的东西
<view class="goods" wx:for='{
{goodsList}}' wx:key="ORDER_CODE" catchtap="toGoodsDetail" data-id="{
{item.ID}}">
2.点击事件通过e(event)来获取传递的值
---微信小程序js文件
toGoodsDetail(e){
// console.log(e);
var ID = e.currentTarget.dataset.id;<