var urls = [ "xxxxxx", "xxxxxxxxx"];function(urls) { return Promise.all(urls.map(url => fetch(url,{ mode: "no-cors", headers: { "Content-Type": "text/html;charset=UTF-8", } }).then((response) => { console.log(response); if (response.ok) { return response.text(); } else { return {status:response.status}; } }) )).catch((err)=> { return {status:-1}; })}跨域请求数据已经拿到,但是response的状态是false是为什么?
添加回答
举报
0/150
提交
取消