Ver Fonte

环境文件及config修改

litong há 2 anos atrás
pai
commit
aede9ede9c
3 ficheiros alterados com 18 adições e 4 exclusões
  1. 3 2
      purchase_ao/.env.production
  2. 3 2
      purchase_ao/.env.staging
  3. 12 0
      purchase_ao/vue.config.js

+ 3 - 2
purchase_ao/.env.production

@@ -4,9 +4,10 @@ NODE_ENV = 'production'
 VUE_APP_ENV = 'production'
 
 # base api
-VUE_APP_BASE_API = 'https://operation.mige.tv/a/proapi'
+# VUE_APP_BASE_API = 'https://operation.mige.tv/a/proapi'
+VUE_APP_BASE_API = '/a/proapi'
 VUE_APP_BASE_IMG_URL = 'https://operation.mige.tv/a/files/'
 VUE_APP_BASE_IMG_API = 'https://operation.mige.tv/a/upload/file/uploadFile'
 
 #ifream 引入地址
-VUE_APP_BASE_IFURL = 'https://operation.mige.tv/a/mobile.html#/'
+VUE_APP_BASE_IFURL = 'https://operation.mige.tv/a/mobile.html#/'

+ 3 - 2
purchase_ao/.env.staging

@@ -3,7 +3,8 @@ ENV = 'production'
 NODE_ENV = 'production'
 VUE_APP_ENV = 'production'
 
-VUE_APP_BASE_API = 'https://operationimg.mige.tv/TJtest/host/api'
+# VUE_APP_BASE_API = 'https://operationimg.mige.tv/TJtest/host/api'
+VUE_APP_BASE_API = '/TJtest/host/api'
 
 # base api
 # VUE_APP_BASE_API = 'https://operation.mige.tv/TJtest/api'
@@ -11,4 +12,4 @@ VUE_APP_BASE_IMG_URL = 'https://operation.mige.tv/TJtest/files/'
 VUE_APP_BASE_IMG_API = 'https://operation.mige.tv/TJtest/upload/file/uploadFile'
 
 #ifream 引入地址
-VUE_APP_BASE_IFURL = 'https://operation.mige.tv/TJtest/mobile.html#/'
+VUE_APP_BASE_IFURL = 'https://operation.mige.tv/TJtest/mobile.html#/'

+ 12 - 0
purchase_ao/vue.config.js

@@ -36,6 +36,18 @@ module.exports = {
       warnings: false,
       errors: true
     },
+      proxy: {
+          '/TJtest': {
+              target: 'https://operationimg.mige.tv',
+              ws: true,
+              changeOrigin: true
+          },
+          // '/a': {
+          //     target: 'https://operation.mige.tv',
+          //     ws: true,
+          //     changeOrigin: true
+          // }
+      }
   },
   configureWebpack: {
     // provide the app's title in webpack's name field, so that