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
14 KiB
2 lines
14 KiB
10 months ago
|
import{_ as Re,a as Ve}from"./post-item.vue_vue_type_style_index_0_lang-Dfn2xguO.js";import{_ as je}from"./post-skeleton-YfJeD-2o.js";import{_ as Ee}from"./whisper-DFhobfFF.js";import{_ as Ge}from"./main-nav.vue_vue_type_style_index_0_lang-DmAlkpQJ.js";import{d as Je,H as i,S as Qe,c as Ze,b as Ke,E as Xe,f as u,k as o,w as c,q as g,Z as m,r as Ye,e as t,j as w,x as A,bk as r,A as B,y as me,F,u as T,h as fe}from"./@vue-CQsYufSu.js";import{u as ea}from"./vuex-DNAxYlmG.js";import{b as aa,u as ta}from"./vue-router-zwGLnBy5.js";import{M as sa,L as la,e as H,h as na,u as pe,f as he,N as oa,_ as ua}from"./index-v3l9hw1O.js";import{W as ia}from"./whisper-add-friend-CuQaAOYJ.js";import{p as ce}from"./count-BK58UQ2M.js";import{W as ra}from"./v3-infinite-loading-DK6TzcZc.js";import{k as ca,a as va,r as _a,G as ge,s as da,t as ma,J as fa,R as pa}from"./@vicons-C3A8jsfr.js";import{F as ha,G as ga,a as wa,j as we,o as ka,M as ya,e as ba,P as Pa,f as Oa,g as Fa,k as Ta,J as Ia,H as Aa}from"./naive-ui-DNcWoFGl.js";import"./content-BMjusBPS.js";import"./paopao-video-player-DAi68TC5.js";import"./copy-to-clipboard-CA7crPat.js";import"./@babel-Cpj98o6Y.js";import"./toggle-selection-BHUZwh74.js";import"./vooks-BQzJqMzq.js";import"./evtd-CI_DDEu_.js";import"./axios-Bo0ATomq.js";import"./moment-BqTRGcJI.js";/* empty css */import"./seemly-B7f2tHrf.js";import"./vueuc-CbQ6ZCvR.js";import"./@css-render-CQdyXCYJ.js";import"./vdirs-DL8EOfHr.js";import"./@juggle-C8OzoCMD.js";import"./css-render-Ct37b3-v.js";import"./@emotion-WldOFDRm.js";import"./lodash-es-i05dkx59.js";import"./treemate-HRdUPn5m.js";import"./async-validator-DKvM95Vc.js";import"./date-fns-x7VUUoCw.js";const xa={key:0,class:"profile-baseinfo"},$a={class:"avatar"},qa={class:"base-info"},za={class:"username"},Sa={class:"userinfo"},Ma={class:"info-item"},Ua={class:"info-item"},Ca={class:"userinfo"},Wa={class:"info-item"},La={class:"info-item"},Na={class:"info-item"},Da={key:0,class:"user-opts"},Ba={key:0,class:"skeleton-wrap"},Ha={key:1},Ra={key:0,class:"empty-wrap"},Va={key:1},ja={key:0},Ea={key:1},Ga={key:2},Ja={key:3},Qa={key:4},Za={key:2},Ka={key:0},Xa={key:1},Ya={key:2},et={key:3},at={key:4},tt={class:"load-more-wrap"},st={class:"load-more-spinner"},lt=Je({__name:"User",setup(nt){const R=ha(),v=ea(),$=aa(),ke=ta(),f=i(!1),y=i(!1),a=Qe({id:0,avatar:"",username:"",nickname:"",is_admin:!1,is_friend:!0,is_following:!1,created_on:0,follows:0,followings:0,tweets_count:0,status:1}),p=i(!1),V=i(!1),G=i(!1),l=i([]),q=i([]),z=i([]),S=i([]),M=i([]),U=i([]),x=i($.query.s||""),n=i(+$.query.p||1),h=i("post"),J=i(+$.query.p||1),Q=i(1),Z=i(1),K=i(1),X=i(1),k=i(20),d=i(0),Y=i(0),ee=i(0),ae=i(0),te=i(0),se=i(0),b=e=>{a.id=e.id,a.username=e.username,a.nickname=e.nickname,a.avatar=e.avatar,V.value=!0},P=e=>{R.success({title:"提示",content:"确定"+(e.user.is_following?"取消关注 @":"关注 @")+e.user.username+" 吗?",positiveText:"确定",negativeText:"取消",onPositiveClick:()=>{e.user.is_following?pe({user_id:e.user.id}).then(_=>{window.$message.success("操作成功"),ve(e.user_id,!1)}).catch(_=>{}):he({user_id:e.user.id}).then(_=>{window.$message.success("关注成功"),ve(e.user_id,!0)}).catch(_=>{})}})};function ve(e,_){C(q,e,_),C(z,e,_),C(S,e,_),C(M,e,_),C(U,e,_)}function C(e,_,ie){if(e.value&&e.value.length>0)for(let E in e.value)e.value[E].user_id==_&&(e.value[E].user.is_following=ie)}const ye=()=>{y.value=!1,l.value=[],q.value=[],z.value=[],S.value=[],M.value=[],U.value=[],h.value="post",n.value=1,J.value=1,Q.value=1,Z.value=1,K.value=1,X.value=1,d.value=0,Y.value=0,ee.value=0,ae.value=0,te.value=0,se.value=0},be=()=>{switch(h.value){case"post":j();break;case"comment":le();break;case"highlight":ne();break;case"media":oe();break;case"star":ue();break}},j=()=>{f.value=!0,H({username:x.value,style:"post",page:n.value,page_size:k.value}).then(e=>{f.value=!1,e.list.length===0&&(y.value=!0),n.value>1?l.value=l.value.concat(e.list):(l.value=e.list||[],window.scrollTo(0,0)),d.value=Math.ceil(e.pager.total_rows/k.value),q.value=l.value,Y.value=d.value}).catch(e=>{l.value=[],n.va
|