From d327a1e278acd58f65d84db8203d22a17d6db19e Mon Sep 17 00:00:00 2001 From: 1iyc <5212514+liycone@user.noreply.gitee.com> Date: Tue, 29 Oct 2024 16:33:25 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=9D=E5=A7=8B=E5=8C=96v1.0.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 1iyc <5212514+liycone@user.noreply.gitee.com> --- .env.development | 3 ++- .env.production | 3 ++- .env.staging | 3 ++- package.json | 2 +- vue.config.js | 2 +- 5 files changed, 8 insertions(+), 5 deletions(-) diff --git a/.env.development b/.env.development index 302ecd1..030a2d4 100644 --- a/.env.development +++ b/.env.development @@ -5,7 +5,8 @@ VUE_APP_TITLE = 若依管理系统 ENV = 'development' # 若依管理系统/开发环境 -VUE_APP_BASE_API = '/dev-api' +VUE_APP_BASE_API = '/admin-api' +VUE_APP_GATEWAY = 'http://localhost:8090' # 路由懒加载 VUE_CLI_BABEL_TRANSPILE_MODULES = true diff --git a/.env.production b/.env.production index b4893b0..86fd0c6 100644 --- a/.env.production +++ b/.env.production @@ -5,4 +5,5 @@ VUE_APP_TITLE = 若依管理系统 ENV = 'production' # 若依管理系统/生产环境 -VUE_APP_BASE_API = '/prod-api' +VUE_APP_BASE_API = '/admin-api' +VUE_APP_GATEWAY = 'http://localhost:8080' diff --git a/.env.staging b/.env.staging index 361859f..0e7d8e7 100644 --- a/.env.staging +++ b/.env.staging @@ -7,4 +7,5 @@ NODE_ENV = production ENV = 'staging' # 若依管理系统/测试环境 -VUE_APP_BASE_API = '/stage-api' +VUE_APP_BASE_API = '/admin-api' +VUE_APP_GATEWAY = 'http://localhost:8080' diff --git a/package.json b/package.json index 963a734..f264df2 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,7 @@ "author": "若依", "license": "MIT", "scripts": { - "dev": "vue-cli-service serve", + "dev": "vue-cli-service serve --mode development", "build:prod": "vue-cli-service build", "build:stage": "vue-cli-service build --mode staging", "preview": "node build/index.js --preview", diff --git a/vue.config.js b/vue.config.js index 8afb50b..1a77380 100644 --- a/vue.config.js +++ b/vue.config.js @@ -36,7 +36,7 @@ module.exports = { proxy: { // detail: https://cli.vuejs.org/config/#devserver-proxy [process.env.VUE_APP_BASE_API]: { - target: `http://localhost:8080`, + target: process.env.VUE_APP_GATEWAY, changeOrigin: true, pathRewrite: { ['^' + process.env.VUE_APP_BASE_API]: ''