fetch跨域调用第三方API获取数据时要怎么设置

2025-04-28 02:20:35
推荐回答(1个)
回答1:

代码如下:
const URL = ''
let req = URL + word
fetch(req)
.then(res => res.json())
.then(res => console.log(res)
.catch(err => console.log(err)