import{_ as A,k as R,o as L,r as n,c as h,b as e,l as m,q as a,t as o,F as M,x as C,v as N,X as T,u as $,j as g,Q as j,m as z,D,Y as B,Z as F}from"./index-CIAVq8iD-1776148658686.js";import{_ as G}from"./arrow-Cf0JWzXk-1776148658686.js";import{g as I,a as V}from"./userInfo-gLO2xl8i-1776148658686.js";import{G as E}from"./GeneralHeader-ClI1i1Ud-1776148658686.js";const P={class:"fullPage"},S={class:"bg"},q={style:{padding:"12px",display:"flex","flex-direction":"column",gap:"12px"}},H={style:{"background-color":"white","border-radius":"12px","box-shadow":"0 2px 8px rgba(0, 0, 0, 0.1)",padding:"12px",border:"1px solid #e5e7eb"}},O={style:{font:"0.8em","font-weight":"500",color:"rgba(0, 0, 0, 0.4)"}},Q={style:{font:"0.9em","font-weight":"600",color:"rgba(0, 0, 0, 0.8)"}},X={style:{font:"0.8em","font-weight":"500",color:"rgba(0, 0, 0, 0.4)"}},Y={style:{font:"0.9em","font-weight":"600",color:"rgba(0, 0, 0, 0.8)"}},Z={style:{"font-weight":"700"}},J=["onClick"],K={style:{width:"100%",display:"flex","justify-content":"space-between"}},U={style:{flex:"1","min-width":"0","align-self":"stretch",display:"flex","align-items":"center",gap:"4px"}},W=["src"],ee={style:{flex:"1","min-width":"0",display:"flex","flex-direction":"column","justify-content":"space-around",gap:"4px"}},te={style:{"font-weight":"700",overflow:"hidden","text-overflow":"ellipsis","white-space":"nowrap"}},oe={style:{"font-weight":"700",color:"rgba(0, 0, 0, 0.4)"}},se={style:{width:"auto","min-width":"0","align-self":"stretch",display:"flex","align-items":"center"}},ie={style:{display:"flex"}},ae={style:{flex:"1"}},ne={style:{"font-weight":"500",color:"rgba(0, 0, 0, 0.4)"}},re={style:{"font-weight":"600",color:"rgba(0, 0, 0, 0.8)"}},le={style:{flex:"1"}},ce={style:{"font-weight":"500",color:"rgba(0, 0, 0, 0.4)"}},de={style:{"font-weight":"600",color:"rgba(0, 0, 0, 0.8)"}},he={__name:"MyRechargeAgency",setup(ge){$();const{t:i,locale:_e}=R(),l=n(-1),b=t=>{l.value=l.value!=t?t:-1},_=n({}),u=n([]),f=n(1),y=n(!0);L(async()=>{p(),x(),c.value&&k.observe(c.value)});const x=async()=>{const t=await I();console.log("resTotalRecharge:",t),t.status&&t.body&&(_.value=t.body)},p=async()=>{let t={cursor:f.value,limit:20};const s=await V(t);console.log("resagencyList:",s),s.status&&s.body&&(u.value.push(...s.body.records),s.body.total<=s.body.current*s.body.size&&(y.value=!1))},c=n(null),w=T(p,1e3),k=new IntersectionObserver(t=>{t.forEach(s=>{s.intersectionRatio>0&&(console.log("监控"),s.target==c.value&&u.value.length!=0&&(f.value++,w()))})}),v=t=>t&&t!=0?Number(t).toFixed(2):0;return(t,s)=>(g(),h("div",P,[e("div",S,[m(E,{showLanguageList:!0,title:a(i)("my_linked_recharge_agent"),color:"black",style:{"box-shadow":"0 0 10px rgba(0, 0, 0, 0.1)","z-index":"999"}},null,8,["title"]),e("div",q,[e("div",H,[e("div",O,o(a(i)("my_total_income")),1),e("div",Q," $"+o(_.value?.totalIncome||0),1),e("div",X,o(a(i)("this_period_recharge")),1),e("div",Y," $"+o(_.value?.currentMonthRecharge||0),1)]),e("div",Z,o(a(i)("recharge_agency_list")),1),(g(!0),h(M,null,C(u.value,(r,d)=>(g(),h("div",{key:d,style:{"background-color":"white","border-radius":"12px","box-shadow":"0 2px 8px rgba(0, 0, 0, 0.1)",padding:"12px",border:"1px solid #e5e7eb","margin-bottom":"10px",transition:"all 0.3s ease-out"},onClick:ue=>b(d)},[e("div",K,[e("div",U,[e("img",{src:r.userAvatar,alt:"",style:{display:"block","object-fit":"cover",width:"3em","border-radius":"50%"}},null,8,W),e("div",ee,[e("div",te,o(r.userNickname),1),e("div",oe,o(a(i)("user_id_prefix"))+o(r.account),1)])]),e("div",se,[e("img",{src:G,alt:"",style:{width:"24px",transition:"transform 0.5s cubic-bezier(0.68, -0.55, 0.27, 1.55)"},class:j({rotated:d==l.value})},null,2)])]),m(F,{name:"info-fade"},{default:z(()=>[D(e("div",ie,[e("div",ae,[e("div",ne,o(a(i)("this_month"))+": ",1),e("div",re," $"+o(v(r.thisMonth)||0),1)]),e("div",le,[e("div",ce,o(a(i)("last_month"))+": ",1),e("div",de," $"+o(v(r.lastMonth)||0),1)])],512),[[B,d==l.value]])]),_:2},1024)],8,J))),128)),y.value?(g(),h("div",{key:0,ref_key:"Agloadmore",ref:c},null,512)):N("",!0)])])]))}},me=A(he,[["__scopeId","data-v-56c137ce"]]);export{me as default};
