import{v as s,s as a,J as e,e as t,f as l,w as c,l as o,j as i,y as n,p as r,t as h,u as d,a6 as f,ao as p,ap as u,i as m,q as w,aq as x,D as y,m as _}from"./index-219abc09.js";import{u as g,_ as v}from"./s-layout.e3f07a22.js";import{_ as k}from"./_plugin-vue_export-helper.1b428a4d.js";import"./form.480ce5b4.js";const I=k({__name:"qrcode-share",setup(k){const I=s({canvasId:"canvasId",width:.9*a.$platform.device.windowWidth,height:600,src:""}),$=p();const j=()=>{["WechatOfficialAccount","H5"].includes(a.$platform.name)?a.$helper.toast("请长按图片保存"):u({filePath:I.src,success:s=>{onClosePoster(),a.$helper.toast("保存成功")},fail:s=>{a.$helper.toast("保存失败"),console.log("图片保存失败:",s)}})};return e((()=>{!async function(s){I.src="",I.shareInfo={title:"",desc:"",image:"",path:"",link:"https://zxgz.newfeifan.cn/",poster:{type:"user"}},await g(I,$)}()})),(s,e)=>{const p=m,u=w,g=x,k=y,$=o(_("s-layout"),v);return t(),l($,{title:"我的二维码/分享页",class:"set-userinfo-wrap"},{default:c((()=>[i(p,{class:"ss-flex-col ss-col-center ss-row-center"},{default:c((()=>[""===I.src?(t(),l(p,{key:0,class:"poster-title ss-flex ss-row-center",style:n({height:I.height+"px",width:I.width+"px"})},{default:c((()=>[r(" 海报加载中... ")])),_:1},8,["style"])):(t(),l(u,{key:1,class:"poster-img ss-m-20",src:I.src,style:n({height:I.height+"px",width:I.width+"px"}),"show-menu-by-longpress":!0},null,8,["src","style"])),i(g,{class:"hideCanvas","canvas-id":I.canvasId,id:I.canvasId,style:n({height:I.height+"px",width:I.width+"px"})},null,8,["canvas-id","id","style"])])),_:1}),i(p,{class:"modal-footer ss-flex ss-p-x-20"},{default:c((()=>[i(k,{class:"confirm-btn",onClick:j},{default:c((()=>[r(h(["wechatOfficialAccount","H5"].includes(d(a).$platform.name)?"长按图片保存":"保存图片"),1)])),_:1}),i(k,{class:"confirm-btn",onClick:d(f)},{default:c((()=>[r("分享")])),_:1},8,["onClick"])])),_:1})])),_:1})}}},[["__scopeId","data-v-fc945a07"]]);export{I as default};
