1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./Bk9J3n4x.js","./B7unHZUh.js","./entry.C5qCm_sK.css","./al51u9Az.js","./CGyrAlWq.js","./Cn6nqDGM.js","./GridView.CMmznvGS.css","./CCBynxV_.js","./ListView.Uz6LsFvJ.css"])))=>i.map(i=>d[i]); 2import{_ as z,aQ as G,l as f,v as c,r as p,i as F,J,aR as K,L as Q,w as H,c as d,o as i,e as o,t as L,m as _,P as V,q as C,F as A,C as W,f as X,x as Y,h as T,E as Z}from"./B7unHZUh.js";import{u as ee}from"./4RMheTwp.js";import{u as ae}from"./Cn6nqDGM.js";const te={class:"dramas-title"},se={class:"dramas-section"},ne={class:"pagination"},re={key:1,class:"pagination-btn prev disabled"},oe={key:0,class:"pagination-ellipsis"},le={key:3,class:"pagination-btn next disabled"},ie={__name:"DramaCards",async setup(pe){let I,b;G(s=>{var a,e;return{"8359f186":r.value===1?.6:1,"7e6c4cde":r.value===1?"not-allowed":"pointer",ff895338:r.value===Math.ceil((((a=c(h))==null?void 0:a.total)||10)/c(g))?.6:1,"7c5d6610":r.value===Math.ceil((((e=c(h))==null?void 0:e.total)||10)/c(g))?"not-allowed":"pointer"}});const{t:k}=F(),n=J();K();const{request:R}=ee(),S=f(()=>!n.path.includes("/genres")),r=f(()=>n.params["cate-page"]?parseInt(n.params["cate-page"])||1:n.params.page&&parseInt(n.params.page)||1),g=p(24),w=p([]),h=p([]),m=p(0),v=p(0),$=p(""),D=p(""),M=p(!1),x=p(new Map),N=s=>{const a=s.split("/").filter(y=>y);let e=-1,t=a.findIndex(y=>y==="genres"||y==="dramas");if(t!==-1&&t+1<a.length&&(e=t+1),e===-1)return null;const l=a[e];if(/^\d+$/.test(l))return null;const u=l.match(/(.+)-(\d+)$/);return u?{encodedName:u[1],id:u[2],decodedName:decodeURIComponent(u[1])}:null},B=async(s=!0)=>{const a=`${r.value}-${m.value}-${v.value}`;if(s&&x.value.has(a)){const e=x.value.get(a);h.value=e,w.value=(e==null?void 0:e.list)||[];return}M.value=!0;try{if(n.path.includes("/genres")){const t=N(n.path);if(t){const{decodedName:l,id:u}=t;g.value=10,m.value=u,$.value=l}}else if(n.path.match(/\/dramas\/[^\/]+/)&&!n.path.match(/\/dramas\/\d+$/)){const t=N(n.path);if(t){const{decodedName:l,id:u}=t;v.value=u,D.value=l}}const{data:e}=await R("/cmsShortPlay/queryPage",{method:"POST",body:{pageNo:r.value,pageSize:g.value,labelId:m.value===0?"":m.value,classId:v.value===0?"":v.value}});h.value=e,w.value=(e==null?void 0:e.list)||[],x.value.set(a,e)}catch(e){console.error("è·åæ°æ®å¤±è´¥:",e)}finally{M.value=!1}};[I,b]=Q(()=>B()),await I,b();const O=V(()=>T(()=>import("./Bk9J3n4x.js"),__vite__mapDeps([0,1,2,3,4,5,6]),import.meta.url)),j=V(()=>T(()=>import("./CCBynxV_.js"),__vite__mapDeps([7,1,2,3,4,5,8]),import.meta.url)),E=f(()=>{var s;return Math.ceil((((s=h.value)==null?void 0:s.total)||0)/g.value)}),U=f(()=>{const s=r.value,a=E.value;if(a<=5)return Array.from({length:a},(t,l)=>({page:l+1,type:"page"}));const e=[];if(e.push({page:1,type:"page"}),s<=3){for(let t=2;t<=Math.min(4,a-1);t++)e.push({page:t,type:"page"});a>4&&e.push({page:"...",type:"ellipsis"})}else if(s>=a-2){e.push({page:"...",type:"ellipsis"});for(let t=Math.max(2,a-3);t<=a-1;t++)e.push({page:t,type:"page"})}else e.push({page:"...",type:"ellipsis"}),e.push({page:s-1,type:"page"}),e.push({page:s,type:"page"}),e.push({page:s+1,type:"page"}),e.push({page:"...",type:"ellipsis"});return a>1&&e.push({page:a,type:"page"}),e}),P=s=>{const a=ae();if(n.path.includes("/genres/")){const t=n.path.match(/\/genres\/([^\/]+)/);if(t){const l=t[1];return a(s===1?`/genres/${l}`:`/genres/${l}/${s}`)}}const e=n.path.match(/\/dramas\/([^\/]+)/);if(e){const t=e[1];if(!/^\d+$/.test(t))return a(s===1?`/dramas/${t}`:`/dramas/${t}/${s}`)}return a(s===1?"/dramas":`/dramas/${s}`)};H(()=>n.path,()=>{B()});const q=f(()=>m.value?k("DramaTag",{CEO:$.value}):v.value?k("DramaTag",{CEO:D.value}):k("AllDramas"));return(s,a)=>{const e=Z;return i(),d("div",null,[o("div",te,[o("h1",null,L(q.value.replace(/-+/g," ").replace(/\b\w/g,t=>t.toUpperCase())),1)]),o("div",se,[S.value?(i(),_(c(O),{key:0,dramas:c(w),nextPageDramas:s.nextPageGridDramas},null,8,["dramas","nextPageDramas"])):(i(),_(c(j),{key:1,dramas:c(w),nextPageDramas:s.nextPageListDramas},null,8,["dramas","nextPageDramas"])),o("div",ne,[r.value>1?(i(),_(e,{key:0,to:P(r.value-1),class:"pagination-btn prev"},{default:C(()=>a[0]||(a[0]=[o("svg",{xmlns:"http://www.w3.org/2000/svg",width:"14",height:"14",viewBox:"0 0 14 14",fill:"none"},[o("path",{d:"M8.75 3.5L5.25 7L8.75 10.5",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"})],-1)])),_:1,__:[0]},8,["to"])):(i(),d("div",re,a[1]||(a[1]=[o("svg",{xmlns:"http://www.w3.org/2000/svg",width:"14",height:"14",viewBox:"0 0 14 14",fill:"none"},[o("path",{d:"M8.75 3.5L5.25 7L8.75 10.5",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"})],-1)]))),(i(!0),d(A,null,W(U.value,t=>(i(),d(A,{key:t.page},[t.type==="ellipsis"?(i(),d("span",oe,L(t.page),1)):(i(),_(e,{key:1,to:P(t.page),class:Y(["pagination-btn","page-number",{active:t.page===r.value}])},{default:C(()=>[X(L(t.page),1)]),_:2},1032,["to","class"]))],64))),128)),r.value<E.value?(i(),_(e,{key:2,to:P(r.value+1),class:"pagination-btn next"},{default:C(()=>a[2]||(a[2]=[o("svg",{xmlns:"http://www.w3.org/2000/svg",width:"14",height:"14",viewBox:"0 0 14 14",fill:"none"},[o("path",{d:"M5.25 3.5L8.75 7L5.25 10.5",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"})],-1)])),_:1,__:[2]},8,["to"])):(i(),d("div",le,a[3]||(a[3]=[o("svg",{xmlns:"http://www.w3.org/2000/svg",width:"14",height:"14",viewBox:"0 0 14 14",fill:"none"},[o("path",{d:"M5.25 3.5L8.75 7L5.25 10.5",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"})],-1)])))])])])}}},ge=z(ie,[["__scopeId","data-v-2563ad35"]]);export{ge as default}; 3//# sourceMappingURL=CDWgzLT-.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.