Browse Source

+ 管理端前端打包配置

chen.cheng 11 months ago
parent
commit
bbcaf68daf
4 changed files with 14 additions and 1 deletions
  1. 1 0
      ruoyi-ui/.env.development
  2. 2 0
      ruoyi-ui/.env.production
  3. 10 0
      ruoyi-ui/.env.test
  4. 1 1
      ruoyi-ui/vue.config.js

+ 1 - 0
ruoyi-ui/.env.development

@@ -7,5 +7,6 @@ ENV = 'development'
 # 若依管理系统/开发环境
 VUE_APP_BASE_API = '/dev-api'
 
+VUE_APP_BASE_URL = 'http://127.0.0.1:8080/tfc'
 # 路由懒加载
 VUE_CLI_BABEL_TRANSPILE_MODULES = true

+ 2 - 0
ruoyi-ui/.env.production

@@ -6,3 +6,5 @@ ENV = 'production'
 
 # 若依管理系统/生产环境
 VUE_APP_BASE_API = '/prod-api'
+
+VUE_APP_BASE_URL = 'http://172.192.13.80:8080/tfc'

+ 10 - 0
ruoyi-ui/.env.test

@@ -0,0 +1,10 @@
+# 页面标题
+VUE_APP_TITLE = 交通强国工作台
+
+# 生产环境配置
+ENV = 'production'
+
+# 若依管理系统/生产环境
+VUE_APP_BASE_API = '/prod-api'
+
+VUE_APP_BASE_URL = 'http://172.192.13.80:8080/tfc'

+ 1 - 1
ruoyi-ui/vue.config.js

@@ -35,7 +35,7 @@ module.exports = {
     proxy: {
       // detail: https://cli.vuejs.org/config/#devserver-proxy
       [process.env.VUE_APP_BASE_API]: {
-        target: `http://localhost:8080/tfc`,
+        target: process.env.VUE_APP_BASE_URL,
         changeOrigin: true,
         pathRewrite: {
           ['^' + process.env.VUE_APP_BASE_API]: ''