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
1 year ago
|
import{_ as X}from"./whisper-5534d7cd.js";import{d as N,c as O,r as ee,e as i,f,k as n,w as a,j as r,y as oe,A as S,x as g,q as $,Y as F,bf as w,h as U,H as _,b as ne,F as C,u as te}from"./@vue-a481fc63.js";import{K as se,u as ae,f as le,_ as D,Y as ce,Z as ie}from"./index-5d57cf15.js";import{k as ue,r as _e,s as re,t as pe}from"./@vicons-f0266f88.js";import{F as me,j as B,o as de,M as fe,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-eecf2ec3.js";import{_ as Pe}from"./post-skeleton-65699bcb.js";import{_ as Te}from"./main-nav.vue_vue_type_style_index_0_lang-107d9fcb.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"},Se={class:"username-wrap"},Ue={class:"user-info"},Ce={class:"info-item"},Be={class:"info-item"},Ne={class:"item-header-extra"},Oe=N({__name:"follow-item",props:{contact:{}},emits:["send-whisper"],setup(x,{emit:d}){const o=x,u=me(),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?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)})}})},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(re)}):e.push({label:"关注 @"+o.contact.username,key:"follow",icon:t(pe)}),e}),m=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 p=de,v=ee("router-link"),k=fe,P=ve,y=ge,T=we;return i(),f("div",Ie,[n(T,{"content-indented":""},{avatar:a(()=>[n(p,{size:54,src:e.contact.avatar},null,8,["src"])]),header:a(()=>[r("span",Me,[n(v,{onClick:l[0]||(l[0]=oe(()=>{},["stop"])),class:"username-link",to:{name:"user",query:{s:e.contact.username}}},{default:a(()=>[S(g(e.contact.nickname),1)]),_:1},8,["to"])]),r("span",Se," @"+g(e.contact.username),1),e.contact.is_following?(i(),$(k,{key:0,class:"top-tag",type:"success",size:"small",round:""},{default:a(()=>[S(" 已关注 ")]),_:1})):F("",!0),r("div",Ue,[r("span",Ce," UID. "+g(e.contact.user_id),1),r("span",Be,g(w(se)(e.contact.created_on))+" 加入 ",1)])]),"header-extra":a(()=>[r("div",Ne,[n(y,{placement:"bottom-end",trigger:"click",size:"small",options:h.value,onSelect:m},{default:a(()=>[n(P,{quaternary:"",circle:""},{icon:a(()=>[n(w(B),null,{default:a(()=>[n(w(ue))]),_:1})]),_:1})]),_:1},8,["options"])])]),_:1})])}}});const De=D(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"},Re=N({__name:"Following",setup(x){const d=xe(),o=_(!1),u=_(!1),t=_([]),z=d.query.n||"粉丝详情",h=d.query.s||"",m=_(d.query.t||"follows"),e=_(+d.query.p||1),l=_(20),p=_(0),v=_(!1),k=_({id:0,avatar:"",username:"",nickname:"",is_admin:!1,is_friend:!0,is_following:!1,created_on:0,follows:0,followings:0,status:1});function P(c
|