index.bad355e2.js 2.1 KB

1
  1. import{_ as x}from"./items.vue.6be8bafa.js";import{f as w,an 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 m,b as p,ao as j,m as D}from"./entry.b59333b6.js";import{u as I}from"./asyncData.d7a7cbee.js";import{e as L,E as N}from"./empty_news.e7397436.js";import{g as V}from"./news.fce18aa1.js";import{E as P}from"./index.2c420cec.js";import"./nuxt-link.6503c26c.js";import"./index.e4447c16.js";import"./throttle.71b6fe03.js";import"./debounce.335e3554.js";import"./index.5347fc4e.js";import"./index.ee9c05cf.js";import"./isUndefined.00def29e.js";const S={class:"min-h-full flex flex-col"},U=m("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"},re=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:u,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],()=>{u()}),(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)),m("div",R,[p(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(u)())},null,8,["current-page","total","page-size"])])])):(a(),o("div",W,[p(e(N),{image:e(L),description:"暂无资讯","image-size":250},null,8,["image"])]))])),[[k,e(y)]])])}}});export{re as default};