RN用fetch请求的一个json数据,使用response.text()可以看到是有数据的,如{"code":0,"data":{"keyword":"周杰伦","priority":0,"qc":[],"semantic":{"curnum":0,"curpage":1,"list":[],"totalnum":0},"song":xxxxx.....},但是改成response.json,获取数据中的data确提示 undefined,请问怎么回事???


代码是 fetch(REQUEST_URL)
.then((response) => response.json)
.then((responseData) => {
console.log("result : "+responseData.data)

})
展开
评论