传参数:
<navigator url='/pages/details/details?type=top100'>Go Go Go</navigator>
接收参数:
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
let type = options.type;
console.log(type) // top100
},
微信小程序里面URL传参,是不是很简单呢?
传参数:
<navigator url='/pages/details/details?type=top100'>Go Go Go</navigator>
接收参数:
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
let type = options.type;
console.log(type) // top100
},
微信小程序里面URL传参,是不是很简单呢?