小程序扫描二维码进到某个页面,在该页面获取二维码携带的参数

发布时间 2023-03-27 11:03:32作者: 三猫拉拉
onLoad: function (options) {
 
// 分享过来推荐码
if (options && options.qrCodeUuid) {
app.qrCodeUuid = options.qrCodeUuid
app.cityCode=options.areaCode
this.getShareProducts(options.productUuid) //页面逻辑
this.getOnlyProduct(options.qrCodeUuid) //页面逻辑

}
//扫描二维码
if (options && options.scene) {
let scene = decodeURIComponent(options.scene)
this.getProducts(scene) //页面逻辑
}
},