代碼如下:
[AppleScript] 純文本查看 復(fù)制代碼
?
01
02
03
04
05
06
07
08
09
10
11
12
13
14
15
16
17
18
19
20
21
22
|
wx.request({
url: 'http://route.showapi.com/', // 調(diào)用接口
data: {
showapi_appid: '//用戶(hù)名',
showapi_sign: '//密匙',
code: res.result
},
header: { 'content-type': 'application/x-www-form-urlencoded' },
method: 'get',
success: function (res) {
wx.hideLoading()
console.log(res.data)
that.setData({
barcodeData: res.data.data
}),
wx.showToast({
title: '掃描成功請(qǐng)稍等',
icon: 'success',
duration: 500
});
}
})
|
最后報(bào)錯(cuò)
Setting data field "barcodeData" to undefined is invalid.
求大神解答啊,感激不敬 |