index.ee5b567f.js 2.2 KB

1
  1. import{_ as x}from"./items.vue.03ab277d.js";import{f as w,ao as v,y as l,j as C,g as E,W as q,o as a,c as o,$ as z,k as e,t as A,n as B,H as $,I as b,a as u,b as m,ap as j,m as D}from"./entry.32bca663.js";import{u as I}from"./asyncData.0d7e5235.js";import{e as L,E as N}from"./empty_news.8be6e79a.js";import{g as V}from"./news.fce18aa1.js";import{E as P}from"./index.a69264a1.js";import"./nuxt-link.c437d508.js";import"./index.1d8d6300.js";import"./throttle.3b0cf71e.js";import"./debounce.36839b66.js";import"./index.2edcba6e.js";import"./index.8b7e1442.js";import"./isUndefined.aa0326a0.js";import"./index.862a4486.js";import"./_getTag.1e4f6237.js";const S={class:"min-h-full flex flex-col"},U=u("div",{class:"text-4xl mb-5"},null,-1),F={key:0,class:"bg-white px-5 rounded overflow-hidden"},H={key:0,class:"pt-5 text-tx-secondary"},R={class:"py-4 flex justify-end"},W={key:1,class:"flex-1 flex justify-center items-center"},ne=w({__name:"index",async setup(Y){let r,d;const s=v(),_=l(()=>s.params.source),g=l(()=>s.query.keywords||""),f=l(()=>s.query.cid||""),i=C({page_no:1,page_size:15,keyword:g,cid:f,sort:_}),{data:n,refresh:p,pending:y}=([r,d]=E(()=>I(()=>V(i),{initialCache:!1},"$ewxCUYuASd")),r=await r,d(),r);return l(()=>{switch(s.params.source){case"hot":return"热门资讯";case"new":return" 最新资讯";default:return"全部资讯"}}),q([()=>s.query.keywords,()=>s.query.cid],()=>{p()}),(G,c)=>{const h=x,k=j;return a(),o("div",S,[U,z((a(),o("div",null,[e(n).lists.length?(a(),o("div",F,[e(s).query.keywords?(a(),o("div",H," 为您找到相关结果 "+A(e(n).count)+"个 ",1)):B("",!0),(a(!0),o($,null,b(e(n).lists,t=>(a(),D(h,{key:t.id,id:t.id,title:t.title,desc:t.desc,click:t.click,author:t.author,"create-time":t.create_time,image:t.image,"only-title":!1},null,8,["id","title","desc","click","author","create-time","image"]))),128)),u("div",R,[m(e(P),{"current-page":e(i).page_no,"onUpdate:currentPage":c[0]||(c[0]=t=>e(i).page_no=t),total:e(n).count,"page-size":e(i).page_size,"hide-on-single-page":"",onCurrentChange:c[1]||(c[1]=t=>e(p)())},null,8,["current-page","total","page-size"])])])):(a(),o("div",W,[m(e(N),{image:e(L),description:"暂无资讯","image-size":250},null,8,["image"])]))])),[[k,e(y)]])])}}});export{ne as default};