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