微信小程序 功能函数 点击传参和页面

// 商品详情页跳转函数
detailInto: function (e) {
// console.log()
var change = e.currentTarget.dataset.id;
wx.navigateTo({
url: '../detail/detail?id=' + change
})
},
//接收的页面
onLoad: function (opt) {
var selectnum= this.data.selectnum;
selectnum.sq = opt.key;

this.setData({
selectnum: selectnum,
shoplist: this.data.shops
});
原文地址:https://www.cnblogs.com/dianzan/p/7783905.html