2 Commitit 6e267eee7e ... de52cef140

Tekijä SHA1 Viesti Päivämäärä
  huk de52cef140 tj 3 vuotta sitten
  huk 0053adbf51 修改 3 vuotta sitten
4 muutettua tiedostoa jossa 22 lisäystä ja 3 poistoa
  1. 2 2
      build/utils.js
  2. 8 0
      config/index.js
  3. 9 0
      nginx.conf
  4. 3 1
      src/views/index/components/luckDraw.vue

+ 2 - 2
build/utils.js

@@ -16,8 +16,8 @@ const devPathSrc = path.resolve(__dirname, '../../../src'); // node_modules应
 //       统计报表       组织机构/系统管理 采购  仓储
 //  'statisticalReport','systemConfig','TMS','WMS','workFlow']
 let devModules = ['all'];
-// let devModules = ['index','appoint','TMS','statisticalReport','RMS','systemConfig'];
-// let devModules = ['index','appoint','TMS'];
+// let devModules = ['index','statisticalReport','appoint','RMS','TMS'];
+// let devModules = ['index'];
 if (pathSrc.indexOf('node_modules') > -1) {
     devModules = require('../../../cors.js').devModules;
 }

+ 8 - 0
config/index.js

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

+ 9 - 0
nginx.conf

@@ -37,6 +37,15 @@ http {
 
     server {
         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 {
 		    rewrite ^/b/(.*)$ /$1 break; # 去除本地接口/api前缀, 否则会出现404
 			port_in_redirect   on;

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

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