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