1 |
- import{z as s,s as a,o as e,f as t,g as n,w as i,a4 as l,m as c,k as o,B as r,u as d,v as h,x as p,az as f,j as u,y as m,aA as w,J as g,n as x,aB as y}from"./index-ba48620e.js";import{u as _,_ as I}from"./s-layout.04b95866.js";import{_ as k}from"./_plugin-vue_export-helper.1b428a4d.js";import"./phone-international-input.dd3ca29e.js";import"./useGoods.edb8879f.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(){l.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 z=()=>{["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 l=u,f=m,y=w,_=g,k=c(x("s-layout"),I);return t(),n(k,{title:"我的二维码/分享页",class:"set-userinfo-wrap"},{default:i((()=>[o(l,{class:"ss-flex-col ss-col-center ss-row-center"},{default:i((()=>[""===j.src?(t(),n(l,{key:0,class:"poster-title ss-flex ss-row-center",style:r({height:j.height+"px",width:j.width+"px"})},{default:i((()=>[d(" 海报加载中... ")])),_:1},8,["style"])):(t(),n(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(l,{class:"modal-footer ss-flex ss-p-x-20"},{default:i((()=>[o(_,{class:"confirm-btn",onClick:z},{default:i((()=>[d(h((["wechatOfficialAccount","H5"].includes(p(a).$platform.name),"长按图片保存")),1)])),_:1})])),_:1})])),_:1})}}},[["__scopeId","data-v-a25c9bbc"]]);export{v as default};
|