import{N as x,y as B,z as C,u as D,B as y,l as i,m as N,ap as R,Q as I,o,c as s,a as u,ak as p,a1 as r,a0 as V,X as v,Y as S,Z as T,a3 as F,aj as U}from"./index.2e2ba873.js";import{F as A,d as L}from"./FollowerItem.30741742.js";import{k as j,m as q}from"./App.4a38a252.js";import{H as z}from"./index.f1458219.js";import{_ as H}from"./plugin-vue_export-helper.21dcd24c.js";import"./MoreFeedback.7a64cae1.js";import"./style.488e5a30.js";/* empty css                    */import"./index.36d4c5c3.js";import"./ico_max_exit.795e9ef8.js";import"./btn_devtools.210a42a8.js";import"./index.53c6cc19.js";import"./modulepreload-polyfill.b7f2da20.js";import"./isUdf.1a76b9f4.js";import"./ico_pin.548219aa.js";/* empty css               */import"./theme-map.83df99de.js";const M={class:"app_follower i_page_wrapper"},Q={class:"app_follower--content i_page_content page_scroller"},W={class:"p_relative follow-content"},X={key:2,class:"total"},Y=F(" \u5168\u90E8\u5171"),Z=["textContent"],G=F("\u4E2A\u7C89\u4E1D "),J={key:3,class:"follower-list p_relative row gutter_lg"},K={key:4,class:"limit-tip"},O=x({__name:"Follower",setup(P){j(".app_follower--content");const{userInfo:c}=B(C()),k=D(),n=y(()=>parseInt(k.query.mid)),m=y(()=>n.value&&c.value.mid!==n.value),e=i("initiating"),l=i([]),t=i({ps:30,pn:1,re_version:0,total:0}),f=()=>{e.value="initiating",l.value=[],t.value={ps:30,pn:1,re_version:0,total:0},h().then(()=>{d.value&&g()})};N(f);const h=async()=>{try{const a=await L({...t.value,vmid:n.value||c.value.mid});l.value=l.value.concat(a.list||[]),t.value.re_version=a.re_version,t.value.total=a.total,e.value="loaded"}catch(a){console.error(a),e.value="error"}},g=()=>{!c.value.isLogin||m.value||t.value.total/t.value.ps<=t.value.pn||e.value==="loaded"&&(t.value.pn+=1,e.value="loading",h())},w=i(null),d=R(w);I(d,()=>{d.value&&e.value==="loaded"&&g()});const b=()=>{e.value!=="initiating"&&f()};return(a,$)=>(o(),s("div",M,[u("div",Q,[u("div",W,[e.value==="loaded"&&l.value.length===0?(o(),p(q,{key:0})):r("",!0),e.value==="error"?(o(),p(z,{key:1,onRefresh:b})):r("",!0),e.value==="loaded"&&t.value.total>0?(o(),s("div",X,[Y,u("span",{textContent:V(v(U)(t.value.total))},null,8,Z),G])):r("",!0),["loaded","loading"].includes(e.value)?(o(),s("div",J,[(o(!0),s(S,null,T(l.value,_=>(o(),p(A,{key:_.mid,item:_,oid:v(n),class:"col_6",onUpdate:E=>_.attribute=E},null,8,["item","oid","onUpdate"]))),128))])):r("",!0),v(m)&&t.value.total>30?(o(),s("div",K,"\u7CFB\u7EDF\u9650\u5236\uFF0C\u4E0D\u80FD\u67E5\u770B\u66F4\u591A\u5566~")):r("",!0),u("div",{ref_key:"bottomRef",ref:w,class:"bottom-load"},null,512)])])]))}});var he=H(O,[["__scopeId","data-v-3b87143d"]]);export{he as default};
