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-WeUkftbp.js";import{l as h}from"./loginPop.CnlmOOmJ.js";import{d as g}from"./index.BcUDVLb2.js";import{f as j}from"./forumList.Cf2rusgi.js";import{a as v}from"./forum.BGXd3LTG.js";import{_ as x}from"./_plugin-vue_export-helper.BCo6x5W8.js";import"./uni-easyinput.D5FSIQIk.js";import"./uni-icons.B3nCnuXe.js";/* empty css                                                                  *//* empty css                                                                      */import"./uni-forms.CCONsUgM.js";import"./uni-forms.vue_vue_type_style_index_0_scoped_a2a9907e_lang.DijPs27m.js";import"./uni-popup.CI1Fmu1z.js";import"./uni-popup.vue_vue_type_style_index_0_scoped_90b62717_lang.BVw2wyB9.js";import"./useVerifyCode.Bm9sm4v1.js";import"./uni-nav-bar.cBITQXNK.js";/* empty css                                                                    *//* empty css                                                              */import"./uni-row.DLutFlIQ.js";import"./uni-list.D2b1m_I0.js";import"./uni-badge.CLrZv6EZ.js";import"./index.D8Jasx-l.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};
