import{d as t,b as e,r as a,e as s,Q as i,a9 as o,K as r,x as p,aa as n,J as _,o as l,h as u,w as d,i as m,a as c,m as y,z as f}from"./index-Cg3FU-dV.js";import{l as h}from"./loginPop.CPL0ODAr.js";import{d as g}from"./index.D_hliqYM.js";import{f as j}from"./forumList.BdeuQDme.js";import{a as v}from"./forum.BiZN6Umy.js";import{_ as x}from"./_plugin-vue_export-helper.BCo6x5W8.js";import"./uni-easyinput.Cm5bRP31.js";import"./uni-icons.D_sy4NxH.js";/* empty css                                                                  *//* empty css                                                                      */import"./uni-forms.DHQIQZAE.js";import"./uni-forms.vue_vue_type_style_index_0_scoped_a2a9907e_lang.DijPs27m.js";import"./uni-popup.B818XS1j.js";import"./uni-popup.vue_vue_type_style_index_0_scoped_90b62717_lang.D0ze9A39.js";import"./useVerifyCode.CrYQp_Od.js";import"./uni-nav-bar.BXgu2eq7.js";/* empty css                                                                    *//* empty css                                                              */import"./uni-row.DfI4R5V8.js";import"./uni-list.B5vvSfhy.js";import"./uni-badge.AEsViQRE.js";import"./index.Dozy1JgX.js";/* empty css                                                              */import"./share-bg.DLa-IrMH.js";const b=x(t({__name:"history",setup(t){const x=e(),b=a(null),w=s([{type:1,icon:"icon-sousuo",types:"icon"}]),D=s({barList:[],listData:[],where:{limit:10,name:"",page:1,sort:"recom"},newIsShowMax:3,hotData:[],defaultTitle:"",type:"",moreButton:!1});i((()=>{x.state.app.forumToken?I():b.value.inputDialogToggle()})),o((t=>{t.type&&(D.where.sort=t.type,D.type=t.type,D.defaultTitle="history"===t.type?"阅读记录":"我的收藏")}));const T=a(!1),k=()=>{I()},I=(t=!1)=>{v(D.where).then((e=>{D.hotData=e.data.hot,t&&(D.listData=[]),D.listData.push(...e.data.list);const a=Math.ceil(e.data.count/D.where.limit);T.value=!(D.listData.length<=0||D.where.page>=a),r()})).catch((t=>{p.error(t.message)}))};n((()=>{T.value&&(D.where.page++,I())})),_((()=>{D.where.page=1,T.value=!1,D.listData=[],I()}));const L=()=>{y(`/pages/forum/search?type=${D.type}`)};return(t,e)=>{const a=f;return l(),u(a,null,{default:d((()=>[m(a,{class:"cr-position-header"},{default:d((()=>[m(a,{class:"status_bar"}),m(c(g),{"default-title":c(D).defaultTitle,"is-right":!0,"right-data":c(w),onHandleNarItem:L},null,8,["default-title","right-data"])])),_:1}),m(a,{class:"content"},{default:d((()=>[m(c(j),{"list-data":c(D).listData,"hot-data":c(D).hotData,"empty-title":"暂无文章~"},null,8,["list-data","hot-data"])])),_:1}),m(c(h),{ref_key:"loginRef",ref:b,onLoginOk:k},null,512)])),_:1})}}}),[["__scopeId","data-v-08094265"]]);export{b as default};
