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
1 year ago
|
import{_ as De,a as He}from"./post-item.vue_vue_type_style_index_0_lang-c2092e3d.js";import{_ as Ne}from"./post-skeleton-8434d30b.js";import{_ as Ve}from"./whisper-9b4eeceb.js";import{_ as je}from"./main-nav.vue_vue_type_style_index_0_lang-93352cc4.js";import{d as Je,H as i,R as Re,c as Ee,b as Ge,E as Ke,r as Ye,f as u,k as n,w as r,q as g,Y as d,e as s,j as h,x,bf as c,A as D,y as ce,F,u as I,h as ve}from"./@vue-a481fc63.js";import{u as Qe}from"./vuex-44de225f.js";import{b as Xe}from"./vue-router-e5a2430e.js";import{K as Ze,J as ea,e as H,h as aa,u as _e,f as de,L as sa,_ as ta}from"./index-daff1b26.js";import{W as la}from"./whisper-add-friend-7ede77e9.js";import{W as oa}from"./v3-infinite-loading-2c58ec2f.js";import{k as na,r as ua,G as me,s as ia,t as ra,J as ca,K as va}from"./@vicons-c265fba6.js";import{F as _a,G as da,a as ma,j as fe,o as fa,M as pa,e as ga,P as ha,k as wa,f as ka,g as ya,J as ba,H as Pa}from"./naive-ui-defd0b2d.js";import"./content-64a02a2f.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";import"./moment-2ab8298d.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";const Oa={key:0,class:"profile-baseinfo"},Fa={class:"avatar"},Ia={class:"base-info"},Ta={class:"username"},Aa={class:"userinfo"},xa={class:"info-item"},$a={class:"info-item"},za={class:"userinfo"},Ua={class:"info-item"},Ca={class:"info-item"},qa={key:0,class:"user-opts"},Ma={key:0,class:"skeleton-wrap"},Sa={key:1},Wa={key:0,class:"empty-wrap"},La={key:1},Ba={key:0},Da={key:1},Ha={key:2},Na={key:3},Va={key:4},ja={key:2},Ja={key:0},Ra={key:1},Ea={key:2},Ga={key:3},Ka={key:4},Ya={class:"load-more-wrap"},Qa={class:"load-more-spinner"},Xa=Je({__name:"User",setup(Za){const N=_a(),_=Qe(),$=Xe(),ue="true".toLowerCase()==="true",m=i(!1),y=i(!1),a=Re({id:0,avatar:"",username:"",nickname:"",is_admin:!1,is_friend:!0,is_following:!1,created_on:0,follows:0,followings:0,status:1}),p=i(!1),V=i(!1),J=i(!1),l=i([]),z=i([]),U=i([]),C=i([]),q=i([]),M=i([]),T=i($.query.s||""),o=i(+$.query.p||1),f=i("post"),R=i(+$.query.p||1),E=i(1),G=i(1),K=i(1),Y=i(1),k=i(20),v=i(0),Q=i(0),X=i(0),Z=i(0),ee=i(0),ae=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=>{N.success({title:"提示",content:"确定"+(e.user.is_following?"取消关注":"关注")+"该用户吗?",positiveText:"确定",negativeText:"取消",onPositiveClick:()=>{e.user.is_following?_e({user_id:e.user.id}).then(w=>{window.$message.success("操作成功"),e.user.is_following=!1}).catch(w=>{}):de({user_id:e.user.id}).then(w=>{window.$message.success("关注成功"),e.user.is_following=!0}).catch(w=>{})}})},pe=()=>{y.value=!1,l.value=[],z.value=[],U.value=[],C.value=[],q.value=[],M.value=[],f.value="post",o.value=1,R.value=1,E.value=1,G.value=1,K.value=1,Y.value=1,v.value=0,Q.value=0,X.value=0,Z.value=0,ee.value=0,ae.value=0},ge=()=>{switch(f.value){case"post":j();break;case"comment":se();break;case"highlight":te();break;case"media":le();break;case"star":oe();break}},j=()=>{m.value=!0,H({username:T.value,style:"post",page:o.value,page_size:k.value}).then(e=>{m.value=!1,e.list.length===0&&(y.value=!0),o.value>1?l.value=l.value.concat(e.list):(l.value=e.list||[],window.scrollTo(0,0)),v.value=Math.ceil(e.pager.total_rows/k.value),z.value=l.value,Q.value=v.value}).catch(e=>{l.value=[],o.value>1&&o.value--,m.value=!1})},se=()=>{m.value=!0,H({username:T.value,style:"comment",page:o.value,page_size:k.value}).then(e=>{m.value=!1,e.list.length===0&&(y.value=!0),o.value>1?l.value=l.value.concat(e.list):(l.value=e.list||[],window.scrollTo(0,0)),v.value=Math.ceil(e
|