|
@@ -85,6 +85,8 @@ function getConf() {
|
|
|
let confArr = transConf(data.data)
|
|
|
window.confArr = confArr;
|
|
|
}
|
|
|
+ }).catch(function (err) {
|
|
|
+ console.log(err);
|
|
|
})
|
|
|
}
|
|
|
|
|
@@ -154,15 +156,17 @@ function getPushInfo() {
|
|
|
|
|
|
|
|
|
// }
|
|
|
+ }).catch(function (err) {
|
|
|
+ console.log(err);
|
|
|
})
|
|
|
}
|
|
|
|
|
|
function getTreatment() {
|
|
|
post(config.pushTreatment,Object.assign({featureType: '8'},msg)).then((res)=>{
|
|
|
var data = res.data
|
|
|
- if(data) {
|
|
|
- window.tipsInfo = data
|
|
|
- }
|
|
|
+ if(data.code == 0){
|
|
|
+ window.treatInfo = data
|
|
|
+ }
|
|
|
// if(data.code == 0){
|
|
|
// var result = data.data;
|
|
|
// renderTreat(treatImg, 'treatRecommend','治疗方案',result)
|
|
@@ -190,27 +194,33 @@ function getTreatment() {
|
|
|
function getTipsInfo() {
|
|
|
post(config.information,{name:getUrlArgObject('tipsName'),type:getUrlArgObject('tipsType'), position: 1}).then((res)=>{
|
|
|
var data = res.data
|
|
|
- window.tipsInfo = data
|
|
|
+ if(data.code == 0) {
|
|
|
+ window.tipsInfo = data
|
|
|
+ }
|
|
|
+ }).catch(function (err) {
|
|
|
+ console.log(err);
|
|
|
})
|
|
|
}
|
|
|
|
|
|
function getPageInfo() {
|
|
|
Promise.all([getConf(),getPushInfo(),getTreatment(),getTipsInfo()]).then(([res1, res2, res3,res4]) =>{
|
|
|
- if(pushInfo.code == 0) {
|
|
|
+ if(pushInfo&&pushInfo.code == 0) {
|
|
|
pushResult = pushInfo.data;
|
|
|
} else {
|
|
|
pushResult = {};
|
|
|
}
|
|
|
- if(treatInfo.code == 0) {
|
|
|
+ if(treatInfo&&treatInfo.code == 0) {
|
|
|
treatResult = treatInfo.data
|
|
|
} else {
|
|
|
treatResult = {}
|
|
|
}
|
|
|
- if(tipsInfo.code && tipsInfo.code == 0) {
|
|
|
+ if(tipsInfo&&tipsInfo.code == 0) {
|
|
|
tipsResult = tipsInfo.data
|
|
|
} else {
|
|
|
tipsResult = {}
|
|
|
}
|
|
|
+
|
|
|
+
|
|
|
const diagPossible = pushResult.dis&&pushResult.dis['可能诊断'] || []//可能
|
|
|
const diagDoubt = pushResult.dis&&pushResult.dis['疑似诊断'] || [] // 疑似
|
|
|
const diagDeter = pushResult.dis&&pushResult.dis['确诊'] || []//确诊
|