mirror of https://github.com/rocboss/paopao-ce
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
2 lines
6.1 KiB
2 lines
6.1 KiB
1 year ago
|
import{_ as Y,a as Z}from"./post-item.vue_vue_type_style_index_0_lang-b7428404.js";import{_ as ee}from"./post-skeleton-2db17910.js";import{_ as ae}from"./main-nav.vue_vue_type_style_index_0_lang-da1d5a81.js";import{d as te,r as c,j as se,w as oe,a3 as ne,c as _,V as n,_ as o,Q as y,a1 as v,O as b,o as r,a as u,M as f,e as C,a2 as D,F,a4 as H}from"./@vue-e0e89260.js";import{u as le}from"./vuex-473b3783.js";import{b as re}from"./vue-router-b8e3382f.js";import{B as k,_ as ue}from"./index-d161f57c.js";import{b as ie}from"./formatTime-4210fcd1.js";import{F as ce,G as _e,o as pe,O as me,f as ve,g as de,I as fe,H as ge}from"./naive-ui-62663ad7.js";import"./content-555eec37.js";import"./@vicons-0524c43e.js";import"./paopao-video-player-aa5e8b3f.js";import"./copy-to-clipboard-1dd3075d.js";import"./toggle-selection-93f4ad84.js";import"./vooks-a50491fd.js";import"./evtd-b614532e.js";import"./axios-4a70c6fc.js";/* empty css */import"./seemly-76b7b838.js";import"./vueuc-59ca65c3.js";import"./@css-render-580d83ec.js";import"./vdirs-b0483831.js";import"./@juggle-41516555.js";import"./css-render-6a5c5852.js";import"./@emotion-8a8e73f6.js";import"./lodash-es-8412e618.js";import"./treemate-25c27bff.js";import"./async-validator-dee29e8b.js";import"./date-fns-975a2d8f.js";import"./moment-2ab8298d.js";const he={class:"profile-baseinfo"},ke={class:"avatar"},we={class:"base-info"},ye={class:"username"},be={class:"userinfo"},Ie={class:"info-item"},Pe={class:"info-item"},Me={class:"userinfo"},Te={class:"info-item"},ze={class:"info-item"},qe={key:0,class:"skeleton-wrap"},Ce={key:1},xe={key:0,class:"empty-wrap"},Be={key:1},Se={key:2},Ve={key:1,class:"pagination-wrap"},$e=te({__name:"Profile",setup(Ne){const a=le(),d=re(),s=c(!1),l=c([]),w=c("post"),x=c(+d.query.p||1),B=c(1),S=c(1),V=c(1),$=c(1),t=c(+d.query.p||1),i=c(20),p=c(0),I=()=>{switch(w.value){case"post":P();break;case"comment":M();break;case"highlight":T();break;case"media":z();break;case"star":q();break}},P=()=>{s.value=!0,k({username:a.state.userInfo.username,style:"post",page:t.value,page_size:i.value}).then(e=>{s.value=!1,l.value=e.list||[],p.value=Math.ceil(e.pager.total_rows/i.value),window.scrollTo(0,0)}).catch(e=>{l.value=[],s.value=!1})},M=()=>{s.value=!0,k({username:a.state.userInfo.username,style:"comment",page:t.value,page_size:i.value}).then(e=>{s.value=!1,l.value=e.list||[],p.value=Math.ceil(e.pager.total_rows/i.value),window.scrollTo(0,0)}).catch(e=>{l.value=[],s.value=!1})},T=()=>{s.value=!0,k({username:a.state.userInfo.username,style:"highlight",page:t.value,page_size:i.value}).then(e=>{s.value=!1,l.value=e.list||[],p.value=Math.ceil(e.pager.total_rows/i.value),window.scrollTo(0,0)}).catch(e=>{l.value=[],s.value=!1})},z=()=>{s.value=!0,k({username:a.state.userInfo.username,style:"media",page:t.value,page_size:i.value}).then(e=>{s.value=!1,l.value=e.list||[],p.value=Math.ceil(e.pager.total_rows/i.value),window.scrollTo(0,0)}).catch(e=>{l.value=[],s.value=!1})},q=()=>{s.value=!0,k({username:a.state.userInfo.username,style:"star",page:t.value,page_size:i.value}).then(e=>{s.value=!1,l.value=e.list||[],p.value=Math.ceil(e.pager.total_rows/i.value),window.scrollTo(0,0)}).catch(e=>{l.value=[],s.value=!1})},O=e=>{switch(w.value=e,w.value){case"post":t.value=x.value,P();break;case"comment":t.value=B.value,M();break;case"highlight":t.value=S.value,T();break;case"media":t.value=V.value,z();break;case"star":t.value=$.value,q();break}},R=e=>{switch(t.value=e,w.value){case"post":x.value=e,P();break;case"comment":B.value=t.value,M();break;case"highlight":S.value=t.value,T();break;case"media":V.value=t.value,z();break;case"star":$.value=t.value,q();break}};return se(()=>{I()}),oe(()=>({path:d.path,query:d.query,refresh:a.state.refresh}),(e,m)=>{if(e.refresh!==m.refresh){t.value=+d.query.p||1,setTimeout(()=>{I()},0);return}m.path!=="/post"&&e.path==="/profile"&&(t.value=+d.query.p||1,setTimeout(()=>{I()},0))}),(e,m)=>{const j=ae,E=pe,G=me,N=ne("router-link"),g=ve,L=de,Q=ee,A=fe,J=Y,U=ge,K=Z,W=ce,X=_e;return r(),_("div",null,[n(j,{title:"主页"}),o(a).state.userInfo.id>0?(r(
|