Browse Source

'修改基本设置的宽度和基础接口地址'

hjs 1 year ago
parent
commit
2df9c915b7
5 changed files with 7 additions and 7 deletions
  1. 1 1
      .env.development
  2. 1 1
      .env.production
  3. 2 2
      public/config.js
  4. 2 3
      src/utils/request.js
  5. 1 0
      src/views/basic_setup/index.vue

+ 1 - 1
.env.development

@@ -2,4 +2,4 @@
 ENV = 'development'
 
 # base api   http://192.168.11.10:9100/yx-fyzd https://noise.hz-hanghui.com:8088/yx-fyzd
-VUE_APP_BASE_API = ''
+VUE_APP_BASE_API = 'http://192.168.11.11:9100/yx-fyzd'

+ 1 - 1
.env.production

@@ -2,5 +2,5 @@
 ENV = 'production'
 
 # base api
-VUE_APP_BASE_API = '..'
+VUE_APP_BASE_API = 'https://tx.hz-hanghui.com:8088/yx-fyzd'
 

+ 2 - 2
public/config.js

@@ -1,5 +1,5 @@
 window.g = {
-  ApiUrl: 'http://192.168.11.11:9100/yx-fyzd' // 本地
-  // ApiUrl: 'https://tx.hz-hanghui.com:8088/yx-fyzd' // 线上
+  // ApiUrl: 'http://192.168.11.11:9100/yx-fyzd' // 本地
+  ApiUrl: 'https://tx.hz-hanghui.com:8088/yx-fyzd' // 线上
 
 }

+ 2 - 3
src/utils/request.js

@@ -3,8 +3,7 @@ import { MessageBox, Message } from 'element-ui'
 import store from '@/store'
 import { getToken } from '@/utils/auth'
 import { waitLogOut } from '@/utils/waitLogOut'
-var baseURLStr = window.g.ApiUrl
-// var baseURLStr = window.g.ApiUrl
+
 let start = 0;
 function showErr(res, duration) {
     let now = Date.now();
@@ -20,7 +19,7 @@ function showErr(res, duration) {
 
 // create an axios instance
 const service = axios.create({
-  baseURL: baseURLStr, // url = base url + request url
+  baseURL: process.env.VUE_APP_BASE_API, // url = base url + request url
   // withCredentials: true, // send cookies when cross-domain requests
   timeout: 200000 // request timeout
 })

+ 1 - 0
src/views/basic_setup/index.vue

@@ -1003,6 +1003,7 @@ export default {
   display: flex;
   flex-wrap: wrap;
   padding: 0 5px;
+  width: 1150px;
   & > div {
     width: calc(50% - 30px);
     flex: none;