| 1 |
- import{n as F,aR as H,k as Q}from"./element-plus-yhtdTbPD.js";import{_ as Z,u as G,a8 as J}from"./index-D5k4QILW.js";import{aA as P,r as C,l as X,L as t,P as n,Z as c,u as v,M as b,O as S,F as i,ab as d,H as s,X as _,R as k,Q as $,ax as j,ay as K}from"./vue-vendor-C1ve1r-r.js";const U=p=>(j("data-v-d0ae10e4"),p=p(),K(),p),W={class:"pc-lottery-page"},Y={class:"pc-main-container"},ee={class:"page-header"},te={class:"title"},se={class:"lottery-grid"},oe=["onClick"],re={class:"item-header"},ne={class:"header-left"},ae={class:"lottery-name"},le={class:"lottery-issue"},ce={class:"header-right"},ie={class:"lottery-time"},de={key:0,class:"play-container"},ue={class:"equation-row"},_e={class:"grey-ball"},ye={key:0,class:"operator"},pe=U(()=>n("span",{class:"operator"},"=",-1)),he={class:"red-sum-ball"},ge={class:"tags-row"},fe={key:1,class:"play-container"},ve={class:"lhc-row"},be={key:0,class:"operator"},ke={class:"lhc-col"},me={class:"lhc-zodiac"},we={key:2,class:"play-container"},Ne={class:"blocks-row"},Ce={key:0,class:"tags-row mt-tags"},Se={key:3,class:"play-container"},Be={class:"balls-row"},xe={key:0,class:"tags-row mt-tags"},Ie={key:4,class:"play-container"},Le={class:"dice-row"},ze={key:0,class:"tags-row mt-tags"},Ae={__name:"index",setup(p){const{t:m}=G(),B=P(),w=C([]),h=C(!1),N=()=>{h.value=!0,J().then(e=>{e.code===1&&(w.value=e.data)}).finally(()=>{h.value=!1})};X(()=>{N()});const x=e=>e.issue||e.issue_no||"",I=e=>{const l=e.open_time||e.start_time||"";return l.length>=16?l.substring(5,16):l},u=e=>{const l=e.winning_numbers||e.open_code||"";return l?l.split(","):[]},g=e=>e?Array.isArray(e)?e.filter(Boolean):String(e).split(",").filter(Boolean):[],L=e=>e.reduce((l,y)=>l+Number(y),0),z=e=>e?Array.isArray(e)?e.filter(Boolean):String(e).split(" ").filter(Boolean):[],A=e=>["大","双","极大"].includes(e)?"tag-red":["小","单","极小"].includes(e)?"tag-green":e.includes("尾")?"tag-yellow":"tag-default",D=e=>["马","蛇","龙","兔","虎","牛","鼠","猪","狗","鸡","猴","羊"][(Number(e)-1)%12],T=e=>{const l=Number(e),y=[1,2,7,8,12,13,18,19,23,24,29,30,34,35,40,45,46],f=[3,4,9,10,14,15,20,21,25,26,31,32,36,37,41,42,47,48],o=[5,6,11,16,17,22,27,28,33,38,39,43,44,49];return y.includes(l)?"color-red":f.includes(l)?"color-blue":o.includes(l)?"color-green":""},M=e=>({0:"#f9a826",1:"#e2d230",2:"#2881e1",3:"#4a4a4a",4:"#ff7e00",5:"#10e2e5",6:"#5134ff",7:"#bfbfbf",8:"#ff2600",9:"#780b00",10:"#07bf00"})[Number(e)]||"#e54d42",q=e=>{const l={1:[0,0,0,0,1,0,0,0,0],2:[1,0,0,0,0,0,0,0,1],3:[1,0,0,0,1,0,0,0,1],4:[1,0,1,0,0,0,1,0,1],5:[1,0,1,0,1,0,1,0,1],6:[1,0,1,1,0,1,1,0,1]};return l[Number(e)]||l[1]},E=e=>{B.push({name:"LotteryDrawHistory",query:{game:e.game,name:e.name,params:JSON.stringify(e.params)}})};return(e,l)=>{const y=F,f=Q;return s(),t("div",W,[n("div",Y,[n("div",ee,[n("h2",te,c(v(m)("开奖历史")),1),b(f,{type:"primary",circle:"",onClick:N,loading:h.value},{default:S(()=>[b(y,null,{default:S(()=>[b(v(H))]),_:1})]),_:1},8,["loading"])]),n("div",se,[(s(!0),t(i,null,d(w.value,(o,O)=>(s(),t("div",{class:"lottery-item",key:O,onClick:r=>E(o)},[n("div",re,[n("div",ne,[n("span",ae,c(o.name),1),n("span",le,c(x(o.lottery))+" "+c(v(m)("期")),1)]),n("div",ce,[n("span",ie,c(I(o.lottery)),1)])]),[1,2].includes(o.type)?(s(),t("div",de,[n("div",ue,[(s(!0),t(i,null,d(u(o.lottery),(r,a)=>(s(),t(i,{key:a},[n("div",_e,c(r),1),a<u(o.lottery).length-1?(s(),t("span",ye,"+")):_("",!0)],64))),128)),pe,n("div",he,c(L(u(o.lottery))),1)]),n("div",ge,[(s(!0),t(i,null,d(z(o.lottery.combo),(r,a)=>(s(),t("div",{class:k(["combo-tag",A(r)]),key:a},c(r),3))),128))])])):[3,4,5,6].includes(o.type)?(s(),t("div",fe,[n("div",ve,[(s(!0),t(i,null,d(u(o.lottery),(r,a)=>(s(),t(i,{key:a},[a===u(o.lottery).length-1?(s(),t("span",be,"+")):_("",!0),n("div",ke,[n("div",{class:k(["lhc-ball",T(r)])},c(r),3),n("span",me,c(D(r)),1)])],64))),128))])])):[7,9,11].includes(o.type)?(s(),t("div",we,[n("div",Ne,[(s(!0),t(i,null,d(u(o.lottery),(r,a)=>(s(),t("div",{class:"square-block",key:a,style:$({backgroundColor:M(r)})},c(r),5))),128))]),o.lottery.open_code_other?(s(),t("div",Ce,[(s(!0),t(i,null,d(g(o.lottery.open_code_other),(r,a)=>(s(),t("div",{class:"combo-tag tag-blue",key:a},c(r),1))),128))])):_("",!0)])):[8,10].includes(o.type)?(s(),t("div",Se,[n("div",Be,[(s(!0),t(i,null,d(u(o.lottery),(r,a)=>(s(),t("div",{class:"ball",key:a},c(r),1))),128))]),o.lottery.open_code_other?(s(),t("div",xe,[(s(!0),t(i,null,d(g(o.lottery.open_code_other),(r,a)=>(s(),t("div",{class:"combo-tag tag-blue",key:a},c(r),1))),128))])):_("",!0)])):[12,13].includes(o.type)?(s(),t("div",Ie,[n("div",Le,[(s(!0),t(i,null,d(u(o.lottery),(r,a)=>(s(),t("div",{class:"dice",key:a},[(s(!0),t(i,null,d(q(r),(R,V)=>(s(),t("div",{key:V,class:k(["dot",{visible:R,"red-dot":Number(r)===1||Number(r)===4}])},null,2))),128))]))),128))]),o.lottery.open_code_other?(s(),t("div",ze,[(s(!0),t(i,null,d(g(o.lottery.open_code_other),(r,a)=>(s(),t("div",{class:"combo-tag tag-blue",key:a},c(r),1))),128))])):_("",!0)])):_("",!0)],8,oe))),128))])])])}}},qe=Z(Ae,[["__scopeId","data-v-d0ae10e4"]]);export{qe as default};
|