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
7.3 KiB
2 lines
7.3 KiB
1 year ago
|
import{_ as ve,a as _e}from"./post-item.vue_vue_type_style_index_0_lang-18e150bb.js";import{_ as me}from"./post-skeleton-f095ca4e.js";import{_ as pe}from"./main-nav.vue_vue_type_style_index_0_lang-2c8a0605.js";import{d as fe,r as s,j as de,w as ge,a3 as he,c as f,V as i,_ as u,Q as k,a1 as p,O as y,o as r,a as c,M as d,e as C,a2 as A,F as J,a4 as K}from"./@vue-e0e89260.js";import{u as ke}from"./vuex-473b3783.js";import{b as we}from"./vue-router-b8e3382f.js";import{B as b,_ as ye}from"./index-26a2b065.js";import{b as be}from"./formatTime-4210fcd1.js";import{W as Pe}from"./v3-infinite-loading-e5c2e8bf.js";import{F as Ie,a as Te,o as Me,M as ze,f as qe,g as xe,H as Ce,k as $e,G as Le}from"./naive-ui-e703c4e6.js";import"./content-772a5dad.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 Be={class:"profile-baseinfo"},Se={class:"avatar"},Ve={class:"base-info"},Ne={class:"username"},De={class:"userinfo"},Fe={class:"info-item"},Ue={class:"info-item"},je={class:"userinfo"},He={class:"info-item"},Ee={class:"info-item"},Ge={key:0,class:"skeleton-wrap"},Oe={key:1},Qe={key:0,class:"empty-wrap"},Re={key:1},We={key:2},Ae={class:"load-more-wrap"},Je={class:"load-more-spinner"},Ke=fe({__name:"Profile",setup(Xe){const o=ke(),g=we(),n=s(!1),_=s(!1),t=s([]),$=s([]),L=s([]),B=s([]),S=s([]),V=s([]),P=s("post"),N=s(+g.query.p||1),D=s(1),F=s(1),U=s(1),j=s(1),a=s(+g.query.p||1),v=s(20),l=s(0),H=s(0),E=s(0),G=s(0),O=s(0),Q=s(0),I=()=>{switch(P.value){case"post":T();break;case"comment":M();break;case"highlight":z();break;case"media":q();break;case"star":x();break}},T=()=>{n.value=!0,b({username:o.state.userInfo.username,style:"post",page:a.value,page_size:v.value}).then(e=>{n.value=!1,e.list.length===0&&(_.value=!0),a.value>1?t.value=t.value.concat(e.list):(t.value=e.list||[],window.scrollTo(0,0)),l.value=Math.ceil(e.pager.total_rows/v.value),$.value=t.value,H.value=l.value}).catch(e=>{t.value=[],a.value>1&&a.value--,n.value=!1})},M=()=>{n.value=!0,b({username:o.state.userInfo.username,style:"comment",page:a.value,page_size:v.value}).then(e=>{n.value=!1,e.list.length===0&&(_.value=!0),a.value>1?t.value=t.value.concat(e.list):(t.value=e.list||[],window.scrollTo(0,0)),l.value=Math.ceil(e.pager.total_rows/v.value),L.value=t.value,E.value=l.value}).catch(e=>{t.value=[],a.value>1&&a.value--,n.value=!1})},z=()=>{n.value=!0,b({username:o.state.userInfo.username,style:"highlight",page:a.value,page_size:v.value}).then(e=>{n.value=!1,e.list.length===0&&(_.value=!0),a.value>1?t.value=t.value.concat(e.list):(t.value=e.list||[],window.scrollTo(0,0)),l.value=Math.ceil(e.pager.total_rows/v.value),B.value=t.value,G.value=l.value}).catch(e=>{t.value=[],a.value>1&&a.value--,n.value=!1})},q=()=>{n.value=!0,b({username:o.state.userInfo.username,style:"media",page:a.value,page_size:v.value}).then(e=>{n.value=!1,e.list.length===0&&(_.value=!0),a.value>1?t.value=t.value.concat(e.list):(t.value=e.list||[],window.scrollTo(0,0)),l.value=Math.ceil(e.pager.total_rows/v.value),S.value=t.value,O.value=l.value}).catch(e=>{t.value=[],a.value>1&&a.value--,n.value=!1})},x=()=>{n.value=!0,b({username:o.state.userInfo.username,style:"star",page:a.value,page_size:v.value}).then(e=>{n.value=!1,e.list.length===0&&(_.value=!0),a.value>1?t.value=t.value.concat(e.list):(t.value=e.list||[],window.scrollTo(0,0)),l.value=Math.ceil(e.pager.total_rows/v.value),V.value=t.value,Q.value=l.value}).catch(e=>{t.value=[],a.value>1&&a.value--,n.value=!1})},X=e=>{switch(P.value=e,P.value){case"post":t.value=$.value
|