package.json
, use fetch
request, no problem during development
"proxy": {
"/api": {
"target": "https://h5.ele.me",
"changeOrigin": true,
"pathRewrite": {
"^/api": "/"
}
}
}
//
fetch(`api/restapi/shopping/v3/hot_search_words?latitude=${a.latitude}&longitude=${a.longitude}`)
deployment using github pages after build resulted in an error in the request. The paragraph in the red box below should be the above target, so the request failed. How to modify this situation? if not, is there another way to preview the project