"use strict";var t=require("../common/vendor.js"),a=require("../api/test.js");require("../common/request.js");const r={name:"Poster",components:{},props:{},data:function(){return{url:null}},mounted:function(){this.getTestReportImg()},methods:{shareImg:function(){wx.downloadFile({url:this.url,success:e=>{wx.showShareImageMenu({path:e.tempFilePath})}})},getTestReportImg:function(){let e=this;var n={reportId:this.reportId};a.getTestReportImg(n).then(o=>{e.url=o.url},o=>{t.index.showToast({title:o.msg,icon:"none",duration:2e3})})},downloadIamge(e,n){var o=this;this.isDown=!0;var s=e;o.downloadFile(s)},saveImg:function(){this.downloadIamge(this.url,"poster")},downloadFile(e){console.log(e),t.index.showLoading({title:"\u56FE\u7247\u4FDD\u5B58\u4E2D..."}),t.index.downloadFile({url:e,fail:function(n){t.index.showModal({title:"\u63D0\u793A",content:"\u4FDD\u5B58\u5931\u8D25"})},success:function(n){console.log(n);var o=n.tempFilePath;t.index.saveImageToPhotosAlbum({filePath:o,success:()=>{t.index.showToast({title:"\u4FDD\u5B58\u6210\u529F",duration:2e3})},fail:()=>{console.log("saveImageToPhotosAlbum \u5931\u8D25"),t.index.hideLoading()},complete:function(){t.index.hideLoading()}})}})}}};function l(e,n,o,s,u,i){return{a:e.url,b:t.o(c=>i.shareImg())}}var d=t._export_sfc(r,[["render",l],["__file","E:/Project/2023/\u95EE\u8BCA\u5E73\u53F0/his_user_miniapp/pages_index/testResultImg.vue"]]);wx.createPage(d);
