PageSourceSearch

https://zhheo.com/assets/activity-Jtuc0XsL.js

js zhheo.com collected 2026-10-01 10:12:37 UTC 4,058 bytes, 1 lines download raw bytes

1import{b as s,j as e,J as v,c as w}from"./music-section-CrLsl1Ir.js";import{a as y,F as N,b as P}from"./index-CFTCQEG8.js";import{L as F}from"./legalPagePrimitives-CZjKDtNo.js";const l=20,S=()=>{const[d,c]=s.useState([]),[g,x]=s.useState(1),[p,b]=s.useState(!0),[i,h]=s.useState("");s.useEffect(()=>{let t=!1;return(async()=>{b(!0),h("");try{const j=await P();t||(c(j),x(1))}catch{t||(h("活动列表加载失败,请稍后重试"),c([]))}finally{t||b(!1)}})(),()=>{t=!0}},[]);const r=Math.max(1,Math.ceil(d.length/l)),a=Math.min(r,Math.max(1,g)),m=(a-1)*l,k=d.slice(m,m+l),f=a<=1,u=a>=r,o=t=>{x(Math.min(r,Math.max(1,t)))};return e.jsxs("div",{className:"min-h-screen bg-[#F5F5F7] dark:bg-[#18171D] flex flex-col overflow-x-hidden",children:[e.jsxs("main",{className:"relative flex-1 pb-12 sm:pb-20",children:[e.jsxs("section",{className:"relative pt-28 pb-10 sm:pt-32 sm:pb-14",children:[e.jsx(F,{}),e.jsxs("div",{className:"relative mx-auto max-w-5xl px-6 text-center md:px-8",children:[e.jsx("p",{className:"text-[14px] font-medium text-[#6e6e73] dark:text-[#a1a1a6]",children:"最近更新"}),e.jsx("h1",{className:"mt-3 text-[40px] font-semibold leading-[1.05] tracking-tight text-[#1d1d1f] dark:text-[#f5f5f7] md:text-[60px]",children:"精选内容与活动"}),e.jsx("p",{className:"mx-auto mt-5 max-w-2xl text-[18px] leading-[1.55] text-[#424245] dark:text-[#d1d1d6] md:text-[21px]",children:"这里集中展示最近上线的产品、活动入口和我认为值得单独拿出来展示的内容。"}),e.jsx("p",{className:"mt-4 text-[14px] font-medium text-[#8b8e95] dark:text-[#a1a1a6]",children:p?"加载中…":i?"加载失败":`共 ${d.length} 条`})]})]}),e.jsx("section",{className:"mx-auto",style:{width:"calc(100vw - 64px)",maxWidth:1200},children:i?e.jsx("p",{className:"py-16 text-center text-[16px] text-[#6e6e73] dark:text-[#a1a1a6]",children:i}):p?e.jsx("p",{className:"py-16 text-center text-[16px] text-[#6e6e73] dark:text-[#a1a1a6]",children:"加载中…"}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"grid grid-cols-1 gap-6 lg:grid-cols-2",children:k.map(t=>{var n;return e.jsx(y,{item:t,className:"h-full"},`${t.appId??((n=t.entry)==null?void 0:n.title)}-${t.title}`)})}),d.length>l?e.jsxs("div",{className:"mt-8 flex flex-wrap items-center justify-center gap-2 sm:gap-3",children:[e.jsx("button",{type:"button",className:"rounded-full border border-black/[0.12] bg-white px-4 py-2 text-[14px] transition hover:border-[#0271e4] hover:text-[#0271e4] disabled:cursor-not-allowed disabled:opacity-50 dark:border-white/[0.14] dark:bg-[#151518] dark:hover:border-[#1caeff] dark:hover:text-[#1caeff]",disabled:f,onClick:()=>o(1),children:"首页"}),e.jsxs("button",{type:"button",className:"inline-flex items-center gap-1 rounded-full border border-black/[0.12] bg-white px-4 py-2 text-[14px] transition hover:border-[#0271e4] hover:text-[#0271e4] disabled:cursor-not-allowed disabled:opacity-50 dark:border-white/[0.14] dark:bg-[#151518] dark:hover:border-[#1caeff] dark:hover:text-[#1caeff]",disabled:f,onClick:()=>o(a-1),children:[e.jsx(v,{className:"h-4 w-4"}),"上一页"]}),e.jsxs("span",{className:"px-2 text-[14px] text-[#6e6e73] dark:text-[#a1a1a6]",children:[a,"/",r]}),e.jsxs("button",{type:"button",className:"inline-flex items-center gap-1 rounded-full border border-black/[0.12] bg-white px-4 py-2 text-[14px] transition hover:border-[#0271e4] hover:text-[#0271e4] disabled:cursor-not-allowed disabled:opacity-50 dark:border-white/[0.14] dark:bg-[#151518] dark:hover:border-[#1caeff] dark:hover:text-[#1caeff]",disabled:u,onClick:()=>o(a+1),children:["下一页",e.jsx(w,{className:"h-4 w-4"})]}),e.jsx("button",{type:"button",className:"rounded-full border border-black/[0.12] bg-white px-4 py-2 text-[14px] transition hover:border-[#0271e4] hover:text-[#0271e4] disabled:cursor-not-allowed disabled:opacity-50 dark:border-white/[0.14] dark:bg-[#151518] dark:hover:border-[#1caeff] dark:hover:text-[#1caeff]",disabled:u,onClick:()=>o(r),children:"尾页"})]}):null]})})]}),e.jsx(N,{})]})};export{S as default};

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.