| 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 d,m as k,n as C,t as p,w as b,d as E,a3 as w,E as $,at as j}from"./entry.b59333b6.js";import{u as z}from"./asyncData.d7a7cbee.js";import{e as B,c as N}from"./news.fce18aa1.js";import{e as V,E as A}from"./empty_news.e7397436.js";import{E as D}from"./index.2c420cec.js";import{E as I}from"./index.e4447c16.js";import"./index.5347fc4e.js";import"./index.ee9c05cf.js";import"./isUndefined.00def29e.js";import"./debounce.335e3554.js";import"./throttle.71b6fe03.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"},oe=g({__name:"collection",async setup(J){let n,m;const i=x({page_no:1,page_size:15}),{data:l,refresh:_}=([n,m]=h(()=>z(()=>B(i),{initialCache:!1},"$0MtqemkOuk")),n=await n,m(),n),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,p(t.title),1),s("div",O,p(t.desc),1),s("div",T,[s("div",null,"收藏于"+p(t.collect_time),1),d(e($),{link:"",onClick:w(f=>u(t.article_id),["stop"])},{default:b(()=>[E(" 取消收藏 ")]),_:2},1032,["onClick"])])])])],8,q))),128)),s("div",U,[d(e(D),{"current-page":e(i).page_no,"onUpdate:currentPage":r[0]||(r[0]=t=>e(i).page_no=t),total:e(l).count,"page-size":e(i).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,[d(e(A),{image:e(V),description:"暂无收藏","image-size":250},null,8,["image"])]))]))}});export{oe as default};
|