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.7 KiB
2 lines
7.7 KiB
1 year ago
|
import{_ as de}from"./whisper-e367b750.js";import{_ as ge,a as he}from"./post-item.vue_vue_type_style_index_0_lang-8ad9a915.js";import{_ as we}from"./post-skeleton-0b64b001.js";import{_ as ke}from"./main-nav.vue_vue_type_style_index_0_lang-337bbac2.js";import{d as ye,H as s,b as be,E as Pe,r as Ie,f,k as u,bf as i,q as w,w as p,Y as y,e as r,j as c,x as d,A as $,y as Q,F as X,u as Z}from"./@vue-a481fc63.js";import{u as Te}from"./vuex-44de225f.js";import{b as Me}from"./vue-router-e5a2430e.js";import{e as b,_ as ze}from"./index-7e5e4aa5.js";import{b as qe}from"./formatTime-4210fcd1.js";import{W as xe}from"./v3-infinite-loading-2c58ec2f.js";import{F as Se,a as $e,o as Ce,M as Le,f as Be,g as Ne,I as Ve,k as De,G as Fe}from"./naive-ui-d8de3dda.js";import"./content-a00b5d58.js";import"./@vicons-1a3558c6.js";import"./paopao-video-player-2fe58954.js";import"./copy-to-clipboard-4ef7d3eb.js";import"./@babel-725317a4.js";import"./toggle-selection-93f4ad84.js";import"./vooks-6d99783e.js";import"./evtd-b614532e.js";import"./axios-4a70c6fc.js";/* empty css */import"./seemly-76b7b838.js";import"./vueuc-39372edb.js";import"./@css-render-7124a1a5.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 Ue={class:"profile-baseinfo"},We={class:"avatar"},je={class:"base-info"},Ee={class:"username"},He={class:"userinfo"},Re={class:"info-item"},Ae={class:"info-item"},Ge={class:"userinfo"},Ye={class:"info-item"},Je={class:"info-item"},Ke={key:0,class:"skeleton-wrap"},Oe={key:1},Qe={key:0,class:"empty-wrap"},Xe={key:1},Ze={key:2},ea={class:"load-more-wrap"},aa={class:"load-more-spinner"},ta=ye({__name:"Profile",setup(sa){const o=Te(),g=Me(),n=s(!1),_=s(!1),a=s([]),C=s([]),L=s([]),B=s([]),N=s([]),V=s([]),P=s("post"),D=s(+g.query.p||1),F=s(1),U=s(1),W=s(1),j=s(1),t=s(+g.query.p||1),v=s(20),l=s(0),E=s(0),H=s(0),R=s(0),A=s(0),G=s(0),I=s(!1),Y=s({id:0,avatar:"",username:"",nickname:"",is_admin:!1,is_friend:!0,is_following:!1,created_on:0,follows:0,followings:0,status:1}),J=e=>{Y.value=e,I.value=!0},ee=()=>{I.value=!1},T=()=>{switch(P.value){case"post":M();break;case"comment":z();break;case"highlight":q();break;case"media":x();break;case"star":S();break}},M=()=>{n.value=!0,b({username:o.state.userInfo.username,style:"post",page:t.value,page_size:v.value}).then(e=>{n.value=!1,e.list.length===0&&(_.value=!0),t.value>1?a.value=a.value.concat(e.list):(a.value=e.list||[],window.scrollTo(0,0)),l.value=Math.ceil(e.pager.total_rows/v.value),C.value=a.value,E.value=l.value}).catch(e=>{a.value=[],t.value>1&&t.value--,n.value=!1})},z=()=>{n.value=!0,b({username:o.state.userInfo.username,style:"comment",page:t.value,page_size:v.value}).then(e=>{n.value=!1,e.list.length===0&&(_.value=!0),t.value>1?a.value=a.value.concat(e.list):(a.value=e.list||[],window.scrollTo(0,0)),l.value=Math.ceil(e.pager.total_rows/v.value),L.value=a.value,H.value=l.value}).catch(e=>{a.value=[],t.value>1&&t.value--,n.value=!1})},q=()=>{n.value=!0,b({username:o.state.userInfo.username,style:"highlight",page:t.value,page_size:v.value}).then(e=>{n.value=!1,e.list.length===0&&(_.value=!0),t.value>1?a.value=a.value.concat(e.list):(a.value=e.list||[],window.scrollTo(0,0)),l.value=Math.ceil(e.pager.total_rows/v.value),B.value=a.value,R.value=l.value}).catch(e=>{a.value=[],t.value>1&&t.value--,n.value=!1})},x=()=>{n.value=!0,b({username:o.state.userInfo.username,style:"media",page:t.value,page_size:v.value}).then(e=>{n.value=!1,e.list.length===0&&(_.value=!0),t.value>1?a.value=a.value.concat(e.list):(a.value=e.list||[],window.scrollTo(0,0)),l.value=Math.ceil(e.pager.total_rows/v.value),N.value=a.value,A.value=l.value}).catch(e=>{a.value=[],t.value>1&&t.value--,n.value=!1})},S=()=>{n.value=!0,b({username:o.state.userInfo.username,style:"star",page:t.value,page_size:v.value}).then(e=>{n.value=!1,e.list.length===0&&(_.value=!0),t.value>1?a.value=a.value
|