import{B as s,s as a,o as e,f as t,g as l,w as n,a6 as i,q as c,n as o,E as r,m as d,t as h,z as p,aC as f,l as u,A as m,aD as w,L as g,u as x,aE as y}from"./index-007bf156.js";import{u as _,_ as I}from"./s-layout.19bedb43.js";import{_ as k}from"./_plugin-vue_export-helper.1b428a4d.js";import"./phone-international-input.3617e4e0.js";import"./useGoods.ac3bf93e.js";const v=k({__name:"qrcode-share",setup(k){const v=s({linkId:0}),j=s({canvasId:"canvasId",width:.9*a.$platform.device.windowWidth,height:600,src:""}),$=y();async function b(){i.getLinkId(1).then((s=>{0===s.code&&(v.linkId=s.data.linkId,async function(s){j.src="",j.shareInfo={title:"",desc:"",image:"",path:"",link:"https://zxgz.newfeifan.cn/#/pages/index/user?linkId="+v.linkId,poster:{type:"user"}},await _(j,$)}())}))}const C=()=>{["WechatOfficialAccount","H5"].includes(a.$platform.name)?a.$helper.toast("请长按图片保存"):f({filePath:j.src,success:s=>{onClosePoster(),a.$helper.toast("保存成功")},fail:s=>{a.$helper.toast("保存失败"),console.log("图片保存失败:",s)}})};return e((async()=>{await b()})),(s,e)=>{const i=u,f=m,y=w,_=g,k=c(x("s-layout"),I);return t(),l(k,{title:"我的二维码/分享页",class:"set-userinfo-wrap"},{default:n((()=>[o(i,{class:"ss-flex-col ss-col-center ss-row-center"},{default:n((()=>[""===j.src?(t(),l(i,{key:0,class:"poster-title ss-flex ss-row-center",style:r({height:j.height+"px",width:j.width+"px"})},{default:n((()=>[d(" 海报加载中... ")])),_:1},8,["style"])):(t(),l(f,{key:1,class:"poster-img ss-m-20",src:j.src,style:r({height:j.height+"px",width:j.width+"px"}),"show-menu-by-longpress":!0},null,8,["src","style"])),o(y,{class:"hideCanvas","canvas-id":j.canvasId,id:j.canvasId,style:r({height:j.height+"px",width:j.width+"px"})},null,8,["canvas-id","id","style"])])),_:1}),o(i,{class:"modal-footer ss-flex ss-p-x-20"},{default:n((()=>[o(_,{class:"confirm-btn",onClick:C},{default:n((()=>[d(h((["wechatOfficialAccount","H5"].includes(p(a).$platform.name),"长按图片保存")),1)])),_:1})])),_:1})])),_:1})}}},[["__scopeId","data-v-a25c9bbc"]]);export{v as default};
