Browse Source

将配置提取

pixel 3 years ago
parent
commit
cec3ad81c8
3 changed files with 7 additions and 4 deletions
  1. 2 1
      web/.env.development
  2. 3 1
      web/.env.production
  3. 2 2
      web/src/view/systemTools/formCreate/index.vue

+ 2 - 1
web/.env.development

@@ -1,2 +1,3 @@
 ENV = 'development'
-VUE_APP_BASE_API = '/api'
+VUE_APP_BASE_API = '/api'
+VUE_APP_BASE_PATH = 'http://127.0.0.1'

+ 3 - 1
web/.env.production

@@ -1,2 +1,4 @@
 ENV = 'production'
-VUE_APP_BASE_API = '/api'
+VUE_APP_BASE_API = '/api'
+#下方修改为你的线上ip
+VUE_APP_BASE_PATH = 'http://8.141.61.63' 

+ 2 - 2
web/src/view/systemTools/formCreate/index.vue

@@ -1,11 +1,11 @@
 <template>
   <div style="height:80vh">
-    <iframe width="100%" height="100%" :src="'http://127.0.0.1:8888/form-generator/#/'" frameborder="0"></iframe>
+    <iframe width="100%" height="100%" :src="basePath+':8888/form-generator/#/'" frameborder="0"></iframe>
   </div>
 </template>
 
 <script>
-var path = process.env.VUE_APP_BASE_API
+var path = process.env.VUE_APP_BASE_PATH
 export default {
     name:"FormGenerator",
     data(){