浏览代码

静态信息不同模式

zhangxc 5 年之前
父节点
当前提交
007ebe1bbc
共有 1 个文件被更改,包括 12 次插入10 次删除
  1. 12 10
      src/js/indexHorizontal.js

+ 12 - 10
src/js/indexHorizontal.js

@@ -103,17 +103,19 @@ function getPageInfo() {
     const configArr = res1&&res1.data&&res1.data.data || []
     const pushInfo = res2.data || {}
     const treatInfo = res3.data || {}
-    let tipsInfo =[]
-    if(tipsMode === 1) {
-      tipsInfo = res4.data || []
-    } else {
-      res4.data.data&&tipsInfo.push(res4.data.data)
-      console.log('tipsInfo11',tipsInfo,res4.data)
-    }
+    const tipsInfo = res4.data || {}
     const confArr = transConf(configArr)
-    pushResult = pushInfo.data || {};
-    treatResult = treatInfo.data || {}
-    tipsResult = tipsInfo.data || {}
+    const pushResult = pushInfo.data || {};
+    const treatResult = treatInfo.data || {}
+    let tipsResult = []
+    if(tipsInfo.data) {
+      if(tipsMode === 1) {
+          tipsResult = tipsInfo.data
+      } else {
+          tipsResult.push(tipsInfo.data)
+      }
+    }
+    
     
     const diagPossible =  pushResult.dis&&pushResult.dis['可能诊断'] || []//可能
     const diagDoubt = pushResult.dis&&pushResult.dis['拟诊'] || [] // 疑似