zhuangyunsheng 1 month ago
parent
commit
454304322d
6 changed files with 18 additions and 22 deletions
  1. 8 0
      .env
  2. 4 14
      .env.development
  3. 2 4
      .env.production
  4. 1 1
      package.json
  5. 1 1
      src/config/index.js
  6. 2 2
      vue.config.js

+ 8 - 0
.env

@@ -0,0 +1,8 @@
+# 标题
+VUE_APP_TITLE = EasyDo运营中心
+
+# 接口地址
+VUE_APP_ZEROAPI_BASEURL = http://www.qdeasydo.com
+
+# 本地端口
+VUE_APP_PORT = 3200

+ 4 - 14
.env.development

@@ -1,20 +1,10 @@
 # 本地环境
 NODE_ENV = development
 
-# 标题
-VUE_APP_TITLE = EasyDo运营中心
-
 # 接口地址
 # VUE_APP_API_BASEURL = http://www.qdeasydo.com/api
 # VUE_APP_OPS_BASEURL = http://www.qdeasydo.com/ops
-VUE_APP_API_BASEURL  = http://192.168.101.93:8802
-VUE_APP_OPS_BASEURL = http://192.168.101.93:8804
-# VUE_APP_API_BASEURL  = http://192.168.101.135:8802
-# VUE_APP_OPS_BASEURL = http://192.168.101.135:8804
-VUE_APP_ZEROAPI_BASEURL = http://www.qdeasydo.com
-
-# 本地端口
-VUE_APP_PORT = 3200
-
-# 是否开启代理
-VUE_APP_PROXY = true
+# VUE_APP_API_BASEURL  = http://192.168.101.93:8802
+# VUE_APP_OPS_BASEURL = http://192.168.101.93:8804
+VUE_APP_API_BASEURL  = http://192.168.101.135:8802
+VUE_APP_OPS_BASEURL = http://192.168.101.135:8804

+ 2 - 4
.env.production

@@ -1,8 +1,6 @@
 # 生产环境
 NODE_ENV = production
 
-# 标题
-VUE_APP_TITLE = EasyDo运营中心
-
 # 接口地址
-VUE_APP_API_BASEURL =
+VUE_APP_API_BASEURL = /opsWeb
+VUE_APP_OPS_BASEURL = /opsWeb

+ 1 - 1
package.json

@@ -4,7 +4,7 @@
     "private": true,
     "scripts": {
         "dev": "vue-cli-service serve",
-        "build": "vue-cli-service build --report",
+        "build": "vue-cli-service build",
         "lint": "vue-cli-service lint"
     },
     "dependencies": {

+ 1 - 1
src/config/index.js

@@ -6,7 +6,7 @@ const DEFAULT_CONFIG = {
 	DASHBOARD_URL: "/home",
 
 	//接口地址
-	API_URL: process.env.NODE_ENV === "development" && process.env.VUE_APP_PROXY === "true" ? "" : process.env.VUE_APP_API_BASEURL,
+	API_URL: process.env.NODE_ENV === "development" ? "" : process.env.VUE_APP_API_BASEURL,
 
 	//请求超时
 	TIMEOUT: 30000,

+ 2 - 2
vue.config.js

@@ -2,8 +2,8 @@ const { defineConfig } = require("@vue/cli-service")
 
 module.exports = defineConfig({
 	//设置为空打包后不分更目录还是多级目录
-	publicPath: "/easydo/ops",
-    outputDir: "easydo/ops",
+    publicPath: "/opsWeb",
+    outputDir: "dist/opsWeb",
 	//build编译后存放静态文件的目录
 	// assetsDir: "static",