import{_ as P}from"./InfiniteScroll.2b537058.js";import{Q as V}from"./QTab.b433eb3c.js";import{Q as U}from"./QTabs.29f78ab9.js";import{_ as B,E as j,s,C as o,aa as r,F as l,G as t,B as n,v as c,z as y,ac as u,bh as T,A as v,ab as z,U as M,ae as L,r as f,bo as Y,bp as E,w as Q,J as F,t as I,Q as O,D as W,al as G,at as H,bn as J,x as K,au as X,av as Z}from"./index.e3a3afa6.js";import{Q as ee}from"./QScrollArea.190c2983.js";import{Q as te}from"./QBadge.d2b1551a.js";import{M as ae}from"./const.1363c01a.js";import{_ as se}from"./MainPageFooter.41b3b532.js";import{u as oe}from"./infiniteScroll.c968ffec.js";import"./QSpinnerDots.75a67ef5.js";import"./touch.70a9dd44.js";import"./selection.44208e26.js";import"./sorry.e0a2c349.js";import"./QResizeObserver.91fdadd6.js";import"./QScrollObserver.39f4cf49.js";import"./QRouteTab.ebe5d2dc.js";import"./QFooter.eb7ba003.js";const re={class:"row justify-between q-py-xs"},ie={class:"text-caption text-grey"},ce={class:"text-caption text-red"},le={class:"row items-center"},ne={class:"col"},de={class:"row items-center"},me={class:"col-auto text-red text-center"},_e={class:"text-h6"},ue={class:"text-caption q-mt-xs"},he={key:1,class:"text-h6"},pe={key:1,class:"text-h6"},fe={class:"col"},ve={class:"row items-center justify-end"},ye={key:0,class:"row justify-between items-center"},xe={key:0,class:"text-caption text-grey text-left"},we={key:1,class:"text-caption text-grey text-right"},ge={key:1,class:"text-caption q-mt-xs text-center text-red"},be={__name:"ScoreItem",props:{item:{type:Object},matchType:String},setup(a){const e=a,k=j();return(h,x)=>{const m=M;return s(),o("div",{class:"bg-white q-pa-md",onClick:x[0]||(x[0]=_=>{var p;return y(k).push({path:"/score/detail/"+e.matchType,query:{id:(p=e.item)==null?void 0:p.match_id}})})},[r("div",re,[r("div",ie,[l(t(e.item.issue_num_week)+t(e.item.play_num_view||e.item.play_num)+" ",1),n(te,{color:"indigo-10",rounded:""},{default:c(()=>[l(t(e.item.jc_competition_name),1)]),_:1})]),r("div",ce,[l(t(y(ae)[e.item.match.status])+" ",1),e.item.match.status==0?(s(),o(u,{key:0},[l(t(y(T)(e.item.match.start_time)),1)],64)):(s(),o(u,{key:1},[l(t(y(T)(e.item.match.start_time)),1)],64))])]),r("div",le,[r("div",ne,[r("div",de,[n(m,{size:"md",class:"q-mr-sm bg-white team-logo",square:"",ratio:"10/13",fit:"contain",src:e.item.match.home_team_logo_url},null,8,["src"]),l(" "+t(e.item.match.home_team_name),1)])]),r("div",me,[e.item.score?(s(),o(u,{key:0},[e.matchType=="jczq"?(s(),o(u,{key:0},[r("div",_e,t(e.item.score.full_time_score||"VS"),1),r("div",ue,[e.item.score.half_time_score?(s(),o(u,{key:0},[l("\u4E0A\u534A\u573A")],64)):v("",!0),l(" "+t(e.item.score.half_time_score),1)])],64)):(s(),o("div",he,t(e.item.score.home_score)+":"+t(e.item.score.away_score),1))],64)):(s(),o("div",pe,"VS"))]),r("div",fe,[r("div",ve,[l(t(e.item.match.away_team_name)+" ",1),n(m,{size:"md",class:"q-ml-sm bg-white team-logo",square:"",ratio:"10/13",fit:"contain",src:e.item.match.away_team_logo_url},null,8,["src"])])])]),e.matchType=="jczq"?(s(),o("div",ye,[a.item.spf_odds?(s(),o("div",xe," \u7ADE\u5F69sp "+t(a.item.spf_odds.win)+" "+t(a.item.spf_odds.draw)+" "+t(a.item.spf_odds.loss),1)):v("",!0),a.item.rq_odds?(s(),o("div",we," \u4E3B("+t(a.item.rq_odds.handicap>0?"+"+a.item.rq_odds.handicap:a.item.rq_odds.handicap||0)+") "+t(a.item.rq_odds.win)+" "+t(a.item.rq_odds.draw)+" "+t(a.item.rq_odds.loss),1)):v("",!0)])):v("",!0),e.matchType=="lq"&&e.item.score?(s(),o("div",ge,[(s(),o(u,null,z(4,_=>r("span",{key:_,class:"q-mx-xs"},t(e.item.score["q"+_+"home_score"])+":"+t(e.item.score["q"+_+"away_score"]),1)),64))])):v("",!0)])}}};var qe=B(be,[["__scopeId","data-v-427ad6f8"]]);const ke=a=>(X("data-v-7100e52a"),a=a(),Z(),a),Se={class:"row no-wrap text-no-wrap q-pa-xs"},Ve=ke(()=>r("br",null,null,-1)),Te={__name:"IndexPage",setup(a){const e=W();j(),L();const k=f("1"),h=f("jczq"),x=f([]),m=f(Y.formatDate(Date.now(),"YYYY-MM-DD")),_=f(null),p=f(null),{list:C,refresh:q,load:D,scrollRef:R}=oe(w=>G.getMatchList(h.value,{page:w,date:m.value}).then(i=>(x.value=i.dates,{data:i.result})));E(()=>{_.value&&$({target:_.value})}),Q(h,q),Q(m,q);function $(w){let i=w.target.getBoundingClientRect();const g=window.innerWidth;(i.left<=50||i.right+50>=g)&&p.value.setScrollPosition("horizontal",p.value.getScrollPosition().left+i.left-g/2+i.width/2,100)}let S=e.query.t;return F(()=>{e.query.t!=S&&(S=e.query.t,q())}),(w,i)=>{const g=P,A=H("PageLayout");return s(),I(A,{class:"score-page"},{"header-title":c(()=>[n(U,{"indicator-color":"transparent",dense:"",modelValue:h.value,"onUpdate:modelValue":i[0]||(i[0]=d=>h.value=d),"narrow-indicator":"","no-caps":"","active-bg-color":"red-9",class:"tabs-mini"},{default:c(()=>[n(V,{class:"rounded-borders-lg",name:"jczq",label:"\u8DB3\u7403"}),n(V,{class:"rounded-borders-lg",name:"lq",label:"\u7BEE\u7403"})]),_:1},8,["modelValue"])]),"header-right":c(()=>[n(O,{flat:"",dense:"",color:"white",to:{path:"/win/notices",query:{t:Date.now()}}},{default:c(()=>[l(" \u5F00\u5956\u516C\u544A ")]),_:1},8,["to"])]),"header-append":c(()=>[v("",!0)]),footer:c(()=>[n(se)]),default:c(()=>[n(g,{load:y(D),list:y(C),ref_key:"scrollRef",ref:R},{prepend:c(()=>[n(ee,{ref_key:"scrollAreaRef",ref:p,style:{height:"60px"},class:"scroll-area-no-y",visible:!1,"bar-style":{opacity:0},thumbStyle:{width:"0px",opacity:.2,height:"0px"}},{default:c(()=>[r("div",Se,[(s(!0),o(u,null,z(x.value,(d,N)=>(s(),I(J,{modelValue:m.value,"onUpdate:modelValue":i[2]||(i[2]=b=>m.value=b),key:N,val:d.date,ref_for:!0,ref:b=>{m.value==d.date&&b&&(_.value=b.$el)},class:K(["no-icon q-mx-xs q-py-xs q-px-sm text-center text-caption rounded-borders",m.value===d.date?"bg-primary text-white":"bg-white text-grey-7"])},{default:c(()=>[l(t(d.week_str),1),Ve,l(t(d.date_str),1)]),_:2},1032,["modelValue","val","class"]))),128))])]),_:1},8,["thumbStyle"])]),default:c(({item:d})=>[n(qe,{class:"q-mb-sm",item:d,matchType:h.value},null,8,["item","matchType"])]),_:1},8,["load","list"])]),_:1})}}};var Fe=B(Te,[["__scopeId","data-v-7100e52a"]]);export{Fe as default};