1 |
- import{d as i,r as d,$ as u,k as f,c as s,be as g,bl as p,p as v,bz as m,bA as w}from"./index.ffe80dbe.js";import{h as _}from"./html2canvas.esm.3d083717.js";import{I as n}from"./index.7e972106.js";const b="_followAccount_p8lxp_1",h="_content2_p8lxp_21",L="_saveQrcode_p8lxp_24",Q="_followQrcode_p8lxp_32";var a={followAccount:b,content2:h,saveQrcode:L,followQrcode:Q},x="./assets/content1.352a4b32.png",y="./assets/content2.f6b3efac.png",T="./assets/qrcode.fa941852.jpg",k=i({name:"follow-account",setup(){const e=d({saveLoading:!1,image:null,shareLoading:!1}),l=async()=>{if(!e.saveLoading)if(e.saveLoading=!0,e.image)c();else{const o=document.getElementById("preview-container");_(o,{allowTaint:!0,useCORS:!0,backgroundColor:null}).then(async t=>{const r=t.toDataURL("image/png");e.image=r,c()}).catch(()=>{g(),e.saveLoading=!1})}},c=async()=>{var t;p({message:"\u56FE\u7247\u751F\u6210\u4E2D...",forbidClick:!0}),setTimeout(()=>{e.saveLoading=!1},100);const o=await v({api:"savePicture",content:{base64:e.image}});((t=o==null?void 0:o.content)==null?void 0:t.status)==="success"?m("\u4FDD\u5B58\u6210\u529F"):w("\u4FDD\u5B58\u5931\u8D25")};return u(()=>{f({api:"setBarStatus",content:{status:0}})}),()=>s("div",{class:a.followAccount},[s(n,{src:x,class:a.content1},null),s(n,{src:y,class:a.content2},null),s("div",{class:a.saveQrcode,onClick:l},null),s("div",{id:"preview-container",class:a.followQrcode},[s(n,{src:T},null)])])}});export{k as default};
|