浏览代码

大数据接口增加对应的ruleType入参

zhouna 5 年之前
父节点
当前提交
41db6e4c33
共有 6 个文件被更改,包括 13 次插入8 次删除
  1. 2 2
      src/index.js
  2. 1 1
      src/js/illness.js
  3. 2 2
      src/js/index.js
  4. 2 2
      src/js/indexHorizontal.js
  5. 5 0
      src/js/promise.js
  6. 1 1
      src/js/treatplan.js

+ 2 - 2
src/index.js

@@ -24,7 +24,7 @@ var msg = {
 window.msg = msg
 window.pushMessage = {}
 
-post(config.pushInner,Object.assign({featureType: '1,4,5,6,7,22'},msg)).then((res)=>{
+post(config.pushInner,Object.assign({featureType: '1,4,5,6,7,22',ruleType:config.ruleTypeMap['22']},msg)).then((res)=>{
   var data = res.data
   if(data.code == 0){
     var result = data.data;
@@ -71,7 +71,7 @@ post(config.pushInner,Object.assign({featureType: '1,4,5,6,7,22'},msg)).then((re
   }
 })
 
-post(config.pushTreatment,Object.assign({featureType: '8'},msg)).then((res)=>{
+post(config.pushTreatment,Object.assign({featureType: '8',ruleType:config.ruleTypeMap['8']},msg)).then((res)=>{
   var data = res.data
   if(data.code == 0){
     var result = data.data;

+ 1 - 1
src/js/illness.js

@@ -22,7 +22,7 @@ var msg = JSON.parse(getUrlArgObject('msg'))
 window.msg = msg
 window.pushMessage = {}
 
-post(config.pushInner,Object.assign(msg,{featureType: '22'})).then((res)=>{
+post(config.pushInner,Object.assign(msg,{featureType: '22',ruleType:config.ruleTypeMap['22']})).then((res)=>{
   var data = res.data
   if(data.code == 0) {
     var result = data.data;

+ 2 - 2
src/js/index.js

@@ -63,12 +63,12 @@ function getConf() {
 }
 
 function getPushInfo() {
-  return  post(config.pushInner,Object.assign({featureType: '1,4,5,6,7,22'},msg))
+  return  post(config.pushInner,Object.assign({featureType: '1,4,5,6,7,22',ruleType:config.ruleTypeMap['22']},msg))
   
 }
 
 function getTreatment() {
-  return  post(config.pushTreatment,Object.assign({featureType: '8'},msg))
+  return  post(config.pushTreatment,Object.assign({featureType: '8',ruleType:config.ruleTypeMap['8']},msg))
 }
 
 function getTipsInfo() {

+ 2 - 2
src/js/indexHorizontal.js

@@ -79,11 +79,11 @@ function getConf() {
 }
 
 function getPushInfo() {
-  return post(config.pushInner,Object.assign({featureType: '1,4,5,6,7,22'},msg))
+  return post(config.pushInner,Object.assign({featureType: '1,4,5,6,7,22',ruleType:config.ruleTypeMap['22']},msg))
 }
 
 function getTreatment() {
-  return post(config.pushTreatment,Object.assign({featureType: '8'},msg))
+  return post(config.pushTreatment,Object.assign({featureType: '8',ruleType:config.ruleTypeMap['8']},msg))
 }
 
 

+ 5 - 0
src/js/promise.js

@@ -43,6 +43,11 @@ const config = {
   getVersion: '/api/data/versionInfo/getVersionInfoAlls',
   getStaticKnowledge: '/api/data/search/getStaticKnowledge',
   getStaticScale: '/api/data/search/getScale',
+  ruleTypeMap:{     //大数据推送参数featureType对应
+    '22':'1,2',
+    '11':'3',
+    '8':'4,5'
+  }
 }
 const imageUrlPrefix = 'http://192.168.2.121:82';
 // const getUrlArgObject = function(parm) {  

+ 1 - 1
src/js/treatplan.js

@@ -20,7 +20,7 @@ const { post,config,getUrlArgObject,openNewWin } = require('../js/promise.js');
 var msg = JSON.parse(getUrlArgObject('msg'))
 window.msg = msg
 window.pushMessage = {}
-post(config.pushTreatment,Object.assign({featureType: '8'},msg)).then((res)=>{
+post(config.pushTreatment,Object.assign({featureType: '8',ruleType:config.ruleTypeMap['8']},msg)).then((res)=>{
   var data = res.data
   if(data.code == 0){
     var result = data.data;