1 |
- import{d as u,ag as v,r as f,c as e,aj as g,a5 as m,F as w,bj as p,bv as _,p as b,bG as k,bH as h,f as L,e as Q}from"./index.5f7ffb46.js";import{h as y}from"./html2canvas.esm.bd39409e.js";import{I as t}from"./index.276a5d68.js";const B="_btnHeader_ruvwe_1",C="_iconBack_ruvwe_6",H="_followAccount_ruvwe_13",I="_content2_ruvwe_33",T="_saveQrcode_ruvwe_36",A="_followQrcode_ruvwe_44";var o={btnHeader:B,iconBack:C,followAccount:H,content2:I,saveQrcode:T,followQrcode:A},x="./assets/content1.352a4b32.png",j="./assets/content2.f6b3efac.png",F="./assets/qrcode.fa941852.jpg",M=u({name:"follow-account",setup(){const r=v(),a=f({saveLoading:!1,image:null,shareLoading:!1}),l=async()=>{if(!a.saveLoading)if(a.saveLoading=!0,a.image)c();else{const s=document.getElementById("preview-container");y(s,{allowTaint:!0,useCORS:!0,backgroundColor:null}).then(async n=>{const d=n.toDataURL("image/png");a.image=d,c()}).catch(()=>{p(),a.saveLoading=!1})}},c=async()=>{var n;_({message:"\u56FE\u7247\u751F\u6210\u4E2D...",forbidClick:!0}),setTimeout(()=>{a.saveLoading=!1},100);const s=await b({api:"savePicture",content:{base64:a.image}});((n=s==null?void 0:s.content)==null?void 0:n.status)==="success"?k("\u4FDD\u5B58\u6210\u529F"):h("\u4FDD\u5B58\u5931\u8D25")},i=()=>{L().isApp?Q({api:"goBack"}):r.back()};return()=>e(w,null,[e("div",{class:o.followAccount},[e(g,{background:"transparent",style:"position: fixed; width: 100%;z-index: 999;top: 0;left: 0;"},{content:()=>e("div",{class:o.btnHeader,onClick:i},[e(m,{name:"arrow-left",class:o.iconBack},null)])}),e(t,{src:x,class:o.content1},null),e(t,{src:j,class:o.content2},null),e("div",{class:o.saveQrcode,onClick:l},null),e("div",{id:"preview-container",class:o.followQrcode},[e(t,{src:F},null)])])])}});export{M as default};
|