there is no configuration in the portal file axios.defaults.baseURL
only the following configuration
but prompts GET http://localhost:8080/api/movie/top250?start=25&count=25 404 (Not Found)
Why?
under
config
proxyTable: {
"/api": {
target: "http://api.douban.com/v2/",
changeOrigin: true,
pathRewrite: {
"^/api": "/"
}
}
},
import axios from "axios"
mounted () {
axios.get("/api/movie/top250?start=25&count=25").then(res => {
console.log(res)
})
}