Browse Source

Merge branch 'TCM0513' into testNew

wyq 4 years atrás
parent
commit
7875de5271
1 changed files with 19 additions and 15 deletions
  1. 19 15
      src/js/tcmiss.js

+ 19 - 15
src/js/tcmiss.js

@@ -27,22 +27,26 @@ function getTcmMr(mrId, config) {
     renderConfig(config.planDetails || []);
     if (!mrId) {    //没有mrId时不显示推送模块
         $(".recipe").hide();
-        return;
-    }
-    post('/sys/mr/getTcmMr', {mrId: mrId}).then((res) => {
-        //console.log(res)
-        let data = res.data.data || {}
-        const {tcmdisease, tcmsyndrome} = data;
-        if (res.data.code === '0') {
-            const diag = (tcmdisease || {}).uniqueName;
-            $("#goPush").on("click", function () {
-                openNewWin(window.encodeURI(targetUrl + '?page=bztd&jibing='+diag), true);
-            });
-            getTcmData({tcmDiag: diag, tcmSyndrome: (tcmsyndrome || {}).uniqueName}, config)
-        } else {
+        $("#goPush").on("click", function () {
+            openNewWin(window.encodeURI(targetUrl + '?page=bztd&jibing='), true);
+        });
+    }else{
+        post('/sys/mr/getTcmMr', { mrId: mrId }).then((res) => {
+            //console.log(res)
+            let data = res.data.data || {}
+            const { tcmdisease, tcmsyndrome } = data;
+            if (res.data.code === '0') {
+                const diag = (tcmdisease || {}).uniqueName;
+                $("#goPush").on("click", function () {
+                    openNewWin(window.encodeURI(targetUrl + '?page=bztd&jibing=' + diag), true);
+                });
+                getTcmData({ tcmDiag: diag, tcmSyndrome: (tcmsyndrome || {}).uniqueName }, config)
+            } else {
 
-        }
-    })
+            }
+        })
+    }
+    
 }
 
 //获取处方推荐