阅读量:154

小程序获取当前页面id的案例:
.wxml文件代码:
{{item.name}}
.js文件代码:
catchTapCategory: function (e) { var that = this;
var goodsId = e.currentTarget.dataset.goodsid;
console.log('goodsId:' + goodsId);
wx.navigateTo({ url: '../detail/detail?goodsId=' + goodsId })
},