import{_ as e}from"./chunk-qE2C5OKe.js";import{d as t}from"./chunk-D1JGNTfG.js";import{r as s,A as l,i as n,c as i,N as a,f as o}from"./souav-I_ihqEhP.js";import{r as c,C as r,P as p,S as x,H as u,U as d,u as f,V as m,R as v,Q as h,N as w,B as k,c as y,M as j}from"./chunk-BRI0aX6c.js";import{T as _}from"./chunk-CbUGsQB2.js";import{_ as b}from"./chunk-C-I2o6tN.js";import"./chunk-9PZSJnHb.js";import"./chunk-Bf-nSo-6.js";import"./chunk-DwkOxDMO.js";import"./chunk-CMQyd8eO.js";import"./chunk-a7obrEbD.js";import"./chunk-DQhVL27x.js";import"./chunk-cn7T4ICr.js";import"./chunk-Bh3yC0yB.js";import"./chunk-DjdYu-xF.js";import"./chunk-BHPWSuhB.js";/* empty css              */const g=t("Rank",()=>{const e=c([]),t=c(!1),i=c("0"),a=c(0),o=c(0),r=["vod_hits","vod_hits_month","vod_hits_week"];async function p(){t.value=!0,e.value=[];let a=await s(l.vod,{typeId:i.value,pageNo:0,pageSize:10,by:r[o.value],level:0});n(a.code)&&(e.value=a.data.videoList),t.value=!1}return{isLoading:t,vodList:e,typeId:i,typeIndex:a,setTypeIndex:function(e){a.value=e},byIndex:o,changeTypeId:function(e){i.value=e,p().then(()=>{})},changeRankTab:function(e){o.value=e,p().then(()=>{})},requestRankVideos:p}}),C={class:"mt-[15px] flex w-full flex-col"},I={class:"flex w-full"},T=["onClick"],R={class:"relative mt-[15px] flex h-[3px] w-full flex-row items-center"},F={class:"absolute flex h-full w-full"},V={key:0,class:"h-[3px] w-[20px] rounded-[1.5px] bg-[#FF5C24]"},L={class:"w-full px-2"},N={class:"no-scrollbar mt-[3px] flex h-[44px] w-full flex-row gap-2 overflow-scroll bg-[#252525] rounded-[3px]",ref:"scrollContainer"},S=["onClick"],q=r({__name:"RankTabView",setup(e){const t=g(),s=[{id:1,name:"总榜"},{id:2,name:"月榜"},{id:3,name:"周榜"}];function l(e,s){t.typeIndex=e,t.changeTypeId(s.toString())}return(e,n)=>(w(),p("div",C,[x("div",I,[(w(),p(u,null,d(s,(e,s)=>x("div",{key:s,class:m(["flex flex-1 items-center justify-center text-[16px] font-medium",s===f(t).byIndex?"text-[#FF5C24]":"text-white"]),onClick:e=>f(t).changeRankTab(s)},v(e.name),11,T)),64))]),x("div",R,[n[1]||(n[1]=x("div",{class:"w-full px-2"},[x("div",{class:"h-[1.5px] w-full bg-white"})],-1)),x("div",F,[(w(),p(u,null,d(s,(e,s)=>x("div",{key:s,class:m(["flex h-full flex-1 items-center justify-center"])},[s===f(t).byIndex?(w(),p("div",V)):h("",!0)])),64))])]),x("div",L,[x("div",N,[x("div",{onClick:n[0]||(n[0]=e=>l(0,0)),class:m(["nowrap inline-flex cursor-pointer items-center rounded-[15px] px-2 py-0 text-center text-[14px] whitespace-nowrap transition-all duration-300",0===f(t).typeIndex?"font-medium text-[#FF5C24]":"text-white/80"])}," 全部 ",2),(w(!0),p(u,null,d(f(i)().mainTypes,(e,s)=>(w(),p("div",{key:s,onClick:t=>l(s+1,e.type_id),class:m(["nowrap inline-flex cursor-pointer items-center rounded-[15px] px-2 py-0 text-center text-[14px] whitespace-nowrap transition-all duration-300",f(t).typeIndex===s+1?"font-medium text-[#FF5C24]":"text-white/80"])},v(e.type_name.replace(/\s*/g,"")),11,S))),128))],512)])]))}}),P={class:"relative flex w-full items-center justify-center"},z=["src"],A=r({__name:"RankTitleView",setup:e=>(e,t)=>(w(),p("div",P,[x("img",{src:f(_),alt:"",class:"aspect-[1280/315] w-full"},null,8,z),t[0]||(t[0]=x("div",{class:"absolute flex h-full w-full flex-col items-center justify-center bg-transparent"},[x("p",{class:"text-[32px] font-bold text-white"},"人气排行榜"),x("p",{class:"text-[13px] text-white"},"Top10人气排行榜")],-1))]))}),B={class:"mt-3 flex w-full flex-col space-y-3 pr-1"},H=["onClick"],M={class:"aspect-video w-[45%]"},Q={class:"ml-3 flex max-w-[45%] flex-col items-center"},U={class:"text-overflow-ellipsis line-clamp-2 w-full overflow-hidden text-[14px] text-white"},X={class:"mt-2 flex w-full flex-row items-center"},D=r({__name:"RankVideoView",setup(e){const t=g(),s=e=>0===e?"text-red-600":1===e?"text-orange-600":2===e?"text-yellow-600":"text-white";return(e,l)=>(w(),p("div",B,[(w(!0),p(u,null,d(f(t).vodList,(e,t)=>(w(),p("div",{class:"flex flex-row items-center",key:t,onClick:t=>{return s=e,void o.openVod(s);var s}},[x("div",{class:m([["flex w-[40px] items-center justify-center text-[16px] font-bold",s(t)],""])},v(t+1),3),x("div",M,[k(a,{src:e.vod_pic,class:"h-full w-full rounded-[3px] object-cover"},null,8,["src"])]),x("div",Q,[x("p",U,v(e.vod_name),1),x("div",X,[l[0]||(l[0]=x("p",{class:"text-[12px] text-white"},"人气指数:",-1)),x("p",{class:m(["text-[16px] font-bold",s(t)])},v(e.vod_hits),3)])])],8,H))),128))]))}}),E={class:"w-full"},G=r({__name:"index",setup(t){const s=g();return y(()=>{s.requestRankVideos()}),(t,l)=>(w(),p("div",E,[k(A),k(q),f(s).isLoading?(w(),j(b,{key:0})):h("",!0),f(s).isLoading?h("",!0):(w(),j(D,{key:1})),k(e,{class:"mt-5"})]))}});export{G as default};
