1 |
- import{d as u,ag as f,r as v,c as e,aj as g,a5 as m,F as w,bf as p,bq as _,p as b,bD as k,bE as h,f as L,e as Q}from"./index.332c7f08.js";import{h as y}from"./html2canvas.esm.3d083717.js";import{I as t}from"./index.96a8db5e.js";const B="_btnHeader_ruvwe_1",C="_iconBack_ruvwe_6",I="_followAccount_ruvwe_13",T="_content2_ruvwe_33",A="_saveQrcode_ruvwe_36",H="_followQrcode_ruvwe_44";var o={btnHeader:B,iconBack:C,followAccount:I,content2:T,saveQrcode:A,followQrcode:H},x="./assets/content1.352a4b32.png",q="./assets/content2.f6b3efac.png",F="./assets/qrcode.fa941852.jpg",D=u({name:"follow-account",setup(){const r=f(),a=v({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:q,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{D as default};
|