collection.fd032475.js 2.3 KB

1
  1. import{f as g,j as x,g as h,o as a,c as o,k as e,H as y,I as v,a as s,b as p,m as k,n as C,t as d,w as b,d as E,a3 as w,E as $,au as j}from"./entry.ae0eac90.js";import{u as z}from"./asyncData.829e4700.js";import{e as B,c as N}from"./news.fce18aa1.js";import{e as V,E as A}from"./empty_news.faa886a7.js";import{E as D}from"./index.63ebd469.js";import{E as I}from"./index.ebd8fabd.js";import"./index.8380a700.js";import"./index.37a58183.js";import"./isUndefined.aa0326a0.js";import"./isEqual.8f1b966f.js";import"./_getTag.e4404448.js";import"./debounce.439230eb.js";import"./throttle.5e282cd6.js";const M={class:"px-[30px] py-5 user-info min-h-full flex flex-col"},P=s("div",{class:"border-b border-br pb-5"},[s("span",{class:"text-2xl font-medium"},"我的收藏")],-1),S={key:0},q=["onClick"],F={class:"border-b border-br py-4 flex items-center"},H={class:"flex-1"},L={class:"text-lg font-medium line-clamp-1"},O={class:"text-tx-regular line-clamp-2 mt-4"},T={class:"mt-5 text-tx-secondary flex justify-between"},U={class:"py-4 flex justify-end"},G={key:1,class:"flex flex-1 justify-center items-center"},ne=g({__name:"collection",async setup(J){let i,m;const n=x({page_no:1,page_size:15}),{data:l,refresh:_}=([i,m]=h(()=>z(()=>B(n),{initialCache:!1},"$0MtqemkOuk")),i=await i,m(),i),u=async c=>{await N({id:c}),j.msgSuccess("已取消收藏"),_()};return(c,r)=>(a(),o("div",M,[P,e(l).lists.length?(a(),o("div",S,[(a(!0),o(y,null,v(e(l).lists,t=>(a(),o("div",{class:"cursor-pointer",key:t.id,onClick:f=>c.$router.push(`/information/detail/${t.article_id}`)},[s("div",F,[t.image?(a(),k(e(I),{key:0,class:"flex-none w-[180px] h-[135px] mr-4",src:t.image,fit:"cover"},null,8,["src"])):C("",!0),s("div",H,[s("div",L,d(t.title),1),s("div",O,d(t.desc),1),s("div",T,[s("div",null,"收藏于"+d(t.collect_time),1),p(e($),{link:"",onClick:w(f=>u(t.article_id),["stop"])},{default:b(()=>[E(" 取消收藏 ")]),_:2},1032,["onClick"])])])])],8,q))),128)),s("div",U,[p(e(D),{"current-page":e(n).page_no,"onUpdate:currentPage":r[0]||(r[0]=t=>e(n).page_no=t),total:e(l).count,"page-size":e(n).page_size,"hide-on-single-page":"",layout:"total, prev, pager, next, jumper",onCurrentChange:r[1]||(r[1]=t=>e(_)())},null,8,["current-page","total","page-size"])])])):(a(),o("div",G,[p(e(A),{image:e(V),description:"暂无收藏","image-size":250},null,8,["image"])]))]))}});export{ne as default};