import{_ as a,r as e,a as l,z as t,b as o,c as u,l as s,w as d,T as n,U as r,i as c,g as m,h as p,e as i,d as v,k as _,F as f,j as g,t as y}from"./index-Cd7oqaqo.js";import{_ as h}from"./z-paging.Cu8jht51.js";import{n as k}from"./navBarSearch.DT8MzxFE.js";import{a as b}from"./api.rwMLhj-q.js";import{d as j}from"./dayjs.min.C73DX6gN.js";import{n as x}from"./navTo.DuPDTCnN.js";import"./headImg.D8PzAUux.js";import"./logo.Cf3Z9Qoj.js";const V=a({__name:"myCollect",setup(a){const V=e(null),w=e(null),z=e([]),C=e(0);e("");const W=e(""),B=e(!0),M=e("肝胆相照临床病例库"),U=e(0),Y=e(1),D=e("文章病例库"),I=e([{label:"收藏",value:0},{label:"浏览",value:1}]),N=e([{label:"文章病例库",value:1},{label:"视频病例库",value:2},{label:"病例交流",value:3}]);l({read_num:"",push_date:""}),t((a=>{a.keyWord&&(W.value=a.keyWord)}));const R=a=>{U.value=a,V.value.reload()},T=a=>{Y.value=a,D.value=N.value[a-1].label,V.value.reload()},$=a=>{W.value=a,V.value.reload()},F=(a,e)=>{const l={page:a,page_size:e};1==U.value?(async a=>{let e={keyword:W.value,type:Y.value};b.getMyRead({...e,...a}).then((a=>{V.value.complete(a.data.data.data),C.value=a.data.data.total})).catch((a=>{V.value.complete(!1)}))})(l):(a=>{let e={keyword:W.value,type:Y.value};b.getMyCollect({...e,...a}).then((a=>{V.value.complete(a.data.data.data),C.value=a.data.data.total})).catch((a=>{V.value.complete(!1)}))})(l)};return(a,e)=>{const l=o(u("up-dropdown-item"),n),t=o(u("up-dropdown"),r),b=c,C=o(u("up-icon"),m),Q=o(u("z-paging"),h);return p(),s(b,{class:"u-page"},{default:d((()=>[i(Q,{ref_key:"paging",ref:V,"inside-more":"","loading-more-no-more-text":"咱也是有底线的！","auto-show-back-to-top":!0,modelValue:z.value,"onUpdate:modelValue":e[3]||(e[3]=a=>z.value=a),onQuery:F},{top:d((()=>[i(k,{searchWord:W.value,navName:M.value,onChangeWord:$},null,8,["searchWord","navName"]),i(b,{class:"filterbox"},{default:d((()=>[i(t,{class:"u-dropdown",ref_key:"uDropdownRef",ref:w},{default:d((()=>[i(l,{modelValue:U.value,"onUpdate:modelValue":e[0]||(e[0]=a=>U.value=a),title:0==U.value?"收藏":"浏览",onChange:R,options:I.value},null,8,["modelValue","title","options"]),i(l,{modelValue:Y.value,"onUpdate:modelValue":e[1]||(e[1]=a=>Y.value=a),title:D.value,onChange:T,options:N.value},null,8,["modelValue","title","options"])])),_:1},512)])),_:1})])),default:d((()=>[(p(!0),v(f,null,_(z.value,((a,l)=>(p(),s(b,{class:"item",onClick:e[2]||(e[2]=a=>(a=>{console.log(11111),console.log(a);let e=B.value?"article":"video";x({url:`/pages/detail/detail?id=${a}&type=${e}`})})()),key:a.collect_id},{default:d((()=>[i(b,{class:"title ellipsis"},{default:d((()=>[g(y(a.data.title),1)])),_:2},1024),i(b,{class:"tagsbox"},{default:d((()=>[(p(!0),v(f,null,_(a.data.author,(a=>(p(),s(b,{class:"tag",key:a.author_id},{default:d((()=>[g(y(a.doctor_name),1)])),_:2},1024)))),128))])),_:2},1024),i(b,{class:"deal"},{default:d((()=>[i(b,{class:"left"},{default:d((()=>[i(b,{class:"eyebox"},{default:d((()=>[i(C,{name:"eye",color:"#6B7280",size:"28rpx"}),i(b,{class:"num"},{default:d((()=>[g(y(a.data.read_num),1)])),_:2},1024)])),_:2},1024),i(b,{class:"collect"},{default:d((()=>[i(C,{name:"heart",color:"#6B7280",size:"28rpx"}),i(b,{class:"num"},{default:d((()=>[g(y(a.data.collect_num),1)])),_:2},1024)])),_:2},1024)])),_:2},1024),i(b,{class:"time"},{default:d((()=>[i(C,{name:"clock",color:"#6B7280",size:"28rpx"}),i(b,{class:"num"},{default:d((()=>{return[g(y((e=a.data.push_date,j(e).format("YYYY-MM-DD"))),1)];var e})),_:2},1024)])),_:2},1024)])),_:2},1024)])),_:2},1024)))),128))])),_:1},8,["modelValue"])])),_:1})}}},[["__scopeId","data-v-4ce7a10e"]]);export{V as default};
