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
6.1 KiB
2 lines
6.1 KiB
1 year ago
|
import{_ as Q}from"./whisper-a090f673.js";import{d as N,c as O,r as X,e as c,f,k as n,w as a,j as _,y as ee,A as S,x as g,q as $,Y as F,bf as w,h as U,H as i,b as oe,F as C,u as ne}from"./@vue-a481fc63.js";import{K as te,u as se,f as ae,_ as D,Y as le,Z as ce}from"./index-e04968a0.js";import{k as ie,r as _e,s as ue,t as re}from"./@vicons-f0266f88.js";import{F as pe,j as B,o as me,M as de,e as fe,P as ve,O as ge,G as we,a as he,f as ke,g as ye,J as be,k as $e,H as Fe}from"./naive-ui-eecf2ec3.js";import{_ as ze}from"./post-skeleton-4a65c483.js";import{_ as Te}from"./main-nav.vue_vue_type_style_index_0_lang-8791d5c4.js";import{W as qe}from"./v3-infinite-loading-2c58ec2f.js";import{b as xe}from"./vue-router-e5a2430e.js";import"./vuex-44de225f.js";import"./axios-4a70c6fc.js";import"./moment-2ab8298d.js";/* empty css */import"./seemly-76b7b838.js";import"./vueuc-7c8d4b48.js";import"./evtd-b614532e.js";import"./@css-render-7124a1a5.js";import"./vooks-6d99783e.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 Ie={class:"follow-item"},Me={class:"nickname-wrap"},Pe={class:"username-wrap"},Se={class:"user-info"},Ue={class:"info-item"},Ce={class:"info-item"},Be={class:"item-header-extra"},Ne=N({__name:"follow-item",props:{contact:{}},emits:["send-whisper"],setup(I,{emit:d}){const o=I,u=pe(),t=e=>()=>U(B,null,{default:()=>U(e)}),z=()=>{u.success({title:"提示",content:"确定"+(o.contact.is_following?"取消关注 @":"关注 @")+o.contact.username+" 吗?",positiveText:"确定",negativeText:"取消",onPositiveClick:()=>{o.contact.is_following?se({user_id:o.contact.user_id}).then(e=>{window.$message.success("取消关注成功"),o.contact.is_following=!1}).catch(e=>{console.log(e)}):ae({user_id:o.contact.user_id}).then(e=>{window.$message.success("关注成功"),o.contact.is_following=!0}).catch(e=>{console.log(e)})}})},h=O(()=>{let e=[{label:"私信 @"+o.contact.username,key:"whisper",icon:t(_e)}];return o.contact.is_following?e.push({label:"取消关注 @"+o.contact.username,key:"unfollow",icon:t(ue)}):e.push({label:"关注 @"+o.contact.username,key:"follow",icon:t(re)}),e}),p=e=>{switch(e){case"follow":case"unfollow":z();break;case"whisper":const l={id:o.contact.user_id,avatar:o.contact.avatar,username:o.contact.username,nickname:o.contact.nickname,is_admin:!1,is_friend:!0,is_following:!1,created_on:0,follows:0,followings:0,status:1};d("send-whisper",l);break}};return(e,l)=>{const m=me,v=X("router-link"),k=de,y=fe,T=ve,q=ge;return c(),f("div",Ie,[n(q,{"content-indented":""},{avatar:a(()=>[n(m,{size:54,src:e.contact.avatar},null,8,["src"])]),header:a(()=>[_("span",Me,[n(v,{onClick:l[0]||(l[0]=ee(()=>{},["stop"])),class:"username-link",to:{name:"user",query:{s:e.contact.username}}},{default:a(()=>[S(g(e.contact.nickname),1)]),_:1},8,["to"])]),_("span",Pe," @"+g(e.contact.username),1),e.contact.is_following?(c(),$(k,{key:0,class:"top-tag",type:"success",size:"small",round:""},{default:a(()=>[S(" 已关注 ")]),_:1})):F("",!0),_("div",Se,[_("span",Ue," UID. "+g(e.contact.user_id),1),_("span",Ce,g(w(te)(e.contact.created_on))+" 加入 ",1)])]),"header-extra":a(()=>[_("div",Be,[n(T,{placement:"bottom-end",trigger:"click",size:"small",options:h.value,onSelect:p},{default:a(()=>[n(y,{quaternary:"",circle:""},{icon:a(()=>[n(w(B),null,{default:a(()=>[n(w(ie))]),_:1})]),_:1})]),_:1},8,["options"])])]),_:1})])}}});const Oe=D(Ne,[["__scopeId","data-v-5dd79903"]]),De={key:0,class:"skeleton-wrap"},Ve={key:1},We={key:0,class:"empty-wrap"},je={class:"load-more-wrap"},He={class:"load-more-spinner"},Ae=N({__name:"Following",setup(I){const d=xe(),o=i(!1),u=i(!1),t=i([]),z=d.query.n||"粉丝详情",h=d.query.s||"",p=i(d.query.t||"follows"),e=i(+d.query.p||1),l=i(20),m=i(0),v=i(!1),k=i({id:0,avatar:"",username:"",nickname:"",is_admin:!1,is_friend:!0,is_following:!1,created_on:0,follows:0,followings:0,status:1}),y=O(()=>p.valu
|