logistics_sy/public/pc/_nuxt/index.3275a6b6.js

2 lines
2.3 KiB
JavaScript

import{_ as E}from"./items.vue_vue_type_script_setup_true_lang.8121b615.js";import{a as v,bx as A,V as c,f as D,w as B,M as q,o as a,h as o,i as m,u as e,t as l,ai as C,p as F,H as b,b9 as z,j as _,by as V,c as j}from"./entry.834fe740.js";import{u as N}from"./asyncData.ac40d117.js";import{a as S,e as $}from"./empty_news.70229e1b.js";import{g as I}from"./news.50c5a1de.js";import{E as L}from"./index.ab08b437.js";import"./debounce.738623ac.js";import"./index.2ae5e8a1.js";import"./index.411bb0f8.js";import"./_getTag.02a17137.js";const U={class:"min-h-full flex flex-col"},H={class:"text-4xl mb-5"},M={key:0},P={key:1},R={key:0,class:"bg-white px-5 rounded overflow-hidden"},T={key:0,class:"pt-5 text-tx-secondary"},Y={class:"py-4 flex justify-end"},G={key:1,class:"flex-1 flex justify-center items-center"},re=v({__name:"index",async setup(J){let r,d;const s=A(),y=c(()=>s.params.source),g=c(()=>s.query.keywords||""),f=c(()=>s.query.cid||""),i=D({page_no:1,page_size:15,keyword:g,cid:f,sort:y}),{data:n,refresh:p,pending:h}=([r,d]=B(()=>N(()=>I(i),{initialCache:!1},"$ewxCUYuASd")),r=await r,d(),r),k=c(()=>{switch(s.params.source){case"hot":return"\u70ED\u95E8\u8D44\u8BAF";case"new":return" \u6700\u65B0\u8D44\u8BAF";default:return"\u5168\u90E8\u8D44\u8BAF"}});return q([()=>s.query.keywords,()=>s.query.cid],()=>{p()}),(K,u)=>{const w=E,x=V("loading");return a(),o("div",U,[m("div",H,[e(s).query.keywords?(a(),o("span",M,' \u67E5\u627E"'+l(e(s).query.keywords)+'" ',1)):(a(),o("span",P,l(e(s).query.name||e(k)),1))]),C((a(),o("div",null,[e(n).lists.length?(a(),o("div",R,[e(s).query.keywords?(a(),o("div",T," \u4E3A\u60A8\u627E\u5230\u76F8\u5173\u7ED3\u679C "+l(e(n).count)+"\u4E2A ",1)):F("",!0),(a(!0),o(b,null,z(e(n).lists,t=>(a(),j(w,{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",Y,[_(e(L),{"current-page":i.page_no,"onUpdate:current-page":u[0]||(u[0]=t=>i.page_no=t),total:e(n).count,"page-size":i.page_size,"hide-on-single-page":"",onCurrentChange:u[1]||(u[1]=t=>e(p)())},null,8,["current-page","total","page-size"])])])):(a(),o("div",G,[_(e(S),{image:e($),description:"\u6682\u65E0\u8D44\u8BAF","image-size":250},null,8,["image"])]))])),[[x,e(h)]])])}}});export{re as default};