在webpack工程里里写了一个js,供vue使用。
不管是用jsonp(npm上的)还是fetch-jsonp(github上的包)都报错。
js是如下:
fetchJsonp(resourceUrl).then(function (response) {
return response.json()
}).then(function (json) {
console.log(json)
}).catch(function (ex) {
console.error(ex)
})
看到请求发出去了,结果得到了,但是一直报错:
Error: JSONP request to ******** timed out
at eval (fetch-jsonp.js?4706:85)
慕姐4208626
慕森卡
相关分类