devServer: {
open: true,
host: 'localhost',
port: 8082,
hotOnly:false,
proxy: {
'/factory': {
ws: false,
target: 'https://www.sunspots.tech/factory',
changeOrigin: true,
secure: false,
pathRewrite: {
"^/factory": ""
}
}
}
devServer: {
open: true,
host: 'localhost',
port: 8082,
hotOnly:false,
proxy: {
'/factory': {
ws: false,
target: 'https://www.sunspots.tech/factory',
changeOrigin: true,
secure: false,
pathRewrite: {
"^/factory": ""
}
}
}
是不是你二次封装axios出问题了 ,baseURL应该加上
'/factory'
具体看看我封装的文章https://blog.csdn.net/Lazy33/article/details/109460783
我的文章也有axios的二次封装
大概就是你的axios的问题