修改前端开发环境配置
This commit is contained in:
parent
a51fb7d71a
commit
6622ea12e9
@ -1,6 +1,6 @@
|
||||
@echo off
|
||||
|
||||
docker build -t ZRAdmin:latest -f ./Dockerfile .
|
||||
docker build -t ZRAdmin.NET:latest -f ./Dockerfile .
|
||||
|
||||
echo "==============查看镜像==========="
|
||||
docker images
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
ENV = 'development'
|
||||
|
||||
# ZR管理系统/开发环境
|
||||
VUE_APP_BASE_API = 'http://localhost:8888/'
|
||||
VUE_APP_BASE_API = '/dev-api'
|
||||
|
||||
# 路由前缀
|
||||
VUE_APP_ROUTER_PREFIX = '/'
|
||||
|
||||
8
ZR.Vue/.env.staging
Normal file
8
ZR.Vue/.env.staging
Normal file
@ -0,0 +1,8 @@
|
||||
# 测试环境配置
|
||||
ENV = 'staging'
|
||||
|
||||
# ZR管理系统/生产环境
|
||||
VUE_APP_BASE_API = '/stage-api'
|
||||
|
||||
# 路由前缀
|
||||
VUE_APP_ROUTER_PREFIX = '/'
|
||||
@ -34,11 +34,11 @@ module.exports = {
|
||||
open: true,
|
||||
proxy: {
|
||||
// detail: https://cli.vuejs.org/config/#devserver-proxy
|
||||
'/api': {
|
||||
target: process.env.VUE_APP_BASE_API,
|
||||
[process.env.VUE_APP_BASE_API]: {
|
||||
target: 'http://localhost:8888/',// 后端接口地址
|
||||
changeOrigin: true,
|
||||
pathRewrite: {
|
||||
'^/api': ''//需要rewrite的
|
||||
['^' + process.env.VUE_APP_BASE_API]: ''//需要rewrite的
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user