1 |
- import{z as s,s as a,o as e,f as t,g as l,w as n,x as i,a4 as o,m as r,k as c,B as d,u as h,v as p,Q as f,aE as u,j as _,y as m,aF as g,J as w,n as x,aG as y}from"./index-dbd18a2c.js";import{u as v,_ as k}from"./s-layout.cc30b4d6.js";import{_ as I}from"./_plugin-vue_export-helper.1b428a4d.js";import"./phone-international-input.18d32780.js";import"./useGoods.12bde50a.js";const j=I({__name:"qrcode-share",setup(I){const j=s({linkId:0}),$=s({canvasId:"canvasId",width:.9*a.$platform.device.windowWidth,height:600,src:""}),z=y();async function C(){o.getLinkId(1).then((s=>{0===s.code&&(j.linkId=s.data.linkId,async function(s){$.src="",$.shareInfo={title:"",desc:"",image:"",path:"",link:"https://zxgz.newfeifan.cn/#/pages/index/user?linkId="+j.linkId,poster:{type:"user"}},await v($,z)}())}))}const b=()=>{["WechatOfficialAccount","H5"].includes(a.$platform.name)?a.$helper.toast(f("share.long_press_to_save")):u({filePath:$.src,success:s=>{onClosePoster(),a.$helper.toast(f("share.save_success"))},fail:s=>{a.$helper.toast(f("share.save_failure")),console.log("图片保存失败:",s)}})};return e((async()=>{await C()})),(s,e)=>{const o=_,u=m,y=g,v=w,I=r(x("s-layout"),k);return t(),l(I,{title:i(f)("share.share"),class:"set-userinfo-wrap"},{default:n((()=>[c(o,{class:"ss-flex-col ss-col-center ss-row-center"},{default:n((()=>[""===$.src?(t(),l(o,{key:0,class:"poster-title ss-flex ss-row-center",style:d({height:$.height+"px",width:$.width+"px"})},{default:n((()=>[h(p(i(f)("share.poster_loading")),1)])),_:1},8,["style"])):(t(),l(u,{key:1,class:"poster-img ss-m-20",src:$.src,style:d({height:$.height+"px",width:$.width+"px"}),"show-menu-by-longpress":!0},null,8,["src","style"])),c(y,{class:"hideCanvas","canvas-id":$.canvasId,id:$.canvasId,style:d({height:$.height+"px",width:$.width+"px"})},null,8,["canvas-id","id","style"])])),_:1}),c(o,{class:"modal-footer ss-flex ss-p-x-20"},{default:n((()=>[c(v,{class:"confirm-btn",onClick:b},{default:n((()=>[h(p((["wechatOfficialAccount","H5"].includes(i(a).$platform.name),i(f)("share.long_press_to_save"))),1)])),_:1})])),_:1})])),_:1},8,["title"])}}},[["__scopeId","data-v-8af3a385"]]);export{j as default};
|