scxxf
scxxf
  • 发布:2019-11-29 22:49
  • 更新:2020-04-10 09:56
  • 阅读:1269

uni.request无法获取页面内容,浏览器中能正常返回

分类:uni-app

uni.request({
url: 'http://quote.eastmoney.com/stocklist.html',
success: (res) => {
console.log(res.data)
}
请问这段代码为何获取不到页面的内容,但在浏览器中能正常看内容,下面是控制台得到的返回内容
{
"data": "",
"statusCode": 200,
"header": {
"X-Android-Received-Millis": "1575038831964",
"Transfer-Encoding": "chunked",
"Age": "20",
"ETag": "\"e2a37fb92463d51:0\"",
"Server": "Tengine",
"Last-Modified": "Wed, 04 Sep 2019 13:29:05 GMT",
"Date": "Fri, 29 Nov 2019 14:47:15 GMT",
"
": "HTTP/1.1 200 OK",
"Accept-Ranges": "bytes",
"Content-Type": "text/html",
"X-Android-Sent-Millis": "1575038831947",
"X-Ws-Request-Id": "5de12f73_PSscdydx5lz63_16032-21245",
"Connection": "keep-alive",
"X-Android-Response-Source": "NETWORK 200",
"X-Via": "1.1 PSzjjhdx6sb105:0 (Cdn Cache Server V2.0), 1.1 PSscdydx5ci67:1 (Cdn Cache Server V2.0)",
"X-Powered-By": "ASP.NET"
},
"errMsg": "request:ok"
}

2019-11-29 22:49 负责人:无 分享
已邀请:
scxxf

scxxf (作者)

哪位大佬能解答一下,谢谢

scxxf

scxxf (作者)

哪位大佬能解答一下,谢谢

孙小花儿

孙小花儿 - uniApp的Bug多到超乎我的想象

我今天也遇到了,然后将HBuilderX更新到最新版本重新运行就好了。

  • 3***@qq.com

    我也是相同的问题,请问你是哪个版本的?我现在用的2.7.14

    2020-07-17 15:16

该问题目前已经被锁定, 无法添加新回复