// pages/qrCode/index.js Page({ data: { tid: '', url: '' }, onLoad(options) { this.data.tid = options.tid if (this.data.tid) { this.getDate() } }, onReady() { }, getDate() { let _this = this wx.request({ url: 'https://honmeigui.huiliuwan.cn/getQrcode?tid=' + this.data.tid, //仅为示例,并非真实的接口地址 header: { "Content-Type": "application/x-www-form-urlencoded" }, success(res) { if (res) { _this.setData({ url: res.data.qrcode }) } } }) }, onShow() { }, })