mirror of
https://github.com/fantastic-admin/basic.git
synced 2026-10-07 11:34:10 +08:00
调整请求代理,默认不开启
This commit is contained in:
+1
-1
@@ -14,7 +14,7 @@ const toLogin = () => {
|
||||
}
|
||||
|
||||
const api = axios.create({
|
||||
baseURL: process.env.NODE_ENV !== 'development' && process.env.VUE_APP_API_ROOT,
|
||||
baseURL: process.env.VUE_APP_API_ROOT,
|
||||
timeout: 10000,
|
||||
responseType: 'json'
|
||||
// withCredentials: true
|
||||
|
||||
+6
-7
@@ -54,13 +54,12 @@ module.exports = {
|
||||
productionSourceMap: false,
|
||||
devServer: {
|
||||
open: true,
|
||||
// 开发环境默认开启反向代理,如果不需要请自行注释
|
||||
proxy: {
|
||||
'/': {
|
||||
target: process.env.VUE_APP_API_ROOT,
|
||||
changeOrigin: true
|
||||
}
|
||||
}
|
||||
// proxy: {
|
||||
// '/': {
|
||||
// target: process.env.VUE_APP_API_ROOT,
|
||||
// changeOrigin: true
|
||||
// }
|
||||
// }
|
||||
},
|
||||
configureWebpack: config => {
|
||||
config.resolve.modules = ['node_modules', 'assets/sprites']
|
||||
|
||||
Reference in New Issue
Block a user