"use strict";const e=require("../../../../../common/vendor.js"),o={data:()=>({url:""}),onLoad(e){this.url=e.url},methods:{goBack(){e.wx$1.navigateBack({delta:1})},saveImage(){e.index.showLoading({title:"正在下载图片...",mask:!0}),e.index.downloadFile({url:this.url,success:o=>{200===o.statusCode?e.index.saveImageToPhotosAlbum({filePath:o.tempFilePath,success:()=>{e.index.hideLoading(),e.index.showToast({title:"保存成功",icon:"none",duration:2e3})},fail:o=>{e.index.hideLoading(),e.index.showToast({title:"保存失败: "+o.errMsg,icon:"none",duration:2e3})}}):(e.index.hideLoading(),e.index.showToast({title:"下载失败",icon:"none",duration:2e3}))},fail:o=>{e.index.hideLoading(),e.index.showToast({title:"下载失败: "+o.errMsg,icon:"none",duration:2e3})}})}}};const i=e._export_sfc(o,[["render",function(o,i,a,n,t,d){return{a:t.url,b:e.o(((...e)=>d.saveImage&&d.saveImage(...e))),c:e.o((()=>{})),d:e.o(((...e)=>d.goBack&&d.goBack(...e)))}}],["__scopeId","data-v-d01cc90d"]]);wx.createPage(i);
