import{d as I,r as _,a as U,o as C,g as y,J as h,K as k,z as H,k as m,w as r,b as s,c as w,H as x,x as d,l as a,e as u,ad as N,s as D,t as B,E,_ as V}from"./index-CUnFTKV2.js";import{c as j}from"./statistics-B7ukxmWr.js";import{a as l}from"./format-C0IiqLeQ.js";const O={class:"card-header"},S={class:"stats-grid"},z={class:"stat-item"},J={class:"stat-value add"},K={class:"stat-item"},R={class:"stat-value use"},T={class:"stat-item"},q={class:"stat-value add"},F={class:"stat-item"},G={class:"stat-value use"},L={class:"stat-item"},P={class:"stat-value add"},Q={class:"stat-item"},W={class:"stat-value use"},X={class:"stat-item"},Y={class:"stat-value add"},Z={class:"stat-item"},$={class:"stat-value use"},ss={class:"stat-item"},ts={class:"stat-value add"},es={class:"stat-item"},as={class:"stat-value use"},ds={class:"stat-item"},os={class:"stat-value add"},ls={class:"stat-item"},ns={class:"stat-value use"},is={key:0,class:"error-message"},rs=I({__name:"CurrencyInfoCard",setup(cs,{expose:f}){const i=_(!1),n=_(null),c={todayAddMoney:0,todayUseMoney:0,yesterdayAddMoney:0,yesterdayUseMoney:0,todayAddIntegral:0,todayUseIntegral:0,yesterdayAddIntegral:0,yesterdayUseIntegral:0,todayAddMoney2:0,todayUseMoney2:0,yesterdayAddMoney2:0,yesterdayUseMoney2:0},e=U({...c});async function v(){i.value=!0,n.value=null;try{const o=await j();o.code===0&&o.data?Object.assign(e,o.data):(n.value=o.message||"获取数据失败",Object.assign(e,c))}catch(o){console.error("加载货币信息数据失败:",o),o instanceof Error?o.message.includes("403")||o.message.includes("权限")?n.value="无权限访问此页面":o.message.includes("network")||o.message.includes("Network")?n.value="网络连接失败，请检查网络":n.value="服务器繁忙，请稍后重试":n.value="获取数据失败",Object.assign(e,c)}finally{i.value=!1}}function g(){v(),E.info("正在刷新数据...")}return C(()=>{v()}),f({refresh:v}),(o,t)=>{const p=y("el-button"),b=y("el-icon"),M=y("el-card"),A=h("loading");return k((m(),H(M,{class:"currency-info-card"},{header:r(()=>[s("div",O,[t[1]||(t[1]=s("span",{class:"card-title"},"今日货币信息",-1)),u(p,{type:"primary",link:"",icon:a(D),onClick:g,loading:i.value},{default:r(()=>[...t[0]||(t[0]=[B(" 刷新 ",-1)])]),_:1},8,["icon","loading"])])]),default:r(()=>[s("div",S,[s("div",z,[t[2]||(t[2]=s("div",{class:"stat-label"},"今日发放钻石",-1)),s("div",J,d(a(l)(e.todayAddMoney)),1)]),s("div",K,[t[3]||(t[3]=s("div",{class:"stat-label"},"今日消费钻石",-1)),s("div",R,d(a(l)(e.todayUseMoney)),1)]),s("div",T,[t[4]||(t[4]=s("div",{class:"stat-label"},"昨日发放钻石",-1)),s("div",q,d(a(l)(e.yesterdayAddMoney)),1)]),s("div",F,[t[5]||(t[5]=s("div",{class:"stat-label"},"昨日消费钻石",-1)),s("div",G,d(a(l)(e.yesterdayUseMoney)),1)]),s("div",L,[t[6]||(t[6]=s("div",{class:"stat-label"},"今日发放HH币",-1)),s("div",P,d(a(l)(e.todayAddIntegral)),1)]),s("div",Q,[t[7]||(t[7]=s("div",{class:"stat-label"},"今日消费HH币",-1)),s("div",W,d(a(l)(e.todayUseIntegral)),1)]),s("div",X,[t[8]||(t[8]=s("div",{class:"stat-label"},"昨日发放HH币",-1)),s("div",Y,d(a(l)(e.yesterdayAddIntegral)),1)]),s("div",Z,[t[9]||(t[9]=s("div",{class:"stat-label"},"昨日消费HH币",-1)),s("div",$,d(a(l)(e.yesterdayUseIntegral)),1)]),s("div",ss,[t[10]||(t[10]=s("div",{class:"stat-label"},"今日发放达达券",-1)),s("div",ts,d(a(l)(e.todayAddMoney2)),1)]),s("div",es,[t[11]||(t[11]=s("div",{class:"stat-label"},"今日消费达达券",-1)),s("div",as,d(a(l)(e.todayUseMoney2)),1)]),s("div",ds,[t[12]||(t[12]=s("div",{class:"stat-label"},"昨日发放达达券",-1)),s("div",os,d(a(l)(e.yesterdayAddMoney2)),1)]),s("div",ls,[t[13]||(t[13]=s("div",{class:"stat-label"},"昨日消费达达券",-1)),s("div",ns,d(a(l)(e.yesterdayUseMoney2)),1)])]),n.value?(m(),w("div",is,[u(b,null,{default:r(()=>[u(a(N))]),_:1}),s("span",null,d(n.value),1)])):x("",!0)]),_:1})),[[A,i.value]])}}}),_s=V(rs,[["__scopeId","data-v-f740c759"]]);export{_s as default};
