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.2 KiB
2 lines
6.2 KiB
11 months ago
|
import{_ as Y}from"./whisper-kyuywE3Q.js";import{d as O,c as D,r as ee,e as r,f as v,k as n,w as l,y as oe,t as w,A as I,j as m,v as $,Z as F,bk as h,h as x,H as p,b as ne,F as B,x as te}from"./@vue-OWLFCSZf.js";import{L as se,u as ae,f as le,_ as V,Z as ce,$ as ie}from"./index-qG_8BN-j.js";import{k as ue,r as re,s as _e,t as pe}from"./@vicons-0TGbfQ8H.js";import{F as me,j as N,o as fe,M as de,e as ve,P as ge,O as we,G as he,a as ke,f as ye,g as be,J as $e,k as Fe,H as ze}from"./naive-ui-Xe90xWx_.js";import{_ as Pe}from"./post-skeleton-uQTNCebs.js";import{_ as Te}from"./main-nav.vue_vue_type_style_index_0_lang-qm71WtqL.js";import{W as Me}from"./v3-infinite-loading-vHB4M6bL.js";import{b as Se}from"./vue-router-KVMegFg5.js";import"./vuex-az5e4eav.js";import"./axios-kMxbiGYq.js";import"./moment-jIwEdMgI.js";/* empty css */import"./seemly-hKSMrbh9.js";import"./vueuc-9lIKNc7l.js";import"./evtd-9ZCiDXyn.js";import"./@css-render-NyXtGlUD.js";import"./vooks-m9NwUyK6.js";import"./vdirs-gz97tqc5.js";import"./@juggle--NVrOerG.js";import"./css-render-Adblu2bf.js";import"./@emotion-vV6BesBt.js";import"./lodash-es-KEIJqYRD.js";import"./treemate-hmrDCADh.js";import"./async-validator-BHjhHa7C.js";import"./date-fns-E8ESfRGG.js";const Ue={class:"follow-item"},qe={class:"nickname-wrap"},Ce={class:"username-wrap"},Ie={class:"user-info"},xe={class:"info-item"},Be={class:"info-item"},Ne={class:"item-header-extra"},Oe=O({__name:"follow-item",props:{contact:{}},emits:["send-whisper"],setup(U,{emit:d}){const i=me(),_=d,t=e=>()=>x(N,null,{default:()=>x(e)}),z=()=>{i.success({title:"提示",content:"确定"+(o.contact.is_following?"取消关注 @":"关注 @")+o.contact.username+" 吗?",positiveText:"确定",negativeText:"取消",onPositiveClick:()=>{o.contact.is_following?ae({user_id:o.contact.user_id}).then(e=>{window.$message.success("取消关注成功"),o.contact.is_following=!1}).catch(e=>{console.log(e)}):le({user_id:o.contact.user_id}).then(e=>{window.$message.success("关注成功"),o.contact.is_following=!0}).catch(e=>{console.log(e)})}})},o=U,f=D(()=>{let e=[{label:"私信 @"+o.contact.username,key:"whisper",icon:t(re)}];return o.contact.is_following?e.push({label:"取消关注 @"+o.contact.username,key:"unfollow",icon:t(_e)}):e.push({label:"关注 @"+o.contact.username,key:"follow",icon:t(pe)}),e}),s=e=>{switch(e){case"follow":case"unfollow":z();break;case"whisper":const c={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};_("send-whisper",c);break}};return(e,c)=>{const g=fe,k=ee("router-link"),P=de,y=ve,T=ge,M=we;return r(),v("div",Ue,[n(M,{"content-indented":""},{avatar:l(()=>[n(g,{size:54,src:e.contact.avatar},null,8,["src"])]),header:l(()=>[m("span",qe,[n(k,{onClick:c[0]||(c[0]=oe(()=>{},["stop"])),class:"username-link",to:{name:"user",query:{s:e.contact.username}}},{default:l(()=>[I(w(e.contact.nickname),1)]),_:1},8,["to"])]),m("span",Ce," @"+w(e.contact.username),1),e.contact.is_following?(r(),$(P,{key:0,class:"top-tag",type:"success",size:"small",round:""},{default:l(()=>[I(" 已关注 ")]),_:1})):F("",!0),m("div",Ie,[m("span",xe," UID. "+w(e.contact.user_id),1),m("span",Be,w(h(se)(e.contact.created_on))+" 加入 ",1)])]),"header-extra":l(()=>[m("div",Ne,[n(T,{placement:"bottom-end",trigger:"click",size:"small",options:f.value,onSelect:s},{default:l(()=>[n(y,{quaternary:"",circle:""},{icon:l(()=>[n(h(N),null,{default:l(()=>[n(h(ue))]),_:1})]),_:1})]),_:1},8,["options"])])]),_:1})])}}}),De=V(Oe,[["__scopeId","data-v-5dd79903"]]),Ve={key:0,class:"skeleton-wrap"},We={key:1},je={key:0,class:"empty-wrap"},He={class:"load-more-wrap"},Ae={class:"load-more-spinner"},Le=O({__name:"Following",setup(U){const d=Se(),i=p(!1),_=p(!1),t=p([]),z=d.query.n||"粉丝详情",o=d.query.s||"",f=p(d.query.t||"follows"),s=p(+d.query.p||1),e=p(20),c=p(0),g=p(!1),k=p({id:0,avatar:"",username:"",nickname:"",is_admin:!1,is_friend:!0,is_following:!1,created_on:0,follows:0,followings:0,status:1});function
|