2 lines
4.3 KiB
JavaScript
2 lines
4.3 KiB
JavaScript
var e=(e,t,l)=>new Promise((a,s)=>{var r=e=>{try{i(l.next(e))}catch(t){s(t)}},o=e=>{try{i(l.throw(e))}catch(t){s(t)}},i=e=>e.done?a(e.value):Promise.resolve(e.value).then(r,o);i((l=l.apply(e,t)).next())});import{d as t,r as l,A as a,o as s,b as r,e as o,f as i,N as n,g as d,w as c,I as u,J as p,b2 as m,h as v,q as x,v as b,j as g,m as f}from"./index-BoIUJTA2.js";/* empty css *//* empty css *//* empty css *//* empty css *//* empty css */import{d as h,c as j}from"./operations-Cr4YfoRu.js";import{_ as y}from"./index.vue_vue_type_script_setup_true_lang-DUbflfBQ.js";import{E as w,a as _}from"./index-D2gD5Tn5.js";import{_ as C}from"./_plugin-vue_export-helper-BCo6x5W8.js";import"./iconify-DFoKediz.js";import"./index-BMeOzN3u.js";import"./index-COyGylbk.js";import"./index-Bq8lawOo.js";import"./index-Cp4NEpJ7.js";import"./index-ZsMdSUVI.js";import"./token-DWNpOE8r.js";import"./castArray-nM8ho4U3.js";import"./debounce-DQl5eUwG.js";import"./_baseIteratee-CtIat01j.js";import"./index-CXORCV4U.js";const k={class:"art-card h-auto min-h-[480px] p-6 mb-5 relative overflow-hidden group"},z={class:"art-card-header mb-6 relative z-10 flex-cb"},F={class:"title"},A={class:"flex-c mb-1"},D={class:"w-48"},E={class:"space-y-6 relative z-10"},I={class:"flex-cb mb-4"},N={class:"flex-c"},V={class:"text-base font-black text-g-900"},B={class:"text-xs text-g-600 mt-0.5 font-bold"},P={class:"text-primary"},U={class:"text-right"},q={class:"text-base font-black text-g-900"},J={class:"mt-4 pt-4 border-t border-g-100/50"},L={class:"flex-cb text-xs text-g-700 mb-2 px-1 font-bold"},M={class:"w-full h-2.5 bg-g-200 rounded-full overflow-hidden"},R=C(t({__name:"prize-pool-health",setup(t){const C=l([]),R=l(!1),S=l([]),T=l(),G=()=>e(this,null,function*(){try{const e=yield h("active");S.value=e,e.length>0&&(T.value=e[0].id)}catch(e){}}),H=()=>e(this,null,function*(){if(T.value){R.value=!0;try{C.value=yield j("7d",T.value)}catch(e){}finally{R.value=!1}}});a(T,()=>{H()});const K=e=>{const t=["bg-gradient-to-br from-[#FFD700] to-[#FFA500]","bg-gradient-to-br from-[#C0C0C0] to-[#808080]","bg-gradient-to-br from-[#CD7F32] to-[#A0522D]","bg-gradient-to-br from-[#87CEEB] to-[#4682B4]","bg-gradient-to-br from-g-400 to-g-500"];return t[e-1]||t[4]};return s(()=>e(this,null,function*(){yield G()})),(e,t)=>{const l=_,a=w,s=m;return o(),r("div",k,[t[5]||(t[5]=i("div",{class:"absolute -right-20 -bottom-20 size-80 bg-primary/5 rounded-full blur-3xl group-hover:bg-primary/10 transition-all duration-700"},null,-1)),i("div",z,[i("div",F,[i("div",A,[d(y,{icon:"ri:shield-check-fill",class:"text-primary mr-2 text-xl"}),t[1]||(t[1]=i("h4",{class:"text-lg font-black text-g-900 tracking-tight"},"奖池健康度分析",-1))]),t[2]||(t[2]=i("p",{class:"text-xs text-g-500"},"实时监控各级奖项的产出效率与库存分布",-1))]),i("div",D,[d(a,{modelValue:T.value,"onUpdate:modelValue":t[0]||(t[0]=e=>T.value=e),placeholder:"选择活动",size:"small",class:"w-full"},{default:c(()=>[(o(!0),r(u,null,p(S.value,e=>(o(),v(l,{key:e.id,label:e.name,value:e.id},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])])]),n((o(),r("div",E,[(o(!0),r(u,null,p(C.value,e=>(o(),r("div",{key:e.level,class:"prize-item p-5 rounded-3xl bg-g-50/50 border border-g-200 hover:border-primary/20 hover:bg-white hover:shadow-xl transition-all duration-300"},[i("div",I,[i("div",N,[i("span",{class:x(["w-12 h-12 rounded-2xl flex-cc text-white font-black text-xl shadow-lg mr-4",K(e.level)])},b(e.levelName[0]),3),i("div",null,[i("div",V,b(e.levelName),1),i("div",B,[t[3]||(t[3]=g("配置概率: ",-1)),i("span",P,b((100*e.winRate).toFixed(2))+"%",1)])])]),i("div",U,[i("div",q," ¥"+b(e.cost.toLocaleString()),1),t[4]||(t[4]=i("div",{class:"text-xs text-g-700 mt-0.5 font-bold"},"累计成本",-1))])]),i("div",J,[i("div",L,[i("span",null,"发放进度: "+b(e.winnerCount)+" / "+b(e.prizeCount),1),i("span",{class:x(e.winnerCount/e.prizeCount>.8?"text-danger font-black":"text-g-900")},b(Math.round(e.winnerCount/(e.prizeCount||1)*100))+"% ",3)]),i("div",M,[i("div",{class:"h-full bg-theme/80 rounded-full transition-all duration-1000",style:f({width:e.winnerCount/(e.prizeCount||1)*100+"%"})},null,4)])])]))),128))])),[[s,R.value]])])}}}),[["__scopeId","data-v-495c5e82"]]);export{R as default};
|