Rick.Lan il y a 1 semaine
Parent
révision
5eab84e808
5 fichiers modifiés avec 25665 ajouts et 8268 suppressions
  1. 17098 87
      package-lock.json
  2. 1 0
      package.json
  3. 1 1
      src/http/index.js
  4. 4 4
      vue.config.js
  5. 8561 8176
      yarn.lock

Fichier diff supprimé car celui-ci est trop grand
+ 17098 - 87
package-lock.json


+ 1 - 0
package.json Voir le fichier

31
   "devDependencies": {
31
   "devDependencies": {
32
     "@vue/cli-plugin-babel": "^4.2.0",
32
     "@vue/cli-plugin-babel": "^4.2.0",
33
     "@vue/cli-service": "^4.2.0",
33
     "@vue/cli-service": "^4.2.0",
34
+    "http-proxy-middleware": "^3.0.3",
34
     "sass": "^1.25.0",
35
     "sass": "^1.25.0",
35
     "sass-loader": "^8.0.2",
36
     "sass-loader": "^8.0.2",
36
     "vue-happy-scroll": "^2.1.1"
37
     "vue-happy-scroll": "^2.1.1"

+ 1 - 1
src/http/index.js Voir le fichier

10
     // baseURL:'http://127.0.0.1:8080',
10
     // baseURL:'http://127.0.0.1:8080',
11
     baseURL:'http://localhost:8080',
11
     baseURL:'http://localhost:8080',
12
     // baseURL:"/api",
12
     // baseURL:"/api",
13
-    timeout: 5000 ,//超时
13
+    timeout: 10000 ,//超时
14
     withCredentials: true,  //跨域时若要发生cookie,需要设置该选项
14
     withCredentials: true,  //跨域时若要发生cookie,需要设置该选项
15
 })
15
 })
16
 
16
 

+ 4 - 4
vue.config.js Voir le fichier

22
         open: true, //配置自动启动浏览器
22
         open: true, //配置自动启动浏览器
23
         // 配置多个代理
23
         // 配置多个代理
24
         proxy: {
24
         proxy: {
25
-          "/api": {
26
-            target: "https://swstest.sgjyun.com",// 要访问的接口域名https://swstest.sgjyun.com
27
-            ws: true,// 是否启用websockets
25
+          "/xcx/api": {
26
+            target: "https://sws.kuyicloud.com",// 要访问的接口域名https://swstest.sgjyun.com
27
+            ws: false,// 是否启用websockets
28
             changeOrigin: true, //开启代理:在本地会创建一个虚拟服务端,然后发送请求的数据,并同时接收请求的数据,这样服务端和服务端进行数据的交互就不会有跨域问题
28
             changeOrigin: true, //开启代理:在本地会创建一个虚拟服务端,然后发送请求的数据,并同时接收请求的数据,这样服务端和服务端进行数据的交互就不会有跨域问题
29
             pathRewrite: {
29
             pathRewrite: {
30
-                '^/api': '/api' //这里理解成用'/api'代替target里面的地址,比如我要调用'http://40.00.100.100:3002/user/add',直接写'/api/user/add'即可
30
+              // '^/xcx/api': '' //这里理解成用'/api'代替target里面的地址,比如我要调用'http://40.00.100.100:3002/user/add',直接写'/api/user/add'即可
31
               }
31
               }
32
           }
32
           }
33
         }
33
         }

Fichier diff supprimé car celui-ci est trop grand
+ 8561 - 8176
yarn.lock