seimin 1 年之前
父节点
当前提交
02ab34ca93
共有 1 个文件被更改,包括 7 次插入2 次删除
  1. 7 2
      pages/receipt_infopage/receipt_infopage.vue

+ 7 - 2
pages/receipt_infopage/receipt_infopage.vue

@@ -582,12 +582,17 @@
582
               content,
582
               content,
583
             })
583
             })
584
             .then((result) => {
584
             .then((result) => {
585
-              this.patientHandoverCode = JSON.parse(result.code);
585
+              try{
586
+                this.patientHandoverCode = JSON.parse(result.code);
587
+              }catch(e){
588
+                this.patientHandoverCode = '';
589
+              }
590
+              
586
               this.SMFlag = true;
591
               this.SMFlag = true;
587
               // 200检测通过,201没有有效期也通过。
592
               // 200检测通过,201没有有效期也通过。
588
               if (result.state == 200 || result.state == 201) {
593
               if (result.state == 200 || result.state == 201) {
589
                 uni.hideLoading();
594
                 uni.hideLoading();
590
-                if(Object.prototype.toString(this.patientHandoverCode) === '[object Object]' && this.patientHandoverCode.name){
595
+                if(Object.prototype.toString.call(this.patientHandoverCode) === '[object Object]' && this.patientHandoverCode.name){
591
                   this.models2 = {
596
                   this.models2 = {
592
                     disjunctor: true,
597
                     disjunctor: true,
593
                     title: "提示",
598
                     title: "提示",