collection.2c513ac4.js 2.3 KB

1
  1. import{f as g,j as x,g as h,o,c as a,k as e,Q as y,T as v,a as s,b as p,m as k,n as b,t as d,w as C,d as E,N as w,E as $,bb as j}from"./entry.72b914a2.js";import{u as z}from"./asyncData.6f204e21.js";import{e as B,c as N}from"./news.fce18aa1.js";import{e as V,E as A}from"./empty_news.fa1aff12.js";import{E as D}from"./index.c59587ab.js";import{E as M}from"./index.2bf8f145.js";import"./index.a3ab6c07.js";import"./index.f1072217.js";import"./isUndefined.aa0326a0.js";import"./index.6dfdb995.js";import"./_getTag.4e23783f.js";import"./debounce.e714b03d.js";import"./throttle.9e0d392e.js";const P={class:"px-[30px] py-5 user-info min-h-full flex flex-col"},S=s("div",{class:"border-b border-br pb-5"},[s("span",{class:"text-2xl font-medium"},"我的收藏")],-1),T={key:0},q=["onClick"],F={class:"border-b border-br py-4 flex items-center"},I={class:"flex-1"},L={class:"text-lg font-medium line-clamp-1"},O={class:"text-tx-regular line-clamp-2 mt-4"},Q={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(H){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)=>(o(),a("div",P,[S,e(l).lists.length?(o(),a("div",T,[(o(!0),a(y,null,v(e(l).lists,t=>(o(),a("div",{class:"cursor-pointer",key:t.id,onClick:f=>c.$router.push(`/information/detail/${t.article_id}`)},[s("div",F,[t.image?(o(),k(e(M),{key:0,class:"flex-none w-[180px] h-[135px] mr-4",src:t.image,fit:"cover"},null,8,["src"])):b("",!0),s("div",I,[s("div",L,d(t.title),1),s("div",O,d(t.desc),1),s("div",Q,[s("div",null,"收藏于"+d(t.collect_time),1),p(e($),{link:"",onClick:w(f=>u(t.article_id),["stop"])},{default:C(()=>[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"])])])):(o(),a("div",G,[p(e(A),{image:e(V),description:"暂无收藏","image-size":250},null,8,["image"])]))]))}});export{ne as default};