Jelajahi Sumber

数据同步

yangbifan 2 tahun lalu
induk
melakukan
7c87eac451
3 mengubah file dengan 18 tambahan dan 4 penghapusan
  1. 5 3
      config/dev.env.js
  2. 1 0
      package.json
  3. 12 1
      src/config/dev.js

+ 5 - 3
config/dev.env.js

@@ -1,15 +1,17 @@
 'use strict'
 const merge = require('webpack-merge')
 const prodEnv = require('./prod.env')
-
+import getConfig from '/src/config/dev.js'
+let BASE_API = getConfig().BASE_API
+let BASE_URL = getConfig().BASE_URL
 module.exports = merge(prodEnv, {
   NODE_ENV: '"development"',
   ENV_CONFIG: '"dev"',
-  ctx:'"http://127.0.0.1:8080"',
+  ctx:"'"+ BASE_URL + "'",
   // ctxForm: '"http://10.149.85.91:8000"',//dev
   // ctxForm: '"http://43.138.50.94:8880"',//test
   // ctxForm: '"http://192.168.2.44:8880"',//test
-  ctxForm: '"http://10.230.26.15:8000"',//生产
+  ctxForm: "'"+ BASE_API + "'",//生产
 
   excludeMeWhenSelectNextHandler:false,
   excludeFormerHanlder:false,

+ 1 - 0
package.json

@@ -6,6 +6,7 @@
     "serve": "vue-cli-service serve --mode development", 
     "serve:test": "vue-cli-service serve --mode test", 
     "build": "vue-cli-service build  --mode development", 
+    "build:devs": "vue-cli-service build  --mode devs", 
     "build:test": "vue-cli-service build  --mode test",
     "build:next": "vue-cli-service build  --mode production", 
     "lint": "vue-cli-service lint",

+ 12 - 1
src/config/dev.js

@@ -1,18 +1,27 @@
 'use strict'
-let dev = {
+let devs = {
     TITLE:'本地环境',
     BASE_URL:"http://43.138.50.94:9600/", //本地环境
     BASE_API:"http://43.138.50.94:8880",//工作流本地环境
+    EXCEL_URL:"http://43.138.50.94:7777" //本地excel路径
+}
+let dev = {
+    TITLE:'本地环境',
+    BASE_URL:"http://127.0.0.1:8080", //本地环境
+    BASE_API:"http://43.138.50.94:8880",//工作流本地环境
+    EXCEL_URL:"http://43.138.50.94:7777" //本地excel路径
 }
 let test = {
     TITLE:'测试环境',
     BASE_URL:"http://10.149.85.91:8000/spfm", //测试环境
     BASE_API:"http://10.149.85.91:8000",//工作流测试环境
+    EXCEL_URL:"http://10.149.85.91:7777" //测试excel路径
 }
 let prod = {
     TITLE:'线上环境',
     BASE_URL:"http://10.230.26.15:8000/mkt", //线上环境
     BASE_API:"http://10.230.26.15:8000",//工作流线上环境
+    EXCEL_URL:"http://10.230.26.15:7777" //线上excel路径
 }
 export const getConfig  = () =>{
     console.log(process.env.NODE_ENV === 'development');
@@ -23,6 +32,8 @@ export const getConfig  = () =>{
             return test;
         case 'production':
             return prod
+        case 'devs':
+            return devs; 
     }
 }
 export default getConfig;