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.
paopao-ce/web/dist/assets/Profile-c50ec64e.js

2 lines
3.9 KiB

import{_ as A,a as E}from"./post-item.vue_vue_type_style_index_0_lang-2a15a53c.js";import{_ as G}from"./post-skeleton-852fbfbe.js";import{_ as H}from"./main-nav.vue_vue_type_style_index_0_lang-9bd717cc.js";import{u as L}from"./vuex-473b3783.js";import{b as O}from"./vue-router-b8e3382f.js";import{A as Q,B as J,_ as K}from"./index-4ee34f7b.js";import{d as W,r as l,j as X,w as Y,c as n,V as a,_,Q as w,a1 as f,O as P,o as t,a as i,M as b,F as x,a4 as z}from"./@vue-e0e89260.js";import{F as Z,G as ee,o as te,f as ae,g as oe,I as se,H as ne}from"./naive-ui-62663ad7.js";import"./content-9a833cfa.js";import"./@vicons-d502290a.js";import"./paopao-video-player-aa5e8b3f.js";import"./formatTime-cdf4e6f1.js";import"./moment-2ab8298d.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";const le={class:"profile-baseinfo"},re={class:"avatar"},_e={class:"base-info"},ie={class:"username"},pe={class:"uid"},ue={key:0,class:"skeleton-wrap"},ce={key:1},me={key:0,class:"empty-wrap"},de={key:1},ve={key:2},fe={key:1,class:"pagination-wrap"},ge=W({__name:"Profile",setup(he){const o=L(),p=O(),r=l(!1),u=l([]),c=l("post"),I=l(+p.query.p||1),q=l(1),s=l(+p.query.p||1),m=l(20),v=l(0),g=()=>{c.value=="post"?h():(c.value="star")&&y()},h=()=>{r.value=!0,Q({username:o.state.userInfo.username,page:s.value,page_size:m.value}).then(e=>{r.value=!1,u.value=e.list,v.value=Math.ceil(e.pager.total_rows/m.value),window.scrollTo(0,0)}).catch(e=>{r.value=!1})},y=()=>{r.value=!0,J({page:s.value,page_size:m.value}).then(e=>{r.value=!1,u.value=e.list,v.value=Math.ceil(e.pager.total_rows/m.value),window.scrollTo(0,0)}).catch(e=>{r.value=!1})},B=e=>{c.value=e,e=="post"?(s.value=I.value,h()):e=="star"&&(s.value=q.value,y())},M=e=>{s.value=e,c.value=="post"?(I.value=e,h()):c.value=="star"&&(q.value=s.value,y())};return X(()=>{g()}),Y(()=>({path:p.path,query:p.query,refresh:o.state.refresh}),(e,k)=>{if(e.refresh!==k.refresh){s.value=+p.query.p||1,setTimeout(()=>{g()},0);return}k.path!=="/post"&&e.path==="/profile"&&(s.value=+p.query.p||1,setTimeout(()=>{g()},0))}),(e,k)=>{const U=H,V=te,S=ae,$=oe,C=G,F=se,N=A,T=ne,D=E,R=Z,j=ee;return t(),n("div",null,[a(U,{title:"主页"}),_(o).state.userInfo.id>0?(t(),w(R,{key:0,class:"main-content-wrap profile-wrap",bordered:""},{default:f(()=>[i("div",le,[i("div",re,[a(V,{size:"large",src:_(o).state.userInfo.avatar},null,8,["src"])]),i("div",_e,[i("div",ie,[i("strong",null,b(_(o).state.userInfo.nickname),1),i("span",null," @"+b(_(o).state.userInfo.username),1)]),i("div",pe,"UID. "+b(_(o).state.userInfo.id),1)])]),a($,{class:"profile-tabs-wrap",type:"line",animated:"","onUpdate:value":B},{default:f(()=>[a(S,{name:"post",tab:"泡泡"}),a(S,{name:"star",tab:"点赞"})]),_:1}),r.value?(t(),n("div",ue,[a(C,{num:m.value},null,8,["num"])])):(t(),n("div",ce,[u.value.length===0?(t(),n("div",me,[a(F,{size:"large",description:"暂无数据"})])):P("",!0),_(o).state.desktopModelShow?(t(),n("div",de,[(t(!0),n(x,null,z(u.value,d=>(t(),w(T,{key:d.id},{default:f(()=>[a(N,{post:d},null,8,["post"])]),_:2},1024))),128))])):(t(),n("div",ve,[(t(!0),n(x,null,z(u.value,d=>(t(),w(T,{key:d.id},{default:f(()=>[a(D,{post:d},null,8,["post"])]),_:2},1024))),128))]))]))]),_:1})):P("",!0),v.value>0?(t(),n("div",fe,[a(j,{page:s.value,"onUpdate:page":M,"page-slot":_(o).state.collapsedRight?5:8,"page-count":v.value},null,8,["page","page-slot","page-count"])])):P("",!0)])}}});const Ke=K(ge,[["__scopeId","data-v-d6cf5ae7"]]);export{Ke as default};