2022-12-26 12:02:35 +08:00

35 lines
766 B
JavaScript

// 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() {
},
})