index.b84045e0.js 2.2 KB

1
  1. import{_ as x}from"./items.vue.34fedcf7.js";import{f as w,b7 as v,L as l,j as C,g as E,a4 as b,o as a,c as o,ak as q,k as e,t as z,n as A,Q as B,T as L,a as u,b as m,b8 as j,m as D}from"./entry.8331eecf.js";import{u as N}from"./asyncData.6a22a76b.js";import{e as V,E as $}from"./empty_news.9df6c217.js";import{g as I}from"./news.fce18aa1.js";import{E as P}from"./index.0fcb73c6.js";import"./nuxt-link.6b7adc2f.js";import"./index.ead0ffe4.js";import"./throttle.d0445b2c.js";import"./debounce.4ef702f5.js";import"./index.be0def2d.js";import"./index.899e9c0f.js";import"./isUndefined.aa0326a0.js";import"./index.680d27aa.js";import"./_getTag.d705fadb.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"},Q={key:0,class:"pt-5 text-tx-secondary"},R={class:"py-4 flex justify-end"},T={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(()=>N(()=>I(i),{initialCache:!1},"$ewxCUYuASd")),r=await r,d(),r);return l(()=>{switch(s.params.source){case"hot":return"热门资讯";case"new":return" 最新资讯";default:return"全部资讯"}}),b([()=>s.query.keywords,()=>s.query.cid],()=>{p()}),(G,c)=>{const h=x,k=j;return a(),o("div",S,[U,q((a(),o("div",null,[e(n).lists.length?(a(),o("div",F,[e(s).query.keywords?(a(),o("div",Q," 为您找到相关结果 "+z(e(n).count)+"个 ",1)):A("",!0),(a(!0),o(B,null,L(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",T,[m(e($),{image:e(V),description:"暂无资讯","image-size":250},null,8,["image"])]))])),[[k,e(y)]])])}}});export{ne as default};