Pārlūkot izejas kodu

rms修改删除

zhouzh 3 gadi atpakaļ
vecāks
revīzija
292a747ebd
3 mainītis faili ar 20 papildinājumiem un 1 dzēšanām
  1. 8 0
      config/index.js
  2. 9 0
      nginx.conf
  3. 3 1
      src/views/index/components/luckDraw.vue

+ 8 - 0
config/index.js

@@ -54,6 +54,14 @@ let proxyTable = {
       "^/api/v1/cd": "/api/v1/cd"
       "^/api/v1/cd": "/api/v1/cd"
     }
     }
   },
   },
+  //抽奖结果的接口
+  "/game/v1": {
+    target: "http://172.16.33.166:9002",
+    ws: true,
+    pathRewrite: {
+      "^/game/v1": "/v1"
+    }
+  },
   // 所有数据的请求域名地址
   // 所有数据的请求域名地址
   "/api/v1": {
   "/api/v1": {
     target: "http://172.16.33.166:8080",
     target: "http://172.16.33.166:8080",

+ 9 - 0
nginx.conf

@@ -37,6 +37,15 @@ http {
 
 
     server {
     server {
         root /usr/share/nginx/html/;
         root /usr/share/nginx/html/;
+
+        location /game/v1 {
+            rewrite ^/icore.icp.web/game(.*)$ /$1 break; # 去除本地接口/api前缀, 否则会出现404
+            proxy_set_header Host $host;
+            proxy_set_header X-Real-IP $remote_addr;
+            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
+            proxy_pass http://oa-system-game-service/v1; # 转发地址
+        }
+        
         location /views/icore.icp.web/pass/v1 {
         location /views/icore.icp.web/pass/v1 {
 		    rewrite ^/b/(.*)$ /$1 break; # 去除本地接口/api前缀, 否则会出现404
 		    rewrite ^/b/(.*)$ /$1 break; # 去除本地接口/api前缀, 否则会出现404
 			port_in_redirect   on;
 			port_in_redirect   on;

+ 3 - 1
src/views/index/components/luckDraw.vue

@@ -122,7 +122,9 @@ export default {
         //查询事件
         //查询事件
         selectClick(){
         selectClick(){
             this.selectLoading = true;
             this.selectLoading = true;
-            console.log(this.form)
+            this.axios.get('/game/v1/rflemplotterys/').then((res)=>{
+                console.log(res);
+            })
             this.selectLoading = false;
             this.selectLoading = false;
         },
         },
         //行间样式
         //行间样式