wx.request中的header
wx.request({
url: ‘https://open.hscloud.cn/quote/v1/real?en_prod_code=601766.SS&fields=preclose_px’ ,
dataType: ‘json’,
method: ‘GET’,
header: {
‘Authorization’: “Bearer 16B0723AFE4649A7BE5B8F61F9AC5BF32017072310272951834297”,
},
success: function (res) {
debugger
},
fail: function (res) {
console.log(res.data)
console.log(‘服务器请求失败!’)
},
})
我用本地调用这个接口没有问题,用你们的就报错了!
{"error":"invalid_token","error_description":"未携带访问令牌!"}