chunk-2a53f3e4.eaf3b885.js 7.9 KB
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2a53f3e4"],{"2d52":function(e,t,l){},"413f":function(e,t,l){"use strict";l.r(t);l("14d9"),l("0643"),l("4e3e");var a=l("7a23"),o=l("5502"),n=l("2ef0"),i=l.n(n),u=l("af58"),d=l("54a5"),c=l("1478"),v=l("cae2");const s={class:"live-all-page acce-render"},r={key:0,class:"separator"},m={key:3},h={name:"LiveAll"};var f=Object(a["defineComponent"])({...h,props:{fitterIndex:{type:Number,required:!0,default:()=>4}},setup(e){const t=Object(o["b"])(),l=Object(a["ref"])(!0),n=Object(a["ref"])(!1),h=Object(a["ref"])(!1),f=Object(a["ref"])(!1),b=e,g=Object(a["toRef"])(b,"fitterIndex"),j=async()=>{try{l.value?n.value=!0:h.value=!0,f.value=!1,await Object(v["b"])(t),l.value?n.value=!1:h.value=!1,f.value=!0,l.value=!1}catch(e){l.value?n.value=!1:h.value=!1,f.value=!0,l.value=!1}},p=e=>{let l=t.state.updateWsTime||null,a=(null===e||void 0===e?void 0:e.status)||null,o=!1;return l&&a?((l>e.match_time&&a<2||[2,3,4,5,6,7].includes(a)&&!t.state.nm_live_message[e.id])&&(o=!0),o):o},O=e=>{const t={8:1,9:2,10:3,11:4,12:5,13:6,0:7};return e.sort((e,l)=>{const a=t[e.status]||0,o=t[l.status]||0;return a-o||e.match_time-l.match_time})},B=Object(a["computed"])(()=>i.a.clone(t.state.match_list_all)),k=Object(a["computed"])(()=>t.state.high_light),w=Object(a["computed"])(()=>t.state.set_config),y=Object(a["computed"])(()=>{let e=!1,l=[[],[],[],[],[]];for(let a=0;a<B.value.length;a++){let o=t.state.match_list_all[a];if(!o||!o.id){e=!0;break}p(o)||(("all"==w.value.type||"jz"==w.value.type&&o.is_jingcai)&&(k.value["score"][o.id]&&w.value.goal?(o.is_hl=!0,o.ranksBackground=k.value["score"][o.id].ranksBackground):k.value["red"][o.id]&&w.value.red?(o.is_hl=!0,o.ranksBackground=k.value["red"][o.id].ranksBackground):k.value["yellow"][o.id]&&w.value.yellow?(o.is_hl=!0,o.ranksBackground=k.value["yellow"][o.id].ranksBackground):o.is_hl=!1),l[0].push(o),o.is_zucai&&l[3].push(o),(o.is_jingcai||o.is_beidan)&&(l[4].push(o),o.is_jingcai&&l[1].push(o),o.is_beidan&&l[2].push(o)))}if(e)Object(v["b"])(t,!0);else for(let t=0;t<l.length;t++)l[t]=O(l[t]);return l}),E=Object(a["computed"])(()=>t.state.nm_live_message),_=Object(a["ref"])([0,25]),x=Object(a["ref"])({header:0,top:0,center:0,bottom:0,more:0,note:0,paddingBottom:0,finishedText:0}),H=Object(a["computed"])(()=>x.value.top+x.value.center+x.value.bottom+x.value.paddingBottom),C=Object(a["ref"])(0),N=Object(a["ref"])(0),T=Object(a["ref"])({}),z=(e,t)=>{T.value[e]===t||t<1||(T.value[e]=t)},S=async()=>{if(x.value.header<1){let e=document.getElementsByClassName("reserve-box")[0];(null===e||void 0===e?void 0:e.offsetHeight)>0&&(x.value.header=null===e||void 0===e?void 0:e.offsetHeight)}if(x.value.top<1){let e=document.getElementsByClassName("match-top")[0];(null===e||void 0===e?void 0:e.offsetHeight)>0&&(x.value.top=null===e||void 0===e?void 0:e.offsetHeight)}if(x.value.top<1){let e=document.getElementsByClassName("match-top")[0];(null===e||void 0===e?void 0:e.offsetHeight)>0&&(x.value.top=null===e||void 0===e?void 0:e.offsetHeight)}if(x.value.center<1){let e=document.getElementsByClassName("match-center")[0];(null===e||void 0===e?void 0:e.offsetHeight)>0&&(x.value.center=null===e||void 0===e?void 0:e.offsetHeight)}if(x.value.bottom<1){let e=document.getElementsByClassName("match-bottom")[0];(null===e||void 0===e?void 0:e.offsetHeight)>0&&(x.value.bottom=null===e||void 0===e?void 0:e.offsetHeight)}if(x.value.more<1){let e=document.getElementsByClassName("match-more")[0];(null===e||void 0===e?void 0:e.offsetHeight)>0&&(x.value.more=null===e||void 0===e?void 0:e.offsetHeight)}if(x.value.note<1){let e=document.getElementsByClassName("match-note")[0];(null===e||void 0===e?void 0:e.offsetHeight)>0&&(x.value.note=null===e||void 0===e?void 0:e.offsetHeight)}if(x.value.finishedText<1){let e=document.getElementsByClassName("van-list__finished-text")[0];(null===e||void 0===e?void 0:e.offsetHeight)>0&&(x.value.finishedText=null===e||void 0===e?void 0:e.offsetHeight)}if(x.value.paddingBottom<1){var e;let t=document.getElementsByClassName("match-box")[0];t&&null!==(e=window)&&void 0!==e&&null!==(e=e.getComputedStyle(t))&&void 0!==e&&e.paddingBottom&&(x.value.paddingBottom=Number(window.getComputedStyle(t).paddingBottom.split("px")[0]))}},L=e=>{let t=i.a.clone(y.value[g.value]),l=e+window.innerHeight;if(e+200<window.innerHeight)return[0,25];if(l+200>=document.body.clientHeight)return[t.length-25,t.length];let a=x.value.header,o={isEnd:!1,index:_.value[0]},n=x.value.header,u={isEnd:!1,index:_.value[1]};t.forEach((i,d)=>{a<e?a+=T[i.id]||H.value:o.isEnd||(o.index=d-10<0?0:d-10,o.isEnd=!0),n<l?n+=T[i.id]||H.value:u.isEnd||(u.index=d+10>t.length?t.length:d+10,u.isEnd=!0),!o.isEnd||u.isEnd});let d=o.index>t.length-25?t.length-25:o.index,c=u.index<25?25:u.index;return[d,c]},V=()=>{let e=document.documentElement.scrollTop;C.value>0&&Math.abs(C.value-e)<80||(C.value=e,S(),_.value=L(e))},D=()=>{x.value={header:0,top:0,center:0,bottom:0,more:0,note:0,paddingBottom:0,finishedText:0},T.value={},C.value=0},A=(e,t)=>e==g.value&&t>=_.value[0]&&t<_.value[1],F=e=>{var t;return null===(t=E.value[e])||void 0===t?void 0:t.stats},I=e=>{var t;return null===(t=E.value[e])||void 0===t?void 0:t.score[5]},J=Object(a["ref"])(null),M=(e,t)=>{J.value&&J.value==e?J.value=null:J.value=e},R=Object(a["computed"])(()=>window.innerHeight-x.value.header);return Object(a["watch"])(()=>t.state.init,e=>{e?(l.value?n.value=!1:h.value=!1,f.value=!0,l.value=!1):(l.value?n.value=!0:h.value=!0,f.value=!1)}),Object(a["onBeforeMount"])(()=>{t.state.init?(l.value?n.value=!1:h.value=!1,f.value=!0,l.value=!1):(l.value?n.value=!0:h.value=!0,f.value=!1)}),Object(a["onActivated"])(()=>{C.value=0,window.addEventListener("scroll",V),window.addEventListener("resize",D);let e=setTimeout(()=>{window.scrollTo({top:N.value}),clearTimeout(e),e=null},300)}),Object(a["onDeactivated"])(()=>{window.removeEventListener("scroll",V),window.removeEventListener("resize",D),N.value=document.documentElement.scrollTop}),(e,t)=>(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",s,[(Object(a["openBlock"])(!0),Object(a["createElementBlock"])(a["Fragment"],null,Object(a["renderList"])(y.value,(e,l)=>(Object(a["openBlock"])(),Object(a["createElementBlock"])(a["Fragment"],null,[e?(Object(a["openBlock"])(),Object(a["createBlock"])(a["Transition"],{name:"slideInRight",key:e},{default:Object(a["withCtx"])(()=>[Object(a["withDirectives"])(Object(a["createVNode"])(Object(a["unref"])(d["a"]),{modelValue:h.value,"onUpdate:modelValue":t[0]||(t[0]=e=>h.value=e),onRefresh:j},{default:Object(a["withCtx"])(()=>[Object(a["createVNode"])(Object(a["unref"])(u["a"]),{id:"liveAll",ref_for:!0,ref:"liveAll",loading:n.value,finished:f.value,"finished-text":"没有更多了",style:Object(a["normalizeStyle"])({"min-height":R.value+"px"})},{default:Object(a["withCtx"])(()=>[(Object(a["openBlock"])(!0),Object(a["createElementBlock"])(a["Fragment"],null,Object(a["renderList"])(e,(t,o)=>(Object(a["openBlock"])(),Object(a["createElementBlock"])(a["Fragment"],{key:t},[8==t.status&&(e[o-1]&&8!=e[o-1].status||!e[o-1])?(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",r," ———   已结束   ——— ")):Object(a["createCommentVNode"])("",!0),A(l,o)?(Object(a["openBlock"])(),Object(a["createBlock"])(c["a"],{key:1,class:"match-box",data:t,note:I(t.id),otherData:F(t.id),onDomHeight:z,onShowMore:M,isShow:J.value==t.id,isJz:1==g.value},null,8,["data","note","otherData","isShow","isJz"])):T.value[t.id]?(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",{key:2,style:Object(a["normalizeStyle"])({height:T.value[t.id]+"px"})},null,4)):(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",m))],64))),128))]),_:2},1032,["loading","finished","style"])]),_:2},1032,["modelValue"]),[[a["vShow"],l==g.value]])]),_:2},1024)):Object(a["createCommentVNode"])("",!0)],64))),256))]))}}),b=(l("c2a6"),l("6b0d")),g=l.n(b);const j=g()(f,[["__scopeId","data-v-8743ba3c"]]);t["default"]=j},c2a6:function(e,t,l){"use strict";l("2d52")}}]);