1 |
- import{z as s,s as a,o as e,e as t,f as l,w as c,l as i,j as o,B as n,u as r,v as d,x as h,ap as p,i as f,y as u,aq as m,H as w,m as y,ar as g}from"./index-f1822d78.js";import{S as x,u as _,_ as I}from"./s-layout.0543d630.js";import{_ as v}from"./_plugin-vue_export-helper.1b428a4d.js";import"./form.38162d9d.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:""}),j=g();async function b(){x.getLinkId(1).then((s=>{0===s.code&&(k.linkId=s.data.linkId,async function(s){$.src="",$.shareInfo={title:"",desc:"",image:"",path:"",link:"https://letcgo.com/#/pages/index/user?linkId="+k.linkId,poster:{type:"user"}},await _($,j)}())}))}const C=()=>{["WechatOfficialAccount","H5"].includes(a.$platform.name)?a.$helper.toast("请长按图片保存"):p({filePath:$.src,success:s=>{onClosePoster(),a.$helper.toast("保存成功")},fail:s=>{a.$helper.toast("保存失败"),console.log("图片保存失败:",s)}})};return e((async()=>{await b()})),(s,e)=>{const p=f,g=u,x=m,_=w,v=i(y("s-layout"),I);return t(),l(v,{title:"我的二维码/分享页",class:"set-userinfo-wrap"},{default:c((()=>[o(p,{class:"ss-flex-col ss-col-center ss-row-center"},{default:c((()=>[""===$.src?(t(),l(p,{key:0,class:"poster-title ss-flex ss-row-center",style:n({height:$.height+"px",width:$.width+"px"})},{default:c((()=>[r(" 海报加载中... ")])),_:1},8,["style"])):(t(),l(g,{key:1,class:"poster-img ss-m-20",src:$.src,style:n({height:$.height+"px",width:$.width+"px"}),"show-menu-by-longpress":!0},null,8,["src","style"])),o(x,{class:"hideCanvas","canvas-id":$.canvasId,id:$.canvasId,style:n({height:$.height+"px",width:$.width+"px"})},null,8,["canvas-id","id","style"])])),_:1}),o(p,{class:"modal-footer ss-flex ss-p-x-20"},{default:c((()=>[o(_,{class:"confirm-btn",onClick:C},{default:c((()=>[r(d((["wechatOfficialAccount","H5"].includes(h(a).$platform.name),"长按图片保存")),1)])),_:1})])),_:1})])),_:1})}}},[["__scopeId","data-v-a25c9bbc"]]);export{k as default};
|