liuQiang 2 yıl önce
ebeveyn
işleme
26575d1abe
3 değiştirilmiş dosya ile 3 ekleme ve 1 silme
  1. 1 0
      public/config.js
  2. 1 0
      public/index.html
  3. 1 1
      src/utils/request.js

+ 1 - 0
public/config.js

@@ -1,2 +1,3 @@
+STATIC_CONFIG = {}
 // 后台服务接口地址
 STATIC_CONFIG.proxyUrl = 'http://8.142.173.95:10086'

+ 1 - 0
public/index.html

@@ -6,6 +6,7 @@
     <meta name="viewport" content="width=device-width,initial-scale=1.0">
     <link rel="icon" href="<%= BASE_URL %>favicon.ico">
     <title><%= htmlWebpackPlugin.options.title %></title>
+    <script type="text/javascript" src="./config.js"></script>
   </head>
   <style>
     body{

+ 1 - 1
src/utils/request.js

@@ -4,7 +4,7 @@ import { Message } from 'element-ui'
 // 请求url
 const service = axios.create({
   baseURL: window.STATIC_CONFIG.proxyUrl, // url = base url + request url
- baseURL:"http://8.142.173.95:10086/",
+//  baseURL:"http://8.142.173.95:10086/",
   timeout: 15000 // request timeout
 })