the react project created by create-app-react uses fetch to request the interface of ele.me. Cross-domain settings have been configured in package.json, but the request has no effect
"proxy":{
"/api":{
"target":"https://h5.ele.me",
"changeOrigin":true
}
}
componentDidMount(){
fetch("/api/restapi/shopping/openapi/entries?latitude=34.04347829999999&longitude=-118.2519314&templates[]=main_template&templates[]=favourable_template&templates[]=svip_template&terminal=h5").then(response => {
console.log(response);
return response;
})
}