PageSourceSearch

https://www.hakkaradio.org.tw/_nuxt/B5EfM2eu.js

js hakkaradio.org.tw collected 2026-10-02 11:05:23 UTC 2,506 bytes, 1 lines download raw bytes

1import{_ as P}from"./BLbKje2D.js";import{_ as b}from"./BVT3q34S.js";import{_ as $}from"./BWyMP1SS.js";import{d as A,y as C,e as D,f as L,j as d,k as i,t as m,l as r,n as u,p as f,m as h,F as w,r as k,v as y,a as B,i as o,B as V,q as v,_ as j}from"./BS7LkE0P.js";const S={class:"container"},T={class:"page-title"},U={class:"list"},F={class:"item"},O={class:"publish-time"},q=["datetime"],z={class:"post-desc"},E={class:"item"},H=A({__name:"NewsList",props:{categoryId:{},currPage:{}},async setup(t){let l,p;const g=y(()=>t.categoryId===1?"新聞最速報":t.categoryId===2?"電臺公告":""),I=y(()=>t.categoryId===1?"/news/page/[page]":t.categoryId===2?"/notify/page/[page]":""),x=y(()=>`newList-${t.categoryId}-${t.currPage}`),{data:c}=([l,p]=C(async()=>B(x.value,async()=>{const a=await $fetch.raw("/api/news/index",{params:{categoryId:t.categoryId,page:t.currPage}}),s=a.headers.get("x-page"),n=s?JSON.parse(s):{current:1,last:1,total_item_count:1};return{list:a._data,page:n}},{getCachedData(a,s){const n=s.payload.data[a]||s.static.data[a];if(n&&!(Date.now()-n._ts>5e3))return n},transform(a){return{...a,_ts:Date.now()}}})),l=await l,p(),l);return D({bodyAttrs:{class:"news"}}),L({title:g.value+" | 講客廣播電臺",ogTitle:g.value+" | 講客廣播電臺"}),(a,s)=>{const n=P,_=b,N=$;return o(),d("div",S,[i("div",T,[i("h1",null,m(r(g)),1),t.categoryId===1?(o(),u(n,{key:0,to:"/notify"},{default:f(()=>[...s[0]||(s[0]=[V("電臺公告",-1)])]),_:1})):h("",!0)]),i("div",U,[r(c)?.list?(o(!0),d(w,{key:0},k(r(c)?.list,e=>(o(),d("div",F,[v(n,{itemscope:"",itemtype:"https://schema.org/NewsArticle",to:`/news/view/categoryId/${t.categoryId}/id/${e.id}`},{default:f(()=>[!e.image||e.image==="https://api-static-backend.hakkaradio.org.tw"?(o(),u(_,{key:0,img:"/default-news.jpg",title:e.title,ratio:.75,titleAlign:"left",usePublicImg:""},null,8,["title"])):(o(),u(_,{key:1,img:`/utils/image?url=${e.image}&width=800&ratio=4:3`,title:e.title,ratio:.75,titleAlign:"left"},null,8,["img","title"])),i("div",O,[i("time",{datetime:e.created_at},m(e.created_at),9,q)]),i("div",z,m(e.brief),1)]),_:2},1032,["to"])]))),256)):(o(),d(w,{key:1},k(16,e=>i("div",E,[v(_,{loading:!0,ratio:.75,titleAlign:"left"})])),64))]),r(c)?.page&&r(c)?.page.last>1?(o(),u(N,{key:0,linkUrl:r(I),currPage:t.currPage,"total-items":r(c)?.page.total_item_count,"items-per-page":16},null,8,["linkUrl","currPage","total-items"])):h("",!0)])}}}),Q=Object.assign(j(H,[["__scopeId","data-v-4f31876b"]]),{__name:"NewsList"});export{Q as _};

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.