"use strict";var e=require("../common/vendor.js"),c=require("../api/adv.js"),l=require("../api/test.js");require("../common/request.js");const g={data(){return{advImgs:[],advs:[],reportId:null,statusBarHeight:e.index.getStorageSync("menuInfo").statusBarHeight,report:null}},onLoad(r){this.reportId=r.reportId,this.getTestReport()},onShow(){this.getAdvList()},methods:{shareImg(){var r={reportId:this.reportId};l.getTestReportImg(r).then(t=>{t.code==200&&(console.log(t),wx.downloadFile({url:t.img,success:s=>{console.log(s),wx.showShareImageMenu({path:s.tempFilePath})},fail:s=>{console.log(s)}}))},t=>{})},handleAdvClick(r){var t=this.advs[r];console.log(t.advUrl),t.showType==1?(e.index.setStorageSync("url",t.advUrl),e.index.navigateTo({url:"h5"})):t.showType==2?e.index.navigateTo({url:t.advUrl}):t.showType==3&&(e.index.setStorageSync("content",t.content),e.index.navigateTo({url:"content"}))},getAdvList(){var r=this,t={advType:3};c.getAdvList(t).then(s=>{s.code==200?(r.advImgs=[],r.advs=s.data,r.advs.forEach(function(n){n.imageUrl!=null&&n.imageUrl!=""&&r.advImgs.push(n.imageUrl)}),console.log(r.advImgs)):e.index.showToast({icon:"none",title:"\u8BF7\u6C42\u5931\u8D25"})})},getTestReport(){var r={reportId:this.reportId};l.getTestReport(r).then(t=>{t.code==200&&(this.report=t.report)},t=>{})},goBack(){e.index.navigateBack()}}};Array||e.resolveComponent("u-swiper")();const d=()=>"../uni_modules/uview-plus/components/u-swiper/u-swiper.js";Math||d();function u(r,t,s,n,o,i){return e.e({a:o.report!=null},o.report!=null?e.e({b:JSON.parse(o.report.patientJson).avatar==null?"https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/22cb9518a55040dea74d8f730551a7a2.jpg":JSON.parse(o.report.patientJson).avatar,c:e.t(JSON.parse(o.report.patientJson).sex==1?"\u7537":"\u5973"),d:e.t(JSON.parse(o.report.patientJson).age),e:e.t(o.report.createTime),f:e.t(o.report.testResult),g:e.t(o.report.testResult),h:e.f(JSON.parse(o.report.conditioningPlanJson),(a,p,h)=>e.e({a:e.t(a.name),b:e.t(a.value.replace(/\\n/g,"<br>")),c:p<JSON.parse(o.report.conditioningPlanJson).length-2},p<JSON.parse(o.report.conditioningPlanJson).length-2?{}:{})),i:o.advImgs.length>0},o.advImgs.length>0?{j:e.o(i.handleAdvClick),k:e.p({list:o.advImgs,circular:!0})}:{}):{},{l:e.o(a=>i.shareImg())})}var v=e._export_sfc(g,[["render",u],["__file","E:/Project/2023/\u95EE\u8BCA\u5E73\u53F0/his_user_miniapp/pages_index/testResult.vue"]]);wx.createPage(v);
