diff --git a/internal/core/messages.go b/internal/core/messages.go index 519e4e49..09314204 100644 --- a/internal/core/messages.go +++ b/internal/core/messages.go @@ -14,6 +14,6 @@ type MessageService interface { GetUnreadCount(userID int64) (int64, error) GetMessageByID(id int64) (*ms.Message, error) ReadMessage(message *ms.Message) error - GetMessages(conditions *ms.ConditionsT, offset, limit int) ([]*ms.MessageFormated, error) - GetMessageCount(conditions *ms.ConditionsT) (int64, error) + GetMessages(userId int64, offset, limit int) ([]*ms.MessageFormated, error) + GetMessageCount(userId int64) (int64, error) } diff --git a/internal/dao/jinzhu/dbr/message.go b/internal/dao/jinzhu/dbr/message.go index 6c952bae..cac72cbf 100644 --- a/internal/dao/jinzhu/dbr/message.go +++ b/internal/dao/jinzhu/dbr/message.go @@ -38,6 +38,7 @@ type MessageFormated struct { SenderUserID int64 `json:"sender_user_id"` SenderUser *UserFormated `json:"sender_user"` ReceiverUserID int64 `json:"receiver_user_id"` + ReceiverUser *UserFormated `json:"receiver_user,omitempty"` Type MessageT `json:"type"` Brief string `json:"brief"` Content string `json:"content"` @@ -61,6 +62,7 @@ func (m *Message) Format() *MessageFormated { SenderUserID: m.SenderUserID, SenderUser: &UserFormated{}, ReceiverUserID: m.ReceiverUserID, + ReceiverUser: &UserFormated{}, Type: m.Type, Brief: m.Brief, Content: m.Content, @@ -114,39 +116,20 @@ func (m *Message) FetchBy(db *gorm.DB, predicates Predicates) ([]*Message, error return messages, nil } -func (c *Message) List(db *gorm.DB, conditions *ConditionsT, offset, limit int) ([]*Message, error) { - var messages []*Message - var err error +func (c *Message) List(db *gorm.DB, userId int64, offset, limit int) (res []*Message, err error) { if offset >= 0 && limit > 0 { db = db.Offset(offset).Limit(limit) } - - for k, v := range *conditions { - if k == "ORDER" { - db = db.Order(v) - } else { - db = db.Where(k, v) - } - } - - if err = db.Where("is_del = ?", 0).Find(&messages).Error; err != nil { - return nil, err - } - - return messages, nil + err = db.Where("receiver_user_id=? OR (sender_user_id=? AND type=4)", userId, userId).Order("id DESC").Find(&res).Error + return } -func (m *Message) Count(db *gorm.DB, conditions *ConditionsT) (int64, error) { - var count int64 - - for k, v := range *conditions { - if k != "ORDER" { - db = db.Where(k, v) - } - } - if err := db.Model(m).Count(&count).Error; err != nil { - return 0, err - } +func (m *Message) Count(db *gorm.DB, userId int64) (res int64, err error) { + err = db.Model(m).Where("receiver_user_id=? OR (sender_user_id=? AND type=4)", userId, userId).Count(&res).Error + return +} - return count, nil +func (m *Message) CountUnread(db *gorm.DB, userId int64) (res int64, err error) { + err = db.Model(m).Where("receiver_user_id=? AND is_read=0", userId).Count(&res).Error + return } diff --git a/internal/dao/jinzhu/messages.go b/internal/dao/jinzhu/messages.go index 00df949f..2fe8df07 100644 --- a/internal/dao/jinzhu/messages.go +++ b/internal/dao/jinzhu/messages.go @@ -30,10 +30,7 @@ func (s *messageSrv) CreateMessage(msg *ms.Message) (*ms.Message, error) { } func (s *messageSrv) GetUnreadCount(userID int64) (int64, error) { - return (&dbr.Message{}).Count(s.db, &dbr.ConditionsT{ - "receiver_user_id": userID, - "is_read": dbr.MsgStatusUnread, - }) + return (&dbr.Message{}).CountUnread(s.db, userID) } func (s *messageSrv) GetMessageByID(id int64) (*ms.Message, error) { @@ -49,21 +46,19 @@ func (s *messageSrv) ReadMessage(message *ms.Message) error { return message.Update(s.db) } -func (s *messageSrv) GetMessages(conditions *ms.ConditionsT, offset, limit int) ([]*ms.MessageFormated, error) { - messages, err := (&dbr.Message{}).List(s.db, conditions, offset, limit) +func (s *messageSrv) GetMessages(userId int64, offset, limit int) ([]*ms.MessageFormated, error) { + messages, err := (&dbr.Message{}).List(s.db, userId, offset, limit) if err != nil { return nil, err } - mfs := []*dbr.MessageFormated{} for _, message := range messages { mf := message.Format() mfs = append(mfs, mf) } - return mfs, nil } -func (s *messageSrv) GetMessageCount(conditions *ms.ConditionsT) (int64, error) { - return (&dbr.Message{}).Count(s.db, conditions) +func (s *messageSrv) GetMessageCount(userId int64) (int64, error) { + return (&dbr.Message{}).Count(s.db, userId) } diff --git a/internal/servants/web/core.go b/internal/servants/web/core.go index 19267198..074dce68 100644 --- a/internal/servants/web/core.go +++ b/internal/servants/web/core.go @@ -83,18 +83,19 @@ func (s *coreSrv) GetUserInfo(req *web.UserInfoReq) (*web.UserInfoResp, mir.Erro } func (s *coreSrv) GetMessages(req *web.GetMessagesReq) (*web.GetMessagesResp, mir.Error) { - conditions := &ms.ConditionsT{ - "receiver_user_id": req.UserId, - "ORDER": "id DESC", - } - messages, err := s.Ds.GetMessages(conditions, (req.Page-1)*req.PageSize, req.PageSize) + messages, err := s.Ds.GetMessages(req.UserId, (req.Page-1)*req.PageSize, req.PageSize) for _, mf := range messages { + // TODO: 优化处理这里的user获取逻辑以及错误处理 if mf.SenderUserID > 0 { - user, err := s.Ds.GetUserByID(mf.SenderUserID) - if err == nil { + if user, err := s.Ds.GetUserByID(mf.SenderUserID); err == nil { mf.SenderUser = user.Format() } } + if mf.Type == ms.MsgTypeWhisper && mf.ReceiverUserID != req.UserId { + if user, err := s.Ds.GetUserByID(mf.ReceiverUserID); err == nil { + mf.ReceiverUser = user.Format() + } + } // 好友申请消息不需要获取其他信息 if mf.Type == ms.MsgTypeRequestingFriend { continue @@ -122,7 +123,7 @@ func (s *coreSrv) GetMessages(req *web.GetMessagesReq) (*web.GetMessagesResp, mi logrus.Errorf("Ds.GetMessages err: %v\n", err) return nil, web.ErrGetMessagesFailed } - totalRows, _ := s.Ds.GetMessageCount(conditions) + totalRows, _ := s.Ds.GetMessageCount(req.UserId) resp := base.PageRespFrom(messages, req.Page, req.PageSize, totalRows) return (*web.GetMessagesResp)(resp), nil } diff --git a/web/dist/assets/404-cf8c84c4.js b/web/dist/assets/404-26f331db.js similarity index 79% rename from web/dist/assets/404-cf8c84c4.js rename to web/dist/assets/404-26f331db.js index 6d4fd313..5f82cb24 100644 --- a/web/dist/assets/404-cf8c84c4.js +++ b/web/dist/assets/404-26f331db.js @@ -1 +1 @@ -import{_ as s}from"./main-nav.vue_vue_type_style_index_0_lang-3b4e457a.js";import{u as a}from"./vue-router-e5a2430e.js";import{F as i,e as c,a2 as u}from"./naive-ui-d8de3dda.js";import{d as l,f as d,k as t,w as o,e as f,A as x}from"./@vue-a481fc63.js";import{_ as g}from"./index-7ab58e72.js";import"./vuex-44de225f.js";import"./vooks-6d99783e.js";import"./evtd-b614532e.js";import"./@vicons-33f992ab.js";import"./seemly-76b7b838.js";import"./vueuc-39372edb.js";import"./@css-render-7124a1a5.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";import"./axios-4a70c6fc.js";/* empty css */const v=l({__name:"404",setup(h){const e=a(),_=()=>{e.push({path:"/"})};return(k,w)=>{const n=s,p=c,r=u,m=i;return f(),d("div",null,[t(n,{title:"404"}),t(m,{class:"main-content-wrap wrap404",bordered:""},{default:o(()=>[t(r,{status:"404",title:"404 资源不存在",description:"再看看其他的吧"},{footer:o(()=>[t(p,{onClick:_},{default:o(()=>[x("回主页")]),_:1})]),_:1})]),_:1})])}}});const M=g(v,[["__scopeId","data-v-e62daa85"]]);export{M as default}; +import{_ as s}from"./main-nav.vue_vue_type_style_index_0_lang-048bd56b.js";import{u as a}from"./vue-router-e5a2430e.js";import{F as i,e as c,a2 as u}from"./naive-ui-d8de3dda.js";import{d as l,f as d,k as t,w as o,e as f,A as x}from"./@vue-a481fc63.js";import{_ as g}from"./index-757c547c.js";import"./vuex-44de225f.js";import"./vooks-6d99783e.js";import"./evtd-b614532e.js";import"./@vicons-1a3558c6.js";import"./seemly-76b7b838.js";import"./vueuc-39372edb.js";import"./@css-render-7124a1a5.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";import"./axios-4a70c6fc.js";/* empty css */const v=l({__name:"404",setup(h){const e=a(),_=()=>{e.push({path:"/"})};return(k,w)=>{const n=s,p=c,r=u,m=i;return f(),d("div",null,[t(n,{title:"404"}),t(m,{class:"main-content-wrap wrap404",bordered:""},{default:o(()=>[t(r,{status:"404",title:"404 资源不存在",description:"再看看其他的吧"},{footer:o(()=>[t(p,{onClick:_},{default:o(()=>[x("回主页")]),_:1})]),_:1})]),_:1})])}}});const M=g(v,[["__scopeId","data-v-e62daa85"]]);export{M as default}; diff --git a/web/dist/assets/@vicons-1a3558c6.js b/web/dist/assets/@vicons-1a3558c6.js new file mode 100644 index 00000000..cc9c65c1 --- /dev/null +++ b/web/dist/assets/@vicons-1a3558c6.js @@ -0,0 +1 @@ +import{d as n,e as o,f as e,j as t,z as i}from"./@vue-a481fc63.js";const c={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},h=t("path",{d:"M216.08 192v143.85a40.08 40.08 0 0 0 80.15 0l.13-188.55a67.94 67.94 0 1 0-135.87 0v189.82a95.51 95.51 0 1 0 191 0V159.74",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-miterlimit":"10","stroke-width":"32"},null,-1),d=[h],r1=n({name:"AttachOutline",render:function(s,l){return o(),e("svg",c,d)}}),a={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},w=t("circle",{fill:"none",stroke:"currentColor","stroke-miterlimit":"10","stroke-width":"32",cx:"256",cy:"56",r:"40"},null,-1),u=t("path",{fill:"none",stroke:"currentColor","stroke-miterlimit":"10","stroke-width":"32",d:"M199.3 295.62h0l-30.4 172.2a24 24 0 0 0 19.5 27.8a23.76 23.76 0 0 0 27.6-19.5l21-119.9v.2s5.2-32.5 17.5-32.5h3.1c12.5 0 17.5 32.5 17.5 32.5v-.1l21 119.9a23.92 23.92 0 1 0 47.1-8.4l-30.4-172.2l-4.9-29.7c-2.9-18.1-4.2-47.6.5-59.7c4-10.4 14.13-14.2 23.2-14.2H424a24 24 0 0 0 0-48H88a24 24 0 0 0 0 48h92.5c9.23 0 19.2 3.8 23.2 14.2c4.7 12.1 3.4 41.6.5 59.7z"},null,-1),_=[w,u],s1=n({name:"BodyOutline",render:function(s,l){return o(),e("svg",a,_)}}),k={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},p=t("path",{d:"M400 480a16 16 0 0 1-10.63-4L256 357.41L122.63 476A16 16 0 0 1 96 464V96a64.07 64.07 0 0 1 64-64h192a64.07 64.07 0 0 1 64 64v368a16 16 0 0 1-16 16z",fill:"currentColor"},null,-1),x=[p],l1=n({name:"Bookmark",render:function(s,l){return o(),e("svg",k,x)}}),m={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},g=t("path",{d:"M352 48H160a48 48 0 0 0-48 48v368l144-128l144 128V96a48 48 0 0 0-48-48z",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32"},null,-1),v=[g],i1=n({name:"BookmarkOutline",render:function(s,l){return o(),e("svg",m,v)}}),$={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},f=t("path",{d:"M128 80V64a48.14 48.14 0 0 1 48-48h224a48.14 48.14 0 0 1 48 48v368l-80-64",fill:"none",stroke:"currentColor","stroke-linejoin":"round","stroke-width":"32"},null,-1),C=t("path",{d:"M320 96H112a48.14 48.14 0 0 0-48 48v352l152-128l152 128V144a48.14 48.14 0 0 0-48-48z",fill:"none",stroke:"currentColor","stroke-linejoin":"round","stroke-width":"32"},null,-1),M=[f,C],c1=n({name:"BookmarksOutline",render:function(s,l){return o(),e("svg",$,M)}}),O={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},j=t("path",{d:"M408 64H104a56.16 56.16 0 0 0-56 56v192a56.16 56.16 0 0 0 56 56h40v80l93.72-78.14a8 8 0 0 1 5.13-1.86H408a56.16 56.16 0 0 0 56-56V120a56.16 56.16 0 0 0-56-56z",fill:"none",stroke:"currentColor","stroke-linejoin":"round","stroke-width":"32"},null,-1),z=[j],h1=n({name:"ChatboxOutline",render:function(s,l){return o(),e("svg",O,z)}}),B={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},L=t("path",{d:"M431 320.6c-1-3.6 1.2-8.6 3.3-12.2a33.68 33.68 0 0 1 2.1-3.1A162 162 0 0 0 464 215c.3-92.2-77.5-167-173.7-167c-83.9 0-153.9 57.1-170.3 132.9a160.7 160.7 0 0 0-3.7 34.2c0 92.3 74.8 169.1 171 169.1c15.3 0 35.9-4.6 47.2-7.7s22.5-7.2 25.4-8.3a26.44 26.44 0 0 1 9.3-1.7a26 26 0 0 1 10.1 2l56.7 20.1a13.52 13.52 0 0 0 3.9 1a8 8 0 0 0 8-8a12.85 12.85 0 0 0-.5-2.7z",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-miterlimit":"10","stroke-width":"32"},null,-1),H=t("path",{d:"M66.46 232a146.23 146.23 0 0 0 6.39 152.67c2.31 3.49 3.61 6.19 3.21 8s-11.93 61.87-11.93 61.87a8 8 0 0 0 2.71 7.68A8.17 8.17 0 0 0 72 464a7.26 7.26 0 0 0 2.91-.6l56.21-22a15.7 15.7 0 0 1 12 .2c18.94 7.38 39.88 12 60.83 12A159.21 159.21 0 0 0 284 432.11",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-miterlimit":"10","stroke-width":"32"},null,-1),V=[L,H],d1=n({name:"ChatbubblesOutline",render:function(s,l){return o(),e("svg",B,V)}}),A={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},y=t("path",{d:"M256 48C141.31 48 48 141.31 48 256s93.31 208 208 208s208-93.31 208-208S370.69 48 256 48zm108.25 138.29l-134.4 160a16 16 0 0 1-12 5.71h-.27a16 16 0 0 1-11.89-5.3l-57.6-64a16 16 0 1 1 23.78-21.4l45.29 50.32l122.59-145.91a16 16 0 0 1 24.5 20.58z",fill:"currentColor"},null,-1),b=[y],a1=n({name:"CheckmarkCircle",render:function(s,l){return o(),e("svg",A,b)}}),S={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},P=t("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32",d:"M464 128L240 384l-96-96"},null,-1),T=t("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32",d:"M144 384l-96-96"},null,-1),D=t("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32",d:"M368 128L232 284"},null,-1),E=[P,T,D],w1=n({name:"CheckmarkDoneOutline",render:function(s,l){return o(),e("svg",S,E)}}),R={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},F=t("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32",d:"M416 128L192 384l-96-96"},null,-1),q=[F],u1=n({name:"CheckmarkOutline",render:function(s,l){return o(),e("svg",R,q)}}),I={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},N=t("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32",d:"M368 368L144 144"},null,-1),U=t("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32",d:"M368 144L144 368"},null,-1),W=[N,U],_1=n({name:"CloseOutline",render:function(s,l){return o(),e("svg",I,W)}}),G={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},J=t("path",{d:"M320 336h76c55 0 100-21.21 100-75.6s-53-73.47-96-75.6C391.11 99.74 329 48 256 48c-69 0-113.44 45.79-128 91.2c-60 5.7-112 35.88-112 98.4S70 336 136 336h56",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32"},null,-1),K=t("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32",d:"M192 400.1l64 63.9l64-63.9"},null,-1),Q=t("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32",d:"M256 224v224.03"},null,-1),X=[J,K,Q],k1=n({name:"CloudDownloadOutline",render:function(s,l){return o(),e("svg",G,X)}}),Y={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},Z=t("path",{d:"M448 256c0-106-86-192-192-192S64 150 64 256s86 192 192 192s192-86 192-192z",fill:"none",stroke:"currentColor","stroke-miterlimit":"10","stroke-width":"32"},null,-1),tt=t("path",{d:"M350.67 150.93l-117.2 46.88a64 64 0 0 0-35.66 35.66l-46.88 117.2a8 8 0 0 0 10.4 10.4l117.2-46.88a64 64 0 0 0 35.66-35.66l46.88-117.2a8 8 0 0 0-10.4-10.4zM256 280a24 24 0 1 1 24-24a24 24 0 0 1-24 24z",fill:"currentColor"},null,-1),nt=[Z,tt],p1=n({name:"CompassOutline",render:function(s,l){return o(),e("svg",Y,nt)}}),ot={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},et=t("path",{d:"M448 341.37V170.61A32 32 0 0 0 432.11 143l-152-88.46a47.94 47.94 0 0 0-48.24 0L79.89 143A32 32 0 0 0 64 170.61v170.76A32 32 0 0 0 79.89 369l152 88.46a48 48 0 0 0 48.24 0l152-88.46A32 32 0 0 0 448 341.37z",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32"},null,-1),rt=t("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32",d:"M69 153.99l187 110l187-110"},null,-1),st=t("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32",d:"M256 463.99v-200"},null,-1),lt=[et,rt,st],x1=n({name:"CubeOutline",render:function(s,l){return o(),e("svg",ot,lt)}}),it={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},ct=i('',5),ht=[ct],m1=n({name:"EyeOffOutline",render:function(s,l){return o(),e("svg",it,ht)}}),dt={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},at=t("path",{d:"M255.66 112c-77.94 0-157.89 45.11-220.83 135.33a16 16 0 0 0-.27 17.77C82.92 340.8 161.8 400 255.66 400c92.84 0 173.34-59.38 221.79-135.25a16.14 16.14 0 0 0 0-17.47C428.89 172.28 347.8 112 255.66 112z",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32"},null,-1),wt=t("circle",{cx:"256",cy:"256",r:"80",fill:"none",stroke:"currentColor","stroke-miterlimit":"10","stroke-width":"32"},null,-1),ut=[at,wt],g1=n({name:"EyeOutline",render:function(s,l){return o(),e("svg",dt,ut)}}),_t={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},kt=t("path",{d:"M112 320c0-93 124-165 96-272c66 0 192 96 192 272a144 144 0 0 1-288 0z",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32"},null,-1),pt=t("path",{d:"M320 368c0 57.71-32 80-64 80s-64-22.29-64-80s40-86 32-128c42 0 96 70.29 96 128z",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32"},null,-1),xt=[kt,pt],v1=n({name:"FlameOutline",render:function(s,l){return o(),e("svg",_t,xt)}}),mt={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},gt=t("path",{d:"M256 448a32 32 0 0 1-18-5.57c-78.59-53.35-112.62-89.93-131.39-112.8c-40-48.75-59.15-98.8-58.61-153C48.63 114.52 98.46 64 159.08 64c44.08 0 74.61 24.83 92.39 45.51a6 6 0 0 0 9.06 0C278.31 88.81 308.84 64 352.92 64c60.62 0 110.45 50.52 111.08 112.64c.54 54.21-18.63 104.26-58.61 153c-18.77 22.87-52.8 59.45-131.39 112.8a32 32 0 0 1-18 5.56z",fill:"currentColor"},null,-1),vt=[gt],$1=n({name:"Heart",render:function(s,l){return o(),e("svg",mt,vt)}}),$t={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},ft=t("path",{d:"M352.92 80C288 80 256 144 256 144s-32-64-96.92-64c-52.76 0-94.54 44.14-95.08 96.81c-1.1 109.33 86.73 187.08 183 252.42a16 16 0 0 0 18 0c96.26-65.34 184.09-143.09 183-252.42c-.54-52.67-42.32-96.81-95.08-96.81z",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32"},null,-1),Ct=[ft],f1=n({name:"HeartOutline",render:function(s,l){return o(),e("svg",$t,Ct)}}),Mt={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},Ot=t("path",{d:"M80 212v236a16 16 0 0 0 16 16h96V328a24 24 0 0 1 24-24h80a24 24 0 0 1 24 24v136h96a16 16 0 0 0 16-16V212",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32"},null,-1),jt=t("path",{d:"M480 256L266.89 52c-5-5.28-16.69-5.34-21.78 0L32 256",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32"},null,-1),zt=t("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32",d:"M400 179V64h-48v69"},null,-1),Bt=[Ot,jt,zt],C1=n({name:"HomeOutline",render:function(s,l){return o(),e("svg",Mt,Bt)}}),Lt={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},Ht=t("rect",{x:"48",y:"80",width:"416",height:"352",rx:"48",ry:"48",fill:"none",stroke:"currentColor","stroke-linejoin":"round","stroke-width":"32"},null,-1),Vt=t("circle",{cx:"336",cy:"176",r:"32",fill:"none",stroke:"currentColor","stroke-miterlimit":"10","stroke-width":"32"},null,-1),At=t("path",{d:"M304 335.79l-90.66-90.49a32 32 0 0 0-43.87-1.3L48 352",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32"},null,-1),yt=t("path",{d:"M224 432l123.34-123.34a32 32 0 0 1 43.11-2L464 368",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32"},null,-1),bt=[Ht,Vt,At,yt],M1=n({name:"ImageOutline",render:function(s,l){return o(),e("svg",Lt,bt)}}),St={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},Pt=t("path",{d:"M321.89 171.42C233 114 141 155.22 56 65.22c-19.8-21-8.3 235.5 98.1 332.7c77.79 71 197.9 63.08 238.4-5.92s18.28-163.17-70.61-220.58z",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32"},null,-1),Tt=t("path",{d:"M173 253c86 81 175 129 292 147",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32"},null,-1),Dt=[Pt,Tt],O1=n({name:"LeafOutline",render:function(s,l){return o(),e("svg",St,Dt)}}),Et={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},Rt=t("path",{d:"M208 352h-64a96 96 0 0 1 0-192h64",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"36"},null,-1),Ft=t("path",{d:"M304 160h64a96 96 0 0 1 0 192h-64",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"36"},null,-1),qt=t("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"36",d:"M163.29 256h187.42"},null,-1),It=[Rt,Ft,qt],j1=n({name:"LinkOutline",render:function(s,l){return o(),e("svg",Et,It)}}),Nt={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},Ut=t("path",{d:"M336 208v-95a80 80 0 0 0-160 0v95",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32"},null,-1),Wt=t("rect",{x:"96",y:"208",width:"320",height:"272",rx:"48",ry:"48",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32"},null,-1),Gt=[Ut,Wt],z1=n({name:"LockClosedOutline",render:function(s,l){return o(),e("svg",Nt,Gt)}}),Jt={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},Kt=t("path",{d:"M336 112a80 80 0 0 0-160 0v96",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32"},null,-1),Qt=t("rect",{x:"96",y:"208",width:"320",height:"272",rx:"48",ry:"48",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32"},null,-1),Xt=[Kt,Qt],B1=n({name:"LockOpenOutline",render:function(s,l){return o(),e("svg",Jt,Xt)}}),Yt={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},Zt=t("path",{d:"M304 336v40a40 40 0 0 1-40 40H104a40 40 0 0 1-40-40V136a40 40 0 0 1 40-40h152c22.09 0 48 17.91 48 40v40",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32"},null,-1),tn=t("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32",d:"M368 336l80-80l-80-80"},null,-1),nn=t("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32",d:"M176 256h256"},null,-1),on=[Zt,tn,nn],L1=n({name:"LogOutOutline",render:function(s,l){return o(),e("svg",Yt,on)}}),en={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},rn=t("path",{d:"M102.41 32C62.38 32 32 64.12 32 103.78v304.45C32 447.86 64.38 480 104.41 480h303.2c40 0 72.39-32.14 72.39-71.77v-3.11c-1.35-.56-115.47-48.57-174.5-76.7c-39.82 48.57-91.18 78-144.5 78c-90.18 0-120.8-78.22-78.1-129.72c9.31-11.22 25.15-21.94 49.73-28c38.45-9.36 99.64 5.85 157 24.61a309.41 309.41 0 0 0 25.46-61.67H138.34V194h91.13v-31.83H119.09v-17.75h110.38V99s0-7.65 7.82-7.65h44.55v53H391v17.75H281.84V194h89.08a359.41 359.41 0 0 1-37.72 94.43c27 9.69 49.31 18.88 67.39 24.89c60.32 20 77.23 22.45 79.41 22.7V103.78C480 64.12 447.6 32 407.61 32h-305.2zM152 274.73q-5.81.06-11.67.63c-11.3 1.13-32.5 6.07-44.09 16.23c-34.74 30-13.94 84.93 56.37 84.93c40.87 0 81.71-25.9 113.79-67.37c-41.36-20-77-34.85-114.4-34.42z",fill:"currentColor"},null,-1),sn=[rn],H1=n({name:"LogoAlipay",render:function(s,l){return o(),e("svg",en,sn)}}),ln={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},cn=i('',6),hn=[cn],V1=n({name:"MegaphoneOutline",render:function(s,l){return o(),e("svg",ln,hn)}}),dn={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},an=t("path",{d:"M53.12 199.94l400-151.39a8 8 0 0 1 10.33 10.33l-151.39 400a8 8 0 0 1-15-.34l-67.4-166.09a16 16 0 0 0-10.11-10.11L53.46 215a8 8 0 0 1-.34-15.06z",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32"},null,-1),wn=t("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32",d:"M460 52L227 285"},null,-1),un=[an,wn],A1=n({name:"PaperPlaneOutline",render:function(s,l){return o(),e("svg",dn,un)}}),_n={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},kn=t("path",{d:"M402 168c-2.93 40.67-33.1 72-66 72s-63.12-31.32-66-72c-3-42.31 26.37-72 66-72s69 30.46 66 72z",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32"},null,-1),pn=t("path",{d:"M336 304c-65.17 0-127.84 32.37-143.54 95.41c-2.08 8.34 3.15 16.59 11.72 16.59h263.65c8.57 0 13.77-8.25 11.72-16.59C463.85 335.36 401.18 304 336 304z",fill:"none",stroke:"currentColor","stroke-miterlimit":"10","stroke-width":"32"},null,-1),xn=t("path",{d:"M200 185.94c-2.34 32.48-26.72 58.06-53 58.06s-50.7-25.57-53-58.06C91.61 152.15 115.34 128 147 128s55.39 24.77 53 57.94z",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32"},null,-1),mn=t("path",{d:"M206 306c-18.05-8.27-37.93-11.45-59-11.45c-52 0-102.1 25.85-114.65 76.2c-1.65 6.66 2.53 13.25 9.37 13.25H154",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-miterlimit":"10","stroke-width":"32"},null,-1),gn=[kn,pn,xn,mn],y1=n({name:"PeopleOutline",render:function(s,l){return o(),e("svg",_n,gn)}}),vn={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},$n=t("path",{d:"M376 144c-3.92 52.87-44 96-88 96s-84.15-43.12-88-96c-4-55 35-96 88-96s92 42 88 96z",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32"},null,-1),fn=t("path",{d:"M288 304c-87 0-175.3 48-191.64 138.6c-2 10.92 4.21 21.4 15.65 21.4H464c11.44 0 17.62-10.48 15.65-21.4C463.3 352 375 304 288 304z",fill:"none",stroke:"currentColor","stroke-miterlimit":"10","stroke-width":"32"},null,-1),Cn=t("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32",d:"M88 176v112"},null,-1),Mn=t("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32",d:"M144 232H32"},null,-1),On=[$n,fn,Cn,Mn],b1=n({name:"PersonAddOutline",render:function(s,l){return o(),e("svg",vn,On)}}),jn={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},zn=t("path",{d:"M344 144c-3.92 52.87-44 96-88 96s-84.15-43.12-88-96c-4-55 35-96 88-96s92 42 88 96z",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32"},null,-1),Bn=t("path",{d:"M256 304c-87 0-175.3 48-191.64 138.6C62.39 453.52 68.57 464 80 464h352c11.44 0 17.62-10.48 15.65-21.4C431.3 352 343 304 256 304z",fill:"none",stroke:"currentColor","stroke-miterlimit":"10","stroke-width":"32"},null,-1),Ln=[zn,Bn],S1=n({name:"PersonOutline",render:function(s,l){return o(),e("svg",jn,Ln)}}),Hn={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},Vn=t("path",{d:"M376 144c-3.92 52.87-44 96-88 96s-84.15-43.12-88-96c-4-55 35-96 88-96s92 42 88 96z",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32"},null,-1),An=t("path",{d:"M288 304c-87 0-175.3 48-191.64 138.6c-2 10.92 4.21 21.4 15.65 21.4H464c11.44 0 17.62-10.48 15.65-21.4C463.3 352 375 304 288 304z",fill:"none",stroke:"currentColor","stroke-miterlimit":"10","stroke-width":"32"},null,-1),yn=t("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32",d:"M144 232H32"},null,-1),bn=[Vn,An,yn],P1=n({name:"PersonRemoveOutline",render:function(s,l){return o(),e("svg",Hn,bn)}}),Sn={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},Pn=t("path",{d:"M336 336h40a40 40 0 0 0 40-40V88a40 40 0 0 0-40-40H136a40 40 0 0 0-40 40v208a40 40 0 0 0 40 40h40",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32"},null,-1),Tn=t("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32",d:"M176 240l80-80l80 80"},null,-1),Dn=t("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32",d:"M256 464V176"},null,-1),En=[Pn,Tn,Dn],T1=n({name:"PushOutline",render:function(s,l){return o(),e("svg",Sn,En)}}),Rn={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},Fn=t("path",{d:"M456.69 421.39L362.6 327.3a173.81 173.81 0 0 0 34.84-104.58C397.44 126.38 319.06 48 222.72 48S48 126.38 48 222.72s78.38 174.72 174.72 174.72A173.81 173.81 0 0 0 327.3 362.6l94.09 94.09a25 25 0 0 0 35.3-35.3zM97.92 222.72a124.8 124.8 0 1 1 124.8 124.8a124.95 124.95 0 0 1-124.8-124.8z",fill:"currentColor"},null,-1),qn=[Fn],D1=n({name:"Search",render:function(s,l){return o(),e("svg",Rn,qn)}}),In={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},Nn=t("path",{d:"M262.29 192.31a64 64 0 1 0 57.4 57.4a64.13 64.13 0 0 0-57.4-57.4zM416.39 256a154.34 154.34 0 0 1-1.53 20.79l45.21 35.46a10.81 10.81 0 0 1 2.45 13.75l-42.77 74a10.81 10.81 0 0 1-13.14 4.59l-44.9-18.08a16.11 16.11 0 0 0-15.17 1.75A164.48 164.48 0 0 1 325 400.8a15.94 15.94 0 0 0-8.82 12.14l-6.73 47.89a11.08 11.08 0 0 1-10.68 9.17h-85.54a11.11 11.11 0 0 1-10.69-8.87l-6.72-47.82a16.07 16.07 0 0 0-9-12.22a155.3 155.3 0 0 1-21.46-12.57a16 16 0 0 0-15.11-1.71l-44.89 18.07a10.81 10.81 0 0 1-13.14-4.58l-42.77-74a10.8 10.8 0 0 1 2.45-13.75l38.21-30a16.05 16.05 0 0 0 6-14.08c-.36-4.17-.58-8.33-.58-12.5s.21-8.27.58-12.35a16 16 0 0 0-6.07-13.94l-38.19-30A10.81 10.81 0 0 1 49.48 186l42.77-74a10.81 10.81 0 0 1 13.14-4.59l44.9 18.08a16.11 16.11 0 0 0 15.17-1.75A164.48 164.48 0 0 1 187 111.2a15.94 15.94 0 0 0 8.82-12.14l6.73-47.89A11.08 11.08 0 0 1 213.23 42h85.54a11.11 11.11 0 0 1 10.69 8.87l6.72 47.82a16.07 16.07 0 0 0 9 12.22a155.3 155.3 0 0 1 21.46 12.57a16 16 0 0 0 15.11 1.71l44.89-18.07a10.81 10.81 0 0 1 13.14 4.58l42.77 74a10.8 10.8 0 0 1-2.45 13.75l-38.21 30a16.05 16.05 0 0 0-6.05 14.08c.33 4.14.55 8.3.55 12.47z",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32"},null,-1),Un=[Nn],E1=n({name:"SettingsOutline",render:function(s,l){return o(),e("svg",In,Un)}}),Wn={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},Gn=t("path",{d:"M336 192h40a40 40 0 0 1 40 40v192a40 40 0 0 1-40 40H136a40 40 0 0 1-40-40V232a40 40 0 0 1 40-40h40",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32"},null,-1),Jn=t("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32",d:"M336 128l-80-80l-80 80"},null,-1),Kn=t("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32",d:"M256 321V48"},null,-1),Qn=[Gn,Jn,Kn],R1=n({name:"ShareOutline",render:function(s,l){return o(),e("svg",Wn,Qn)}}),Xn={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},Yn=i('',5),Zn=[Yn],F1=n({name:"ShareSocialOutline",render:function(s,l){return o(),e("svg",Xn,Zn)}}),to={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},no=i('',6),oo=[no],q1=n({name:"TrashOutline",render:function(s,l){return o(),e("svg",to,oo)}}),eo={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},ro=t("path",{d:"M374.79 308.78L457.5 367a16 16 0 0 0 22.5-14.62V159.62A16 16 0 0 0 457.5 145l-82.71 58.22A16 16 0 0 0 368 216.3v79.4a16 16 0 0 0 6.79 13.08z",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32"},null,-1),so=t("path",{d:"M268 384H84a52.15 52.15 0 0 1-52-52V180a52.15 52.15 0 0 1 52-52h184.48A51.68 51.68 0 0 1 320 179.52V332a52.15 52.15 0 0 1-52 52z",fill:"none",stroke:"currentColor","stroke-miterlimit":"10","stroke-width":"32"},null,-1),lo=[ro,so],I1=n({name:"VideocamOutline",render:function(s,l){return o(),e("svg",eo,lo)}}),io={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},co=i('',5),ho=[co],N1=n({name:"WalkOutline",render:function(s,l){return o(),e("svg",io,ho)}}),ao={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},wo=t("rect",{x:"48",y:"144",width:"416",height:"288",rx:"48",ry:"48",fill:"none",stroke:"currentColor","stroke-linejoin":"round","stroke-width":"32"},null,-1),uo=t("path",{d:"M411.36 144v-30A50 50 0 0 0 352 64.9L88.64 109.85A50 50 0 0 0 48 159v49",fill:"none",stroke:"currentColor","stroke-linejoin":"round","stroke-width":"32"},null,-1),_o=t("path",{d:"M368 320a32 32 0 1 1 32-32a32 32 0 0 1-32 32z",fill:"currentColor"},null,-1),ko=[wo,uo,_o],U1=n({name:"WalletOutline",render:function(s,l){return o(),e("svg",ao,ko)}}),po={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},xo=t("g",{fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[t("path",{d:"M9 7H6a2 2 0 0 0-2 2v9a2 2 0 0 0 2 2h9a2 2 0 0 0 2-2v-3"}),t("path",{d:"M9 15h3l8.5-8.5a1.5 1.5 0 0 0-3-3L9 12v3"}),t("path",{d:"M16 5l3 3"})],-1),mo=[xo],W1=n({name:"Edit",render:function(s,l){return o(),e("svg",po,mo)}}),go={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},vo=i('',1),$o=[vo],G1=n({name:"Hash",render:function(s,l){return o(),e("svg",go,$o)}}),fo={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},Co=i('',1),Mo=[Co],J1=n({name:"Trash",render:function(s,l){return o(),e("svg",fo,Mo)}}),Oo={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},jo=t("path",{d:"M14.71 6.71a.996.996 0 0 0-1.41 0L8.71 11.3a.996.996 0 0 0 0 1.41l4.59 4.59a.996.996 0 1 0 1.41-1.41L10.83 12l3.88-3.88c.39-.39.38-1.03 0-1.41z",fill:"currentColor"},null,-1),zo=[jo],K1=n({name:"ChevronLeftRound",render:function(s,l){return o(),e("svg",Oo,zo)}}),Bo={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},Lo=t("path",{d:"M9.37 5.51A7.35 7.35 0 0 0 9.1 7.5c0 4.08 3.32 7.4 7.4 7.4c.68 0 1.35-.09 1.99-.27A7.014 7.014 0 0 1 12 19c-3.86 0-7-3.14-7-7c0-2.93 1.81-5.45 4.37-6.49zM12 3a9 9 0 1 0 9 9c0-.46-.04-.92-.1-1.36a5.389 5.389 0 0 1-4.4 2.26a5.403 5.403 0 0 1-3.14-9.8c-.44-.06-.9-.1-1.36-.1z",fill:"currentColor"},null,-1),Ho=[Lo],Q1=n({name:"DarkModeOutlined",render:function(s,l){return o(),e("svg",Bo,Ho)}}),Vo={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},Ao=t("path",{d:"M2 17c0 .55.45 1 1 1h18c.55 0 1-.45 1-1s-.45-1-1-1H3c-.55 0-1 .45-1 1zm0-5c0 .55.45 1 1 1h18c.55 0 1-.45 1-1s-.45-1-1-1H3c-.55 0-1 .45-1 1zm0-5c0 .55.45 1 1 1h18c.55 0 1-.45 1-1s-.45-1-1-1H3c-.55 0-1 .45-1 1z",fill:"currentColor"},null,-1),yo=[Ao],X1=n({name:"DehazeRound",render:function(s,l){return o(),e("svg",Vo,yo)}}),bo={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},So=t("path",{d:"M12 9c1.65 0 3 1.35 3 3s-1.35 3-3 3s-3-1.35-3-3s1.35-3 3-3m0-2c-2.76 0-5 2.24-5 5s2.24 5 5 5s5-2.24 5-5s-2.24-5-5-5zM2 13h2c.55 0 1-.45 1-1s-.45-1-1-1H2c-.55 0-1 .45-1 1s.45 1 1 1zm18 0h2c.55 0 1-.45 1-1s-.45-1-1-1h-2c-.55 0-1 .45-1 1s.45 1 1 1zM11 2v2c0 .55.45 1 1 1s1-.45 1-1V2c0-.55-.45-1-1-1s-1 .45-1 1zm0 18v2c0 .55.45 1 1 1s1-.45 1-1v-2c0-.55-.45-1-1-1s-1 .45-1 1zM5.99 4.58a.996.996 0 0 0-1.41 0a.996.996 0 0 0 0 1.41l1.06 1.06c.39.39 1.03.39 1.41 0s.39-1.03 0-1.41L5.99 4.58zm12.37 12.37a.996.996 0 0 0-1.41 0a.996.996 0 0 0 0 1.41l1.06 1.06c.39.39 1.03.39 1.41 0a.996.996 0 0 0 0-1.41l-1.06-1.06zm1.06-10.96a.996.996 0 0 0 0-1.41a.996.996 0 0 0-1.41 0l-1.06 1.06c-.39.39-.39 1.03 0 1.41s1.03.39 1.41 0l1.06-1.06zM7.05 18.36a.996.996 0 0 0 0-1.41a.996.996 0 0 0-1.41 0l-1.06 1.06c-.39.39-.39 1.03 0 1.41s1.03.39 1.41 0l1.06-1.06z",fill:"currentColor"},null,-1),Po=[So],Y1=n({name:"LightModeOutlined",render:function(s,l){return o(),e("svg",bo,Po)}}),To={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},Do=t("path",{d:"M6 10c-1.1 0-2 .9-2 2s.9 2 2 2s2-.9 2-2s-.9-2-2-2zm12 0c-1.1 0-2 .9-2 2s.9 2 2 2s2-.9 2-2s-.9-2-2-2zm-6 0c-1.1 0-2 .9-2 2s.9 2 2 2s2-.9 2-2s-.9-2-2-2z",fill:"currentColor"},null,-1),Eo=[Do],Z1=n({name:"MoreHorizFilled",render:function(s,l){return o(),e("svg",To,Eo)}}),Ro={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},Fo=t("path",{d:"M12 8c1.1 0 2-.9 2-2s-.9-2-2-2s-2 .9-2 2s.9 2 2 2zm0 2c-1.1 0-2 .9-2 2s.9 2 2 2s2-.9 2-2s-.9-2-2-2zm0 6c-1.1 0-2 .9-2 2s.9 2 2 2s2-.9 2-2s-.9-2-2-2z",fill:"currentColor"},null,-1),qo=[Fo],te=n({name:"MoreVertOutlined",render:function(s,l){return o(),e("svg",Ro,qo)}}),Io={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},No=t("path",{d:"M15 3H6c-.83 0-1.54.5-1.84 1.22l-3.02 7.05c-.09.23-.14.47-.14.73v2c0 1.1.9 2 2 2h6.31l-.95 4.57l-.03.32c0 .41.17.79.44 1.06L9.83 23l6.59-6.59c.36-.36.58-.86.58-1.41V5c0-1.1-.9-2-2-2zm0 12l-4.34 4.34L12 14H3v-2l3-7h9v10zm4-12h4v12h-4z",fill:"currentColor"},null,-1),Uo=[No],ne=n({name:"ThumbDownOutlined",render:function(s,l){return o(),e("svg",Io,Uo)}}),Wo={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},Go=t("path",{opacity:".3",d:"M3 12v2h9l-1.34 5.34L15 15V5H6z",fill:"currentColor"},null,-1),Jo=t("path",{d:"M15 3H6c-.83 0-1.54.5-1.84 1.22l-3.02 7.05c-.09.23-.14.47-.14.73v2c0 1.1.9 2 2 2h6.31l-.95 4.57l-.03.32c0 .41.17.79.44 1.06L9.83 23l6.59-6.59c.36-.36.58-.86.58-1.41V5c0-1.1-.9-2-2-2zm0 12l-4.34 4.34L12 14H3v-2l3-7h9v10zm4-12h4v12h-4z",fill:"currentColor"},null,-1),Ko=[Go,Jo],oe=n({name:"ThumbDownTwotone",render:function(s,l){return o(),e("svg",Wo,Ko)}}),Qo={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},Xo=t("path",{d:"M9 21h9c.83 0 1.54-.5 1.84-1.22l3.02-7.05c.09-.23.14-.47.14-.73v-2c0-1.1-.9-2-2-2h-6.31l.95-4.57l.03-.32c0-.41-.17-.79-.44-1.06L14.17 1L7.58 7.59C7.22 7.95 7 8.45 7 9v10c0 1.1.9 2 2 2zM9 9l4.34-4.34L12 10h9v2l-3 7H9V9zM1 9h4v12H1z",fill:"currentColor"},null,-1),Yo=[Xo],ee=n({name:"ThumbUpOutlined",render:function(s,l){return o(),e("svg",Qo,Yo)}}),Zo={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},t1=t("path",{opacity:".3",d:"M21 12v-2h-9l1.34-5.34L9 9v10h9z",fill:"currentColor"},null,-1),n1=t("path",{d:"M9 21h9c.83 0 1.54-.5 1.84-1.22l3.02-7.05c.09-.23.14-.47.14-.73v-2c0-1.1-.9-2-2-2h-6.31l.95-4.57l.03-.32c0-.41-.17-.79-.44-1.06L14.17 1L7.58 7.59C7.22 7.95 7 8.45 7 9v10c0 1.1.9 2 2 2zM9 9l4.34-4.34L12 10h9v2l-3 7H9V9zM1 9h4v12H1z",fill:"currentColor"},null,-1),o1=[t1,n1],re=n({name:"ThumbUpTwotone",render:function(s,l){return o(),e("svg",Zo,o1)}});export{Y1 as $,r1 as A,c1 as B,d1 as C,P1 as D,g1 as E,v1 as F,b1 as G,C1 as H,M1 as I,a1 as J,R1 as K,O1 as L,V1 as M,u1 as N,_1 as O,y1 as P,w1 as Q,j1 as R,D1 as S,J1 as T,k1 as U,I1 as V,U1 as W,H1 as X,W1 as Y,X1 as Z,K1 as _,E1 as a,Q1 as a0,G1 as b,L1 as c,p1 as d,ee as e,re as f,ne as g,oe as h,Z1 as i,f1 as j,$1 as k,h1 as l,i1 as m,l1 as n,F1 as o,q1 as p,z1 as q,B1 as r,T1 as s,m1 as t,s1 as u,S1 as v,te as w,A1 as x,x1 as y,N1 as z}; diff --git a/web/dist/assets/@vicons-33f992ab.js b/web/dist/assets/@vicons-33f992ab.js deleted file mode 100644 index 239ab067..00000000 --- a/web/dist/assets/@vicons-33f992ab.js +++ /dev/null @@ -1 +0,0 @@ -import{d as o,e as n,f as e,j as t,z as i}from"./@vue-a481fc63.js";const c={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},h=t("path",{d:"M216.08 192v143.85a40.08 40.08 0 0 0 80.15 0l.13-188.55a67.94 67.94 0 1 0-135.87 0v189.82a95.51 95.51 0 1 0 191 0V159.74",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-miterlimit":"10","stroke-width":"32"},null,-1),d=[h],o1=o({name:"AttachOutline",render:function(s,l){return n(),e("svg",c,d)}}),a={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},w=t("circle",{fill:"none",stroke:"currentColor","stroke-miterlimit":"10","stroke-width":"32",cx:"256",cy:"56",r:"40"},null,-1),u=t("path",{fill:"none",stroke:"currentColor","stroke-miterlimit":"10","stroke-width":"32",d:"M199.3 295.62h0l-30.4 172.2a24 24 0 0 0 19.5 27.8a23.76 23.76 0 0 0 27.6-19.5l21-119.9v.2s5.2-32.5 17.5-32.5h3.1c12.5 0 17.5 32.5 17.5 32.5v-.1l21 119.9a23.92 23.92 0 1 0 47.1-8.4l-30.4-172.2l-4.9-29.7c-2.9-18.1-4.2-47.6.5-59.7c4-10.4 14.13-14.2 23.2-14.2H424a24 24 0 0 0 0-48H88a24 24 0 0 0 0 48h92.5c9.23 0 19.2 3.8 23.2 14.2c4.7 12.1 3.4 41.6.5 59.7z"},null,-1),_=[w,u],n1=o({name:"BodyOutline",render:function(s,l){return n(),e("svg",a,_)}}),k={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},p=t("path",{d:"M400 480a16 16 0 0 1-10.63-4L256 357.41L122.63 476A16 16 0 0 1 96 464V96a64.07 64.07 0 0 1 64-64h192a64.07 64.07 0 0 1 64 64v368a16 16 0 0 1-16 16z",fill:"currentColor"},null,-1),x=[p],e1=o({name:"Bookmark",render:function(s,l){return n(),e("svg",k,x)}}),m={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},g=t("path",{d:"M352 48H160a48 48 0 0 0-48 48v368l144-128l144 128V96a48 48 0 0 0-48-48z",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32"},null,-1),v=[g],r1=o({name:"BookmarkOutline",render:function(s,l){return n(),e("svg",m,v)}}),$={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},f=t("path",{d:"M128 80V64a48.14 48.14 0 0 1 48-48h224a48.14 48.14 0 0 1 48 48v368l-80-64",fill:"none",stroke:"currentColor","stroke-linejoin":"round","stroke-width":"32"},null,-1),C=t("path",{d:"M320 96H112a48.14 48.14 0 0 0-48 48v352l152-128l152 128V144a48.14 48.14 0 0 0-48-48z",fill:"none",stroke:"currentColor","stroke-linejoin":"round","stroke-width":"32"},null,-1),M=[f,C],s1=o({name:"BookmarksOutline",render:function(s,l){return n(),e("svg",$,M)}}),O={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},j=t("path",{d:"M408 64H104a56.16 56.16 0 0 0-56 56v192a56.16 56.16 0 0 0 56 56h40v80l93.72-78.14a8 8 0 0 1 5.13-1.86H408a56.16 56.16 0 0 0 56-56V120a56.16 56.16 0 0 0-56-56z",fill:"none",stroke:"currentColor","stroke-linejoin":"round","stroke-width":"32"},null,-1),z=[j],l1=o({name:"ChatboxOutline",render:function(s,l){return n(),e("svg",O,z)}}),B={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},L=t("path",{d:"M431 320.6c-1-3.6 1.2-8.6 3.3-12.2a33.68 33.68 0 0 1 2.1-3.1A162 162 0 0 0 464 215c.3-92.2-77.5-167-173.7-167c-83.9 0-153.9 57.1-170.3 132.9a160.7 160.7 0 0 0-3.7 34.2c0 92.3 74.8 169.1 171 169.1c15.3 0 35.9-4.6 47.2-7.7s22.5-7.2 25.4-8.3a26.44 26.44 0 0 1 9.3-1.7a26 26 0 0 1 10.1 2l56.7 20.1a13.52 13.52 0 0 0 3.9 1a8 8 0 0 0 8-8a12.85 12.85 0 0 0-.5-2.7z",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-miterlimit":"10","stroke-width":"32"},null,-1),H=t("path",{d:"M66.46 232a146.23 146.23 0 0 0 6.39 152.67c2.31 3.49 3.61 6.19 3.21 8s-11.93 61.87-11.93 61.87a8 8 0 0 0 2.71 7.68A8.17 8.17 0 0 0 72 464a7.26 7.26 0 0 0 2.91-.6l56.21-22a15.7 15.7 0 0 1 12 .2c18.94 7.38 39.88 12 60.83 12A159.21 159.21 0 0 0 284 432.11",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-miterlimit":"10","stroke-width":"32"},null,-1),V=[L,H],i1=o({name:"ChatbubblesOutline",render:function(s,l){return n(),e("svg",B,V)}}),A={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},y=t("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32",d:"M464 128L240 384l-96-96"},null,-1),b=t("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32",d:"M144 384l-96-96"},null,-1),P=t("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32",d:"M368 128L232 284"},null,-1),S=[y,b,P],c1=o({name:"CheckmarkDoneOutline",render:function(s,l){return n(),e("svg",A,S)}}),T={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},D=t("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32",d:"M416 128L192 384l-96-96"},null,-1),E=[D],h1=o({name:"CheckmarkOutline",render:function(s,l){return n(),e("svg",T,E)}}),R={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},F=t("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32",d:"M368 368L144 144"},null,-1),q=t("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32",d:"M368 144L144 368"},null,-1),I=[F,q],d1=o({name:"CloseOutline",render:function(s,l){return n(),e("svg",R,I)}}),N={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},U=t("path",{d:"M320 336h76c55 0 100-21.21 100-75.6s-53-73.47-96-75.6C391.11 99.74 329 48 256 48c-69 0-113.44 45.79-128 91.2c-60 5.7-112 35.88-112 98.4S70 336 136 336h56",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32"},null,-1),W=t("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32",d:"M192 400.1l64 63.9l64-63.9"},null,-1),G=t("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32",d:"M256 224v224.03"},null,-1),J=[U,W,G],a1=o({name:"CloudDownloadOutline",render:function(s,l){return n(),e("svg",N,J)}}),K={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},Q=t("path",{d:"M448 256c0-106-86-192-192-192S64 150 64 256s86 192 192 192s192-86 192-192z",fill:"none",stroke:"currentColor","stroke-miterlimit":"10","stroke-width":"32"},null,-1),X=t("path",{d:"M350.67 150.93l-117.2 46.88a64 64 0 0 0-35.66 35.66l-46.88 117.2a8 8 0 0 0 10.4 10.4l117.2-46.88a64 64 0 0 0 35.66-35.66l46.88-117.2a8 8 0 0 0-10.4-10.4zM256 280a24 24 0 1 1 24-24a24 24 0 0 1-24 24z",fill:"currentColor"},null,-1),Y=[Q,X],w1=o({name:"CompassOutline",render:function(s,l){return n(),e("svg",K,Y)}}),Z={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},tt=t("path",{d:"M448 341.37V170.61A32 32 0 0 0 432.11 143l-152-88.46a47.94 47.94 0 0 0-48.24 0L79.89 143A32 32 0 0 0 64 170.61v170.76A32 32 0 0 0 79.89 369l152 88.46a48 48 0 0 0 48.24 0l152-88.46A32 32 0 0 0 448 341.37z",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32"},null,-1),ot=t("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32",d:"M69 153.99l187 110l187-110"},null,-1),nt=t("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32",d:"M256 463.99v-200"},null,-1),et=[tt,ot,nt],u1=o({name:"CubeOutline",render:function(s,l){return n(),e("svg",Z,et)}}),rt={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},st=i('',5),lt=[st],_1=o({name:"EyeOffOutline",render:function(s,l){return n(),e("svg",rt,lt)}}),it={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},ct=t("path",{d:"M255.66 112c-77.94 0-157.89 45.11-220.83 135.33a16 16 0 0 0-.27 17.77C82.92 340.8 161.8 400 255.66 400c92.84 0 173.34-59.38 221.79-135.25a16.14 16.14 0 0 0 0-17.47C428.89 172.28 347.8 112 255.66 112z",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32"},null,-1),ht=t("circle",{cx:"256",cy:"256",r:"80",fill:"none",stroke:"currentColor","stroke-miterlimit":"10","stroke-width":"32"},null,-1),dt=[ct,ht],k1=o({name:"EyeOutline",render:function(s,l){return n(),e("svg",it,dt)}}),at={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},wt=t("path",{d:"M112 320c0-93 124-165 96-272c66 0 192 96 192 272a144 144 0 0 1-288 0z",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32"},null,-1),ut=t("path",{d:"M320 368c0 57.71-32 80-64 80s-64-22.29-64-80s40-86 32-128c42 0 96 70.29 96 128z",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32"},null,-1),_t=[wt,ut],p1=o({name:"FlameOutline",render:function(s,l){return n(),e("svg",at,_t)}}),kt={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},pt=t("path",{d:"M256 448a32 32 0 0 1-18-5.57c-78.59-53.35-112.62-89.93-131.39-112.8c-40-48.75-59.15-98.8-58.61-153C48.63 114.52 98.46 64 159.08 64c44.08 0 74.61 24.83 92.39 45.51a6 6 0 0 0 9.06 0C278.31 88.81 308.84 64 352.92 64c60.62 0 110.45 50.52 111.08 112.64c.54 54.21-18.63 104.26-58.61 153c-18.77 22.87-52.8 59.45-131.39 112.8a32 32 0 0 1-18 5.56z",fill:"currentColor"},null,-1),xt=[pt],x1=o({name:"Heart",render:function(s,l){return n(),e("svg",kt,xt)}}),mt={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},gt=t("path",{d:"M352.92 80C288 80 256 144 256 144s-32-64-96.92-64c-52.76 0-94.54 44.14-95.08 96.81c-1.1 109.33 86.73 187.08 183 252.42a16 16 0 0 0 18 0c96.26-65.34 184.09-143.09 183-252.42c-.54-52.67-42.32-96.81-95.08-96.81z",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32"},null,-1),vt=[gt],m1=o({name:"HeartOutline",render:function(s,l){return n(),e("svg",mt,vt)}}),$t={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},ft=t("path",{d:"M80 212v236a16 16 0 0 0 16 16h96V328a24 24 0 0 1 24-24h80a24 24 0 0 1 24 24v136h96a16 16 0 0 0 16-16V212",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32"},null,-1),Ct=t("path",{d:"M480 256L266.89 52c-5-5.28-16.69-5.34-21.78 0L32 256",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32"},null,-1),Mt=t("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32",d:"M400 179V64h-48v69"},null,-1),Ot=[ft,Ct,Mt],g1=o({name:"HomeOutline",render:function(s,l){return n(),e("svg",$t,Ot)}}),jt={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},zt=t("rect",{x:"48",y:"80",width:"416",height:"352",rx:"48",ry:"48",fill:"none",stroke:"currentColor","stroke-linejoin":"round","stroke-width":"32"},null,-1),Bt=t("circle",{cx:"336",cy:"176",r:"32",fill:"none",stroke:"currentColor","stroke-miterlimit":"10","stroke-width":"32"},null,-1),Lt=t("path",{d:"M304 335.79l-90.66-90.49a32 32 0 0 0-43.87-1.3L48 352",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32"},null,-1),Ht=t("path",{d:"M224 432l123.34-123.34a32 32 0 0 1 43.11-2L464 368",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32"},null,-1),Vt=[zt,Bt,Lt,Ht],v1=o({name:"ImageOutline",render:function(s,l){return n(),e("svg",jt,Vt)}}),At={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},yt=t("path",{d:"M321.89 171.42C233 114 141 155.22 56 65.22c-19.8-21-8.3 235.5 98.1 332.7c77.79 71 197.9 63.08 238.4-5.92s18.28-163.17-70.61-220.58z",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32"},null,-1),bt=t("path",{d:"M173 253c86 81 175 129 292 147",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32"},null,-1),Pt=[yt,bt],$1=o({name:"LeafOutline",render:function(s,l){return n(),e("svg",At,Pt)}}),St={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},Tt=t("path",{d:"M208 352h-64a96 96 0 0 1 0-192h64",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"36"},null,-1),Dt=t("path",{d:"M304 160h64a96 96 0 0 1 0 192h-64",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"36"},null,-1),Et=t("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"36",d:"M163.29 256h187.42"},null,-1),Rt=[Tt,Dt,Et],f1=o({name:"LinkOutline",render:function(s,l){return n(),e("svg",St,Rt)}}),Ft={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},qt=t("path",{d:"M336 208v-95a80 80 0 0 0-160 0v95",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32"},null,-1),It=t("rect",{x:"96",y:"208",width:"320",height:"272",rx:"48",ry:"48",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32"},null,-1),Nt=[qt,It],C1=o({name:"LockClosedOutline",render:function(s,l){return n(),e("svg",Ft,Nt)}}),Ut={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},Wt=t("path",{d:"M336 112a80 80 0 0 0-160 0v96",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32"},null,-1),Gt=t("rect",{x:"96",y:"208",width:"320",height:"272",rx:"48",ry:"48",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32"},null,-1),Jt=[Wt,Gt],M1=o({name:"LockOpenOutline",render:function(s,l){return n(),e("svg",Ut,Jt)}}),Kt={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},Qt=t("path",{d:"M304 336v40a40 40 0 0 1-40 40H104a40 40 0 0 1-40-40V136a40 40 0 0 1 40-40h152c22.09 0 48 17.91 48 40v40",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32"},null,-1),Xt=t("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32",d:"M368 336l80-80l-80-80"},null,-1),Yt=t("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32",d:"M176 256h256"},null,-1),Zt=[Qt,Xt,Yt],O1=o({name:"LogOutOutline",render:function(s,l){return n(),e("svg",Kt,Zt)}}),to={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},oo=t("path",{d:"M102.41 32C62.38 32 32 64.12 32 103.78v304.45C32 447.86 64.38 480 104.41 480h303.2c40 0 72.39-32.14 72.39-71.77v-3.11c-1.35-.56-115.47-48.57-174.5-76.7c-39.82 48.57-91.18 78-144.5 78c-90.18 0-120.8-78.22-78.1-129.72c9.31-11.22 25.15-21.94 49.73-28c38.45-9.36 99.64 5.85 157 24.61a309.41 309.41 0 0 0 25.46-61.67H138.34V194h91.13v-31.83H119.09v-17.75h110.38V99s0-7.65 7.82-7.65h44.55v53H391v17.75H281.84V194h89.08a359.41 359.41 0 0 1-37.72 94.43c27 9.69 49.31 18.88 67.39 24.89c60.32 20 77.23 22.45 79.41 22.7V103.78C480 64.12 447.6 32 407.61 32h-305.2zM152 274.73q-5.81.06-11.67.63c-11.3 1.13-32.5 6.07-44.09 16.23c-34.74 30-13.94 84.93 56.37 84.93c40.87 0 81.71-25.9 113.79-67.37c-41.36-20-77-34.85-114.4-34.42z",fill:"currentColor"},null,-1),no=[oo],j1=o({name:"LogoAlipay",render:function(s,l){return n(),e("svg",to,no)}}),eo={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},ro=i('',6),so=[ro],z1=o({name:"MegaphoneOutline",render:function(s,l){return n(),e("svg",eo,so)}}),lo={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},io=t("path",{d:"M53.12 199.94l400-151.39a8 8 0 0 1 10.33 10.33l-151.39 400a8 8 0 0 1-15-.34l-67.4-166.09a16 16 0 0 0-10.11-10.11L53.46 215a8 8 0 0 1-.34-15.06z",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32"},null,-1),co=t("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32",d:"M460 52L227 285"},null,-1),ho=[io,co],B1=o({name:"PaperPlaneOutline",render:function(s,l){return n(),e("svg",lo,ho)}}),ao={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},wo=t("path",{d:"M402 168c-2.93 40.67-33.1 72-66 72s-63.12-31.32-66-72c-3-42.31 26.37-72 66-72s69 30.46 66 72z",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32"},null,-1),uo=t("path",{d:"M336 304c-65.17 0-127.84 32.37-143.54 95.41c-2.08 8.34 3.15 16.59 11.72 16.59h263.65c8.57 0 13.77-8.25 11.72-16.59C463.85 335.36 401.18 304 336 304z",fill:"none",stroke:"currentColor","stroke-miterlimit":"10","stroke-width":"32"},null,-1),_o=t("path",{d:"M200 185.94c-2.34 32.48-26.72 58.06-53 58.06s-50.7-25.57-53-58.06C91.61 152.15 115.34 128 147 128s55.39 24.77 53 57.94z",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32"},null,-1),ko=t("path",{d:"M206 306c-18.05-8.27-37.93-11.45-59-11.45c-52 0-102.1 25.85-114.65 76.2c-1.65 6.66 2.53 13.25 9.37 13.25H154",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-miterlimit":"10","stroke-width":"32"},null,-1),po=[wo,uo,_o,ko],L1=o({name:"PeopleOutline",render:function(s,l){return n(),e("svg",ao,po)}}),xo={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},mo=t("path",{d:"M376 144c-3.92 52.87-44 96-88 96s-84.15-43.12-88-96c-4-55 35-96 88-96s92 42 88 96z",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32"},null,-1),go=t("path",{d:"M288 304c-87 0-175.3 48-191.64 138.6c-2 10.92 4.21 21.4 15.65 21.4H464c11.44 0 17.62-10.48 15.65-21.4C463.3 352 375 304 288 304z",fill:"none",stroke:"currentColor","stroke-miterlimit":"10","stroke-width":"32"},null,-1),vo=t("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32",d:"M88 176v112"},null,-1),$o=t("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32",d:"M144 232H32"},null,-1),fo=[mo,go,vo,$o],H1=o({name:"PersonAddOutline",render:function(s,l){return n(),e("svg",xo,fo)}}),Co={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},Mo=t("path",{d:"M344 144c-3.92 52.87-44 96-88 96s-84.15-43.12-88-96c-4-55 35-96 88-96s92 42 88 96z",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32"},null,-1),Oo=t("path",{d:"M256 304c-87 0-175.3 48-191.64 138.6C62.39 453.52 68.57 464 80 464h352c11.44 0 17.62-10.48 15.65-21.4C431.3 352 343 304 256 304z",fill:"none",stroke:"currentColor","stroke-miterlimit":"10","stroke-width":"32"},null,-1),jo=[Mo,Oo],V1=o({name:"PersonOutline",render:function(s,l){return n(),e("svg",Co,jo)}}),zo={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},Bo=t("path",{d:"M376 144c-3.92 52.87-44 96-88 96s-84.15-43.12-88-96c-4-55 35-96 88-96s92 42 88 96z",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32"},null,-1),Lo=t("path",{d:"M288 304c-87 0-175.3 48-191.64 138.6c-2 10.92 4.21 21.4 15.65 21.4H464c11.44 0 17.62-10.48 15.65-21.4C463.3 352 375 304 288 304z",fill:"none",stroke:"currentColor","stroke-miterlimit":"10","stroke-width":"32"},null,-1),Ho=t("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32",d:"M144 232H32"},null,-1),Vo=[Bo,Lo,Ho],A1=o({name:"PersonRemoveOutline",render:function(s,l){return n(),e("svg",zo,Vo)}}),Ao={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},yo=t("path",{d:"M336 336h40a40 40 0 0 0 40-40V88a40 40 0 0 0-40-40H136a40 40 0 0 0-40 40v208a40 40 0 0 0 40 40h40",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32"},null,-1),bo=t("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32",d:"M176 240l80-80l80 80"},null,-1),Po=t("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32",d:"M256 464V176"},null,-1),So=[yo,bo,Po],y1=o({name:"PushOutline",render:function(s,l){return n(),e("svg",Ao,So)}}),To={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},Do=t("path",{d:"M456.69 421.39L362.6 327.3a173.81 173.81 0 0 0 34.84-104.58C397.44 126.38 319.06 48 222.72 48S48 126.38 48 222.72s78.38 174.72 174.72 174.72A173.81 173.81 0 0 0 327.3 362.6l94.09 94.09a25 25 0 0 0 35.3-35.3zM97.92 222.72a124.8 124.8 0 1 1 124.8 124.8a124.95 124.95 0 0 1-124.8-124.8z",fill:"currentColor"},null,-1),Eo=[Do],b1=o({name:"Search",render:function(s,l){return n(),e("svg",To,Eo)}}),Ro={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},Fo=t("path",{d:"M262.29 192.31a64 64 0 1 0 57.4 57.4a64.13 64.13 0 0 0-57.4-57.4zM416.39 256a154.34 154.34 0 0 1-1.53 20.79l45.21 35.46a10.81 10.81 0 0 1 2.45 13.75l-42.77 74a10.81 10.81 0 0 1-13.14 4.59l-44.9-18.08a16.11 16.11 0 0 0-15.17 1.75A164.48 164.48 0 0 1 325 400.8a15.94 15.94 0 0 0-8.82 12.14l-6.73 47.89a11.08 11.08 0 0 1-10.68 9.17h-85.54a11.11 11.11 0 0 1-10.69-8.87l-6.72-47.82a16.07 16.07 0 0 0-9-12.22a155.3 155.3 0 0 1-21.46-12.57a16 16 0 0 0-15.11-1.71l-44.89 18.07a10.81 10.81 0 0 1-13.14-4.58l-42.77-74a10.8 10.8 0 0 1 2.45-13.75l38.21-30a16.05 16.05 0 0 0 6-14.08c-.36-4.17-.58-8.33-.58-12.5s.21-8.27.58-12.35a16 16 0 0 0-6.07-13.94l-38.19-30A10.81 10.81 0 0 1 49.48 186l42.77-74a10.81 10.81 0 0 1 13.14-4.59l44.9 18.08a16.11 16.11 0 0 0 15.17-1.75A164.48 164.48 0 0 1 187 111.2a15.94 15.94 0 0 0 8.82-12.14l6.73-47.89A11.08 11.08 0 0 1 213.23 42h85.54a11.11 11.11 0 0 1 10.69 8.87l6.72 47.82a16.07 16.07 0 0 0 9 12.22a155.3 155.3 0 0 1 21.46 12.57a16 16 0 0 0 15.11 1.71l44.89-18.07a10.81 10.81 0 0 1 13.14 4.58l42.77 74a10.8 10.8 0 0 1-2.45 13.75l-38.21 30a16.05 16.05 0 0 0-6.05 14.08c.33 4.14.55 8.3.55 12.47z",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32"},null,-1),qo=[Fo],P1=o({name:"SettingsOutline",render:function(s,l){return n(),e("svg",Ro,qo)}}),Io={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},No=t("path",{d:"M336 192h40a40 40 0 0 1 40 40v192a40 40 0 0 1-40 40H136a40 40 0 0 1-40-40V232a40 40 0 0 1 40-40h40",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32"},null,-1),Uo=t("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32",d:"M336 128l-80-80l-80 80"},null,-1),Wo=t("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32",d:"M256 321V48"},null,-1),Go=[No,Uo,Wo],S1=o({name:"ShareOutline",render:function(s,l){return n(),e("svg",Io,Go)}}),Jo={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},Ko=i('',5),Qo=[Ko],T1=o({name:"ShareSocialOutline",render:function(s,l){return n(),e("svg",Jo,Qo)}}),Xo={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},Yo=i('',6),Zo=[Yo],D1=o({name:"TrashOutline",render:function(s,l){return n(),e("svg",Xo,Zo)}}),tn={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},on=t("path",{d:"M374.79 308.78L457.5 367a16 16 0 0 0 22.5-14.62V159.62A16 16 0 0 0 457.5 145l-82.71 58.22A16 16 0 0 0 368 216.3v79.4a16 16 0 0 0 6.79 13.08z",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32"},null,-1),nn=t("path",{d:"M268 384H84a52.15 52.15 0 0 1-52-52V180a52.15 52.15 0 0 1 52-52h184.48A51.68 51.68 0 0 1 320 179.52V332a52.15 52.15 0 0 1-52 52z",fill:"none",stroke:"currentColor","stroke-miterlimit":"10","stroke-width":"32"},null,-1),en=[on,nn],E1=o({name:"VideocamOutline",render:function(s,l){return n(),e("svg",tn,en)}}),rn={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},sn=i('',5),ln=[sn],R1=o({name:"WalkOutline",render:function(s,l){return n(),e("svg",rn,ln)}}),cn={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},hn=t("rect",{x:"48",y:"144",width:"416",height:"288",rx:"48",ry:"48",fill:"none",stroke:"currentColor","stroke-linejoin":"round","stroke-width":"32"},null,-1),dn=t("path",{d:"M411.36 144v-30A50 50 0 0 0 352 64.9L88.64 109.85A50 50 0 0 0 48 159v49",fill:"none",stroke:"currentColor","stroke-linejoin":"round","stroke-width":"32"},null,-1),an=t("path",{d:"M368 320a32 32 0 1 1 32-32a32 32 0 0 1-32 32z",fill:"currentColor"},null,-1),wn=[hn,dn,an],F1=o({name:"WalletOutline",render:function(s,l){return n(),e("svg",cn,wn)}}),un={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},_n=t("g",{fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[t("path",{d:"M9 7H6a2 2 0 0 0-2 2v9a2 2 0 0 0 2 2h9a2 2 0 0 0 2-2v-3"}),t("path",{d:"M9 15h3l8.5-8.5a1.5 1.5 0 0 0-3-3L9 12v3"}),t("path",{d:"M16 5l3 3"})],-1),kn=[_n],q1=o({name:"Edit",render:function(s,l){return n(),e("svg",un,kn)}}),pn={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},xn=i('',1),mn=[xn],I1=o({name:"Hash",render:function(s,l){return n(),e("svg",pn,mn)}}),gn={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},vn=i('',1),$n=[vn],N1=o({name:"Trash",render:function(s,l){return n(),e("svg",gn,$n)}}),fn={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},Cn=t("path",{d:"M14.71 6.71a.996.996 0 0 0-1.41 0L8.71 11.3a.996.996 0 0 0 0 1.41l4.59 4.59a.996.996 0 1 0 1.41-1.41L10.83 12l3.88-3.88c.39-.39.38-1.03 0-1.41z",fill:"currentColor"},null,-1),Mn=[Cn],U1=o({name:"ChevronLeftRound",render:function(s,l){return n(),e("svg",fn,Mn)}}),On={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},jn=t("path",{d:"M9.37 5.51A7.35 7.35 0 0 0 9.1 7.5c0 4.08 3.32 7.4 7.4 7.4c.68 0 1.35-.09 1.99-.27A7.014 7.014 0 0 1 12 19c-3.86 0-7-3.14-7-7c0-2.93 1.81-5.45 4.37-6.49zM12 3a9 9 0 1 0 9 9c0-.46-.04-.92-.1-1.36a5.389 5.389 0 0 1-4.4 2.26a5.403 5.403 0 0 1-3.14-9.8c-.44-.06-.9-.1-1.36-.1z",fill:"currentColor"},null,-1),zn=[jn],W1=o({name:"DarkModeOutlined",render:function(s,l){return n(),e("svg",On,zn)}}),Bn={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},Ln=t("path",{d:"M2 17c0 .55.45 1 1 1h18c.55 0 1-.45 1-1s-.45-1-1-1H3c-.55 0-1 .45-1 1zm0-5c0 .55.45 1 1 1h18c.55 0 1-.45 1-1s-.45-1-1-1H3c-.55 0-1 .45-1 1zm0-5c0 .55.45 1 1 1h18c.55 0 1-.45 1-1s-.45-1-1-1H3c-.55 0-1 .45-1 1z",fill:"currentColor"},null,-1),Hn=[Ln],G1=o({name:"DehazeRound",render:function(s,l){return n(),e("svg",Bn,Hn)}}),Vn={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},An=t("path",{d:"M12 9c1.65 0 3 1.35 3 3s-1.35 3-3 3s-3-1.35-3-3s1.35-3 3-3m0-2c-2.76 0-5 2.24-5 5s2.24 5 5 5s5-2.24 5-5s-2.24-5-5-5zM2 13h2c.55 0 1-.45 1-1s-.45-1-1-1H2c-.55 0-1 .45-1 1s.45 1 1 1zm18 0h2c.55 0 1-.45 1-1s-.45-1-1-1h-2c-.55 0-1 .45-1 1s.45 1 1 1zM11 2v2c0 .55.45 1 1 1s1-.45 1-1V2c0-.55-.45-1-1-1s-1 .45-1 1zm0 18v2c0 .55.45 1 1 1s1-.45 1-1v-2c0-.55-.45-1-1-1s-1 .45-1 1zM5.99 4.58a.996.996 0 0 0-1.41 0a.996.996 0 0 0 0 1.41l1.06 1.06c.39.39 1.03.39 1.41 0s.39-1.03 0-1.41L5.99 4.58zm12.37 12.37a.996.996 0 0 0-1.41 0a.996.996 0 0 0 0 1.41l1.06 1.06c.39.39 1.03.39 1.41 0a.996.996 0 0 0 0-1.41l-1.06-1.06zm1.06-10.96a.996.996 0 0 0 0-1.41a.996.996 0 0 0-1.41 0l-1.06 1.06c-.39.39-.39 1.03 0 1.41s1.03.39 1.41 0l1.06-1.06zM7.05 18.36a.996.996 0 0 0 0-1.41a.996.996 0 0 0-1.41 0l-1.06 1.06c-.39.39-.39 1.03 0 1.41s1.03.39 1.41 0l1.06-1.06z",fill:"currentColor"},null,-1),yn=[An],J1=o({name:"LightModeOutlined",render:function(s,l){return n(),e("svg",Vn,yn)}}),bn={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},Pn=t("path",{d:"M6 10c-1.1 0-2 .9-2 2s.9 2 2 2s2-.9 2-2s-.9-2-2-2zm12 0c-1.1 0-2 .9-2 2s.9 2 2 2s2-.9 2-2s-.9-2-2-2zm-6 0c-1.1 0-2 .9-2 2s.9 2 2 2s2-.9 2-2s-.9-2-2-2z",fill:"currentColor"},null,-1),Sn=[Pn],K1=o({name:"MoreHorizFilled",render:function(s,l){return n(),e("svg",bn,Sn)}}),Tn={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},Dn=t("path",{d:"M12 8c1.1 0 2-.9 2-2s-.9-2-2-2s-2 .9-2 2s.9 2 2 2zm0 2c-1.1 0-2 .9-2 2s.9 2 2 2s2-.9 2-2s-.9-2-2-2zm0 6c-1.1 0-2 .9-2 2s.9 2 2 2s2-.9 2-2s-.9-2-2-2z",fill:"currentColor"},null,-1),En=[Dn],Q1=o({name:"MoreVertOutlined",render:function(s,l){return n(),e("svg",Tn,En)}}),Rn={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},Fn=t("path",{d:"M15 3H6c-.83 0-1.54.5-1.84 1.22l-3.02 7.05c-.09.23-.14.47-.14.73v2c0 1.1.9 2 2 2h6.31l-.95 4.57l-.03.32c0 .41.17.79.44 1.06L9.83 23l6.59-6.59c.36-.36.58-.86.58-1.41V5c0-1.1-.9-2-2-2zm0 12l-4.34 4.34L12 14H3v-2l3-7h9v10zm4-12h4v12h-4z",fill:"currentColor"},null,-1),qn=[Fn],X1=o({name:"ThumbDownOutlined",render:function(s,l){return n(),e("svg",Rn,qn)}}),In={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},Nn=t("path",{opacity:".3",d:"M3 12v2h9l-1.34 5.34L15 15V5H6z",fill:"currentColor"},null,-1),Un=t("path",{d:"M15 3H6c-.83 0-1.54.5-1.84 1.22l-3.02 7.05c-.09.23-.14.47-.14.73v2c0 1.1.9 2 2 2h6.31l-.95 4.57l-.03.32c0 .41.17.79.44 1.06L9.83 23l6.59-6.59c.36-.36.58-.86.58-1.41V5c0-1.1-.9-2-2-2zm0 12l-4.34 4.34L12 14H3v-2l3-7h9v10zm4-12h4v12h-4z",fill:"currentColor"},null,-1),Wn=[Nn,Un],Y1=o({name:"ThumbDownTwotone",render:function(s,l){return n(),e("svg",In,Wn)}}),Gn={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},Jn=t("path",{d:"M9 21h9c.83 0 1.54-.5 1.84-1.22l3.02-7.05c.09-.23.14-.47.14-.73v-2c0-1.1-.9-2-2-2h-6.31l.95-4.57l.03-.32c0-.41-.17-.79-.44-1.06L14.17 1L7.58 7.59C7.22 7.95 7 8.45 7 9v10c0 1.1.9 2 2 2zM9 9l4.34-4.34L12 10h9v2l-3 7H9V9zM1 9h4v12H1z",fill:"currentColor"},null,-1),Kn=[Jn],Z1=o({name:"ThumbUpOutlined",render:function(s,l){return n(),e("svg",Gn,Kn)}}),Qn={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},Xn=t("path",{opacity:".3",d:"M21 12v-2h-9l1.34-5.34L9 9v10h9z",fill:"currentColor"},null,-1),Yn=t("path",{d:"M9 21h9c.83 0 1.54-.5 1.84-1.22l3.02-7.05c.09-.23.14-.47.14-.73v-2c0-1.1-.9-2-2-2h-6.31l.95-4.57l.03-.32c0-.41-.17-.79-.44-1.06L14.17 1L7.58 7.59C7.22 7.95 7 8.45 7 9v10c0 1.1.9 2 2 2zM9 9l4.34-4.34L12 10h9v2l-3 7H9V9zM1 9h4v12H1z",fill:"currentColor"},null,-1),Zn=[Xn,Yn],te=o({name:"ThumbUpTwotone",render:function(s,l){return n(),e("svg",Qn,Zn)}});export{W1 as $,o1 as A,s1 as B,i1 as C,A1 as D,k1 as E,p1 as F,H1 as G,g1 as H,v1 as I,S1 as J,h1 as K,$1 as L,z1 as M,d1 as N,c1 as O,L1 as P,f1 as Q,a1 as R,b1 as S,N1 as T,j1 as U,E1 as V,F1 as W,q1 as X,G1 as Y,U1 as Z,J1 as _,P1 as a,I1 as b,O1 as c,w1 as d,Z1 as e,te as f,X1 as g,Y1 as h,K1 as i,m1 as j,x1 as k,l1 as l,r1 as m,e1 as n,T1 as o,D1 as p,C1 as q,M1 as r,y1 as s,_1 as t,n1 as u,V1 as v,Q1 as w,B1 as x,u1 as y,R1 as z}; diff --git a/web/dist/assets/Anouncement-c742a454.js b/web/dist/assets/Anouncement-9930cc6a.js similarity index 88% rename from web/dist/assets/Anouncement-c742a454.js rename to web/dist/assets/Anouncement-9930cc6a.js index ac9b0da9..a38e564a 100644 --- a/web/dist/assets/Anouncement-c742a454.js +++ b/web/dist/assets/Anouncement-9930cc6a.js @@ -1 +1 @@ -import{_ as F}from"./post-skeleton-bae19eed.js";import{_ as N}from"./main-nav.vue_vue_type_style_index_0_lang-3b4e457a.js";import{u as z}from"./vuex-44de225f.js";import{b as A}from"./vue-router-e5a2430e.js";import{a as R}from"./formatTime-4210fcd1.js";import{F as S,Q as V,I as q,G as I}from"./naive-ui-d8de3dda.js";import{d as P,H as n,b as j,f as o,k as a,w as p,e,bf as u,Y as l,F as D,u as E,q as G,j as s,x as _,l as H}from"./@vue-a481fc63.js";import{_ as L}from"./index-7ab58e72.js";import"./vooks-6d99783e.js";import"./evtd-b614532e.js";import"./@vicons-33f992ab.js";import"./moment-2ab8298d.js";import"./seemly-76b7b838.js";import"./vueuc-39372edb.js";import"./@css-render-7124a1a5.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";import"./axios-4a70c6fc.js";/* empty css */const M={key:0,class:"pagination-wrap"},O={key:0,class:"skeleton-wrap"},Q={key:1},T={key:0,class:"empty-wrap"},U={class:"bill-line"},Y=P({__name:"Anouncement",setup($){const d=z(),g=A(),v=n(!1),r=n([]),i=n(+g.query.p||1),f=n(20),m=n(0),h=c=>{i.value=c};return j(()=>{}),(c,J)=>{const k=N,y=V,x=F,w=q,B=I,C=S;return e(),o("div",null,[a(k,{title:"公告"}),a(C,{class:"main-content-wrap",bordered:""},{footer:p(()=>[m.value>1?(e(),o("div",M,[a(y,{page:i.value,"onUpdate:page":h,"page-slot":u(d).state.collapsedRight?5:8,"page-count":m.value},null,8,["page","page-slot","page-count"])])):l("",!0)]),default:p(()=>[v.value?(e(),o("div",O,[a(x,{num:f.value},null,8,["num"])])):(e(),o("div",Q,[r.value.length===0?(e(),o("div",T,[a(w,{size:"large",description:"暂无数据"})])):l("",!0),(e(!0),o(D,null,E(r.value,t=>(e(),G(B,{key:t.id},{default:p(()=>[s("div",U,[s("div",null,"NO."+_(t.id),1),s("div",null,_(t.reason),1),s("div",{class:H({income:t.change_amount>=0,out:t.change_amount<0})},_((t.change_amount>0?"+":"")+(t.change_amount/100).toFixed(2)),3),s("div",null,_(u(R)(t.created_on)),1)])]),_:2},1024))),128))]))]),_:1})])}}});const yt=L(Y,[["__scopeId","data-v-d4d04859"]]);export{yt as default}; +import{_ as F}from"./post-skeleton-c82f8a59.js";import{_ as N}from"./main-nav.vue_vue_type_style_index_0_lang-048bd56b.js";import{u as z}from"./vuex-44de225f.js";import{b as A}from"./vue-router-e5a2430e.js";import{a as R}from"./formatTime-4210fcd1.js";import{F as S,Q as V,I as q,G as I}from"./naive-ui-d8de3dda.js";import{d as P,H as n,b as j,f as o,k as a,w as p,e,bf as u,Y as l,F as D,u as E,q as G,j as s,x as _,l as H}from"./@vue-a481fc63.js";import{_ as L}from"./index-757c547c.js";import"./vooks-6d99783e.js";import"./evtd-b614532e.js";import"./@vicons-1a3558c6.js";import"./moment-2ab8298d.js";import"./seemly-76b7b838.js";import"./vueuc-39372edb.js";import"./@css-render-7124a1a5.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";import"./axios-4a70c6fc.js";/* empty css */const M={key:0,class:"pagination-wrap"},O={key:0,class:"skeleton-wrap"},Q={key:1},T={key:0,class:"empty-wrap"},U={class:"bill-line"},Y=P({__name:"Anouncement",setup($){const d=z(),g=A(),v=n(!1),r=n([]),i=n(+g.query.p||1),f=n(20),m=n(0),h=c=>{i.value=c};return j(()=>{}),(c,J)=>{const k=N,y=V,x=F,w=q,B=I,C=S;return e(),o("div",null,[a(k,{title:"公告"}),a(C,{class:"main-content-wrap",bordered:""},{footer:p(()=>[m.value>1?(e(),o("div",M,[a(y,{page:i.value,"onUpdate:page":h,"page-slot":u(d).state.collapsedRight?5:8,"page-count":m.value},null,8,["page","page-slot","page-count"])])):l("",!0)]),default:p(()=>[v.value?(e(),o("div",O,[a(x,{num:f.value},null,8,["num"])])):(e(),o("div",Q,[r.value.length===0?(e(),o("div",T,[a(w,{size:"large",description:"暂无数据"})])):l("",!0),(e(!0),o(D,null,E(r.value,t=>(e(),G(B,{key:t.id},{default:p(()=>[s("div",U,[s("div",null,"NO."+_(t.id),1),s("div",null,_(t.reason),1),s("div",{class:H({income:t.change_amount>=0,out:t.change_amount<0})},_((t.change_amount>0?"+":"")+(t.change_amount/100).toFixed(2)),3),s("div",null,_(u(R)(t.created_on)),1)])]),_:2},1024))),128))]))]),_:1})])}}});const yt=L(Y,[["__scopeId","data-v-d4d04859"]]);export{yt as default}; diff --git a/web/dist/assets/Collection-a4fc2204.js b/web/dist/assets/Collection-a3f9d0d9.js similarity index 90% rename from web/dist/assets/Collection-a4fc2204.js rename to web/dist/assets/Collection-a3f9d0d9.js index 26cd0828..3ba916e5 100644 --- a/web/dist/assets/Collection-a4fc2204.js +++ b/web/dist/assets/Collection-a3f9d0d9.js @@ -1 +1 @@ -import{_ as P,a as S}from"./post-item.vue_vue_type_style_index_0_lang-3755d97f.js";import{_ as $}from"./post-skeleton-bae19eed.js";import{_ as q}from"./main-nav.vue_vue_type_style_index_0_lang-3b4e457a.js";import{u as I}from"./vuex-44de225f.js";import{b as N}from"./vue-router-e5a2430e.js";import{O as R,_ as V}from"./index-7ab58e72.js";import{d as E,H as a,b as G,f as o,k as e,w as c,bf as g,Y as v,e as t,F as f,u as k,q as h}from"./@vue-a481fc63.js";import{F as H,Q as L,I as O,G as Q}from"./naive-ui-d8de3dda.js";import"./content-77341dc8.js";import"./@vicons-33f992ab.js";import"./paopao-video-player-2fe58954.js";import"./formatTime-4210fcd1.js";import"./moment-2ab8298d.js";import"./copy-to-clipboard-4ef7d3eb.js";import"./@babel-725317a4.js";import"./toggle-selection-93f4ad84.js";import"./vooks-6d99783e.js";import"./evtd-b614532e.js";import"./axios-4a70c6fc.js";/* empty css */import"./seemly-76b7b838.js";import"./vueuc-39372edb.js";import"./@css-render-7124a1a5.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 T={key:0,class:"skeleton-wrap"},U={key:1},Y={key:0,class:"empty-wrap"},j={key:1},A={key:2},D={key:0,class:"pagination-wrap"},J=E({__name:"Collection",setup(K){const m=I(),y=N(),_=a(!1),i=a([]),p=a(+y.query.p||1),l=a(20),r=a(0),u=()=>{_.value=!0,R({page:p.value,page_size:l.value}).then(n=>{_.value=!1,i.value=n.list,r.value=Math.ceil(n.pager.total_rows/l.value),window.scrollTo(0,0)}).catch(n=>{_.value=!1})},w=n=>{p.value=n,u()};return G(()=>{u()}),(n,W)=>{const b=q,C=$,x=O,z=P,d=Q,B=S,F=H,M=L;return t(),o("div",null,[e(b,{title:"收藏"}),e(F,{class:"main-content-wrap",bordered:""},{default:c(()=>[_.value?(t(),o("div",T,[e(C,{num:l.value},null,8,["num"])])):(t(),o("div",U,[i.value.length===0?(t(),o("div",Y,[e(x,{size:"large",description:"暂无数据"})])):v("",!0),g(m).state.desktopModelShow?(t(),o("div",j,[(t(!0),o(f,null,k(i.value,s=>(t(),h(d,{key:s.id},{default:c(()=>[e(z,{post:s},null,8,["post"])]),_:2},1024))),128))])):(t(),o("div",A,[(t(!0),o(f,null,k(i.value,s=>(t(),h(d,{key:s.id},{default:c(()=>[e(B,{post:s},null,8,["post"])]),_:2},1024))),128))]))]))]),_:1}),r.value>0?(t(),o("div",D,[e(M,{page:p.value,"onUpdate:page":w,"page-slot":g(m).state.collapsedRight?5:8,"page-count":r.value},null,8,["page","page-slot","page-count"])])):v("",!0)])}}});const Pt=V(J,[["__scopeId","data-v-a5302c9b"]]);export{Pt as default}; +import{_ as P,a as S}from"./post-item.vue_vue_type_style_index_0_lang-cf11e2c5.js";import{_ as $}from"./post-skeleton-c82f8a59.js";import{_ as q}from"./main-nav.vue_vue_type_style_index_0_lang-048bd56b.js";import{u as I}from"./vuex-44de225f.js";import{b as N}from"./vue-router-e5a2430e.js";import{O as R,_ as V}from"./index-757c547c.js";import{d as E,H as a,b as G,f as o,k as e,w as c,bf as g,Y as v,e as t,F as f,u as k,q as h}from"./@vue-a481fc63.js";import{F as H,Q as L,I as O,G as Q}from"./naive-ui-d8de3dda.js";import"./content-d5264b98.js";import"./@vicons-1a3558c6.js";import"./paopao-video-player-2fe58954.js";import"./formatTime-4210fcd1.js";import"./moment-2ab8298d.js";import"./copy-to-clipboard-4ef7d3eb.js";import"./@babel-725317a4.js";import"./toggle-selection-93f4ad84.js";import"./vooks-6d99783e.js";import"./evtd-b614532e.js";import"./axios-4a70c6fc.js";/* empty css */import"./seemly-76b7b838.js";import"./vueuc-39372edb.js";import"./@css-render-7124a1a5.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 T={key:0,class:"skeleton-wrap"},U={key:1},Y={key:0,class:"empty-wrap"},j={key:1},A={key:2},D={key:0,class:"pagination-wrap"},J=E({__name:"Collection",setup(K){const m=I(),y=N(),_=a(!1),i=a([]),p=a(+y.query.p||1),l=a(20),r=a(0),u=()=>{_.value=!0,R({page:p.value,page_size:l.value}).then(n=>{_.value=!1,i.value=n.list,r.value=Math.ceil(n.pager.total_rows/l.value),window.scrollTo(0,0)}).catch(n=>{_.value=!1})},w=n=>{p.value=n,u()};return G(()=>{u()}),(n,W)=>{const b=q,C=$,x=O,z=P,d=Q,B=S,F=H,M=L;return t(),o("div",null,[e(b,{title:"收藏"}),e(F,{class:"main-content-wrap",bordered:""},{default:c(()=>[_.value?(t(),o("div",T,[e(C,{num:l.value},null,8,["num"])])):(t(),o("div",U,[i.value.length===0?(t(),o("div",Y,[e(x,{size:"large",description:"暂无数据"})])):v("",!0),g(m).state.desktopModelShow?(t(),o("div",j,[(t(!0),o(f,null,k(i.value,s=>(t(),h(d,{key:s.id},{default:c(()=>[e(z,{post:s},null,8,["post"])]),_:2},1024))),128))])):(t(),o("div",A,[(t(!0),o(f,null,k(i.value,s=>(t(),h(d,{key:s.id},{default:c(()=>[e(B,{post:s},null,8,["post"])]),_:2},1024))),128))]))]))]),_:1}),r.value>0?(t(),o("div",D,[e(M,{page:p.value,"onUpdate:page":w,"page-slot":g(m).state.collapsedRight?5:8,"page-count":r.value},null,8,["page","page-slot","page-count"])])):v("",!0)])}}});const Pt=V(J,[["__scopeId","data-v-a5302c9b"]]);export{Pt as default}; diff --git a/web/dist/assets/Contacts-9c1c8f45.js b/web/dist/assets/Contacts-839dbc08.js similarity index 93% rename from web/dist/assets/Contacts-9c1c8f45.js rename to web/dist/assets/Contacts-839dbc08.js index 7bc25af1..08c34f81 100644 --- a/web/dist/assets/Contacts-9c1c8f45.js +++ b/web/dist/assets/Contacts-839dbc08.js @@ -1 +1 @@ -import{u as P,b as R}from"./vue-router-e5a2430e.js";import{b as S}from"./formatTime-4210fcd1.js";import{d as k,e as o,f as s,j as e,k as a,x as l,bf as b,H as c,b as U,w as f,Y as h,F as y,u as V,q as x}from"./@vue-a481fc63.js";import{o as M,F as T,Q as j,I as E,G}from"./naive-ui-d8de3dda.js";import{_ as w,b as H}from"./index-7ab58e72.js";import{_ as L}from"./post-skeleton-bae19eed.js";import{_ as Q}from"./main-nav.vue_vue_type_style_index_0_lang-3b4e457a.js";import{u as Y}from"./vuex-44de225f.js";import"./moment-2ab8298d.js";import"./seemly-76b7b838.js";import"./vueuc-39372edb.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";import"./axios-4a70c6fc.js";import"./@vicons-33f992ab.js";/* empty css */const A={class:"avatar"},J={class:"base-info"},K={class:"username"},O={class:"user-info"},W={class:"info-item"},X={class:"info-item"},Z=k({__name:"contact-item",props:{contact:{}},setup(C){const u=P(),m=t=>{u.push({name:"user",query:{s:t}})};return(t,n)=>{const _=M;return o(),s("div",{class:"contact-item",onClick:n[0]||(n[0]=i=>m(t.contact.username))},[e("div",A,[a(_,{size:54,src:t.contact.avatar},null,8,["src"])]),e("div",J,[e("div",K,[e("strong",null,l(t.contact.nickname),1),e("span",null," @"+l(t.contact.username),1)]),e("div",O,[e("span",W,"UID. "+l(t.contact.user_id),1),e("span",X,l(b(S)(t.contact.created_on))+" 加入",1)])])])}}});const tt=w(Z,[["__scopeId","data-v-644d2c15"]]),et={key:0,class:"skeleton-wrap"},ot={key:1},nt={key:0,class:"empty-wrap"},st={key:0,class:"pagination-wrap"},at=k({__name:"Contacts",setup(C){const u=Y(),m=R(),t=c(!1),n=c([]),_=c(+m.query.p||1),i=c(20),d=c(0),$=r=>{_.value=r,v()};U(()=>{v()});const v=(r=!1)=>{n.value.length===0&&(t.value=!0),H({page:_.value,page_size:i.value}).then(p=>{t.value=!1,n.value=p.list,d.value=Math.ceil(p.pager.total_rows/i.value),r&&setTimeout(()=>{window.scrollTo(0,99999)},50)}).catch(p=>{t.value=!1})};return(r,p)=>{const I=Q,z=L,B=E,q=tt,D=G,F=T,N=j;return o(),s(y,null,[e("div",null,[a(I,{title:"好友"}),a(F,{class:"main-content-wrap",bordered:""},{default:f(()=>[t.value?(o(),s("div",et,[a(z,{num:i.value},null,8,["num"])])):(o(),s("div",ot,[n.value.length===0?(o(),s("div",nt,[a(B,{size:"large",description:"暂无数据"})])):h("",!0),(o(!0),s(y,null,V(n.value,g=>(o(),x(D,{key:g.user_id},{default:f(()=>[a(q,{contact:g},null,8,["contact"])]),_:2},1024))),128))]))]),_:1})]),d.value>0?(o(),s("div",st,[a(N,{page:_.value,"onUpdate:page":$,"page-slot":b(u).state.collapsedRight?5:8,"page-count":d.value},null,8,["page","page-slot","page-count"])])):h("",!0)],64)}}});const Nt=w(at,[["__scopeId","data-v-3b2bf978"]]);export{Nt as default}; +import{u as P,b as R}from"./vue-router-e5a2430e.js";import{b as S}from"./formatTime-4210fcd1.js";import{d as k,e as o,f as s,j as e,k as a,x as l,bf as b,H as c,b as U,w as f,Y as h,F as y,u as V,q as x}from"./@vue-a481fc63.js";import{o as M,F as T,Q as j,I as E,G}from"./naive-ui-d8de3dda.js";import{_ as w,b as H}from"./index-757c547c.js";import{_ as L}from"./post-skeleton-c82f8a59.js";import{_ as Q}from"./main-nav.vue_vue_type_style_index_0_lang-048bd56b.js";import{u as Y}from"./vuex-44de225f.js";import"./moment-2ab8298d.js";import"./seemly-76b7b838.js";import"./vueuc-39372edb.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";import"./axios-4a70c6fc.js";import"./@vicons-1a3558c6.js";/* empty css */const A={class:"avatar"},J={class:"base-info"},K={class:"username"},O={class:"user-info"},W={class:"info-item"},X={class:"info-item"},Z=k({__name:"contact-item",props:{contact:{}},setup(C){const u=P(),m=t=>{u.push({name:"user",query:{s:t}})};return(t,n)=>{const _=M;return o(),s("div",{class:"contact-item",onClick:n[0]||(n[0]=i=>m(t.contact.username))},[e("div",A,[a(_,{size:54,src:t.contact.avatar},null,8,["src"])]),e("div",J,[e("div",K,[e("strong",null,l(t.contact.nickname),1),e("span",null," @"+l(t.contact.username),1)]),e("div",O,[e("span",W,"UID. "+l(t.contact.user_id),1),e("span",X,l(b(S)(t.contact.created_on))+" 加入",1)])])])}}});const tt=w(Z,[["__scopeId","data-v-644d2c15"]]),et={key:0,class:"skeleton-wrap"},ot={key:1},nt={key:0,class:"empty-wrap"},st={key:0,class:"pagination-wrap"},at=k({__name:"Contacts",setup(C){const u=Y(),m=R(),t=c(!1),n=c([]),_=c(+m.query.p||1),i=c(20),d=c(0),$=r=>{_.value=r,v()};U(()=>{v()});const v=(r=!1)=>{n.value.length===0&&(t.value=!0),H({page:_.value,page_size:i.value}).then(p=>{t.value=!1,n.value=p.list,d.value=Math.ceil(p.pager.total_rows/i.value),r&&setTimeout(()=>{window.scrollTo(0,99999)},50)}).catch(p=>{t.value=!1})};return(r,p)=>{const I=Q,z=L,B=E,q=tt,D=G,F=T,N=j;return o(),s(y,null,[e("div",null,[a(I,{title:"好友"}),a(F,{class:"main-content-wrap",bordered:""},{default:f(()=>[t.value?(o(),s("div",et,[a(z,{num:i.value},null,8,["num"])])):(o(),s("div",ot,[n.value.length===0?(o(),s("div",nt,[a(B,{size:"large",description:"暂无数据"})])):h("",!0),(o(!0),s(y,null,V(n.value,g=>(o(),x(D,{key:g.user_id},{default:f(()=>[a(q,{contact:g},null,8,["contact"])]),_:2},1024))),128))]))]),_:1})]),d.value>0?(o(),s("div",st,[a(N,{page:_.value,"onUpdate:page":$,"page-slot":b(u).state.collapsedRight?5:8,"page-count":d.value},null,8,["page","page-slot","page-count"])])):h("",!0)],64)}}});const Nt=w(at,[["__scopeId","data-v-3b2bf978"]]);export{Nt as default}; diff --git a/web/dist/assets/Following-1907aebf.js b/web/dist/assets/Following-be24e2b8.js similarity index 93% rename from web/dist/assets/Following-1907aebf.js rename to web/dist/assets/Following-be24e2b8.js index 9540febd..2e395681 100644 --- a/web/dist/assets/Following-1907aebf.js +++ b/web/dist/assets/Following-be24e2b8.js @@ -1 +1 @@ -import{d as B,c as L,r as E,e as l,f as r,k as o,w as t,j as p,y as G,A as q,x as k,q as N,Y as z,bf as v,h as x,H as f,b as Q,F as C,u as W}from"./@vue-a481fc63.js";import{u as Y,b as J}from"./vue-router-e5a2430e.js";import{H as K,I as X,_ as S,R as Z,S as ee}from"./index-7ab58e72.js";import{b as oe}from"./formatTime-4210fcd1.js";import{i as te,z as ne,u as se}from"./@vicons-33f992ab.js";import{T as ae,j as M,o as le,M as ce,e as _e,O as ie,L as ue,F as re,Q as pe,f as me,g as de,I as fe,G as ge}from"./naive-ui-d8de3dda.js";import{_ as ve}from"./post-skeleton-bae19eed.js";import{_ as we}from"./main-nav.vue_vue_type_style_index_0_lang-3b4e457a.js";import{u as he}from"./vuex-44de225f.js";import"./axios-4a70c6fc.js";/* empty css */import"./seemly-76b7b838.js";import"./vueuc-39372edb.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";import"./moment-2ab8298d.js";const ke={class:"follow-item"},ye={class:"nickname-wrap"},be={class:"username-wrap"},Fe={class:"user-info"},$e={class:"info-item"},ze={class:"info-item"},Te={class:"item-header-extra"},Ie=B({__name:"follow-item",props:{contact:{}},setup(T){const s=T,m=ae();Y();const n=e=>()=>x(M,null,{default:()=>x(e)}),c=()=>{m.success({title:"提示",content:"确定"+(s.contact.is_following?"取消关注":"关注")+"该用户吗?",positiveText:"确定",negativeText:"取消",onPositiveClick:()=>{s.contact.is_following?K({user_id:s.contact.user_id}).then(e=>{window.$message.success("取消关注成功"),s.contact.is_following=!1}).catch(e=>{console.log(e)}):X({user_id:s.contact.user_id}).then(e=>{window.$message.success("关注成功"),s.contact.is_following=!0}).catch(e=>{console.log(e)})}})},y=e=>{switch(e){case"follow":case"unfollow":c();break}},w=L(()=>{let e=[];return s.contact.is_following?e.push({label:"取消关注",key:"unfollow",icon:n(ne)}):e.push({label:"关注",key:"follow",icon:n(se)}),e});return(e,i)=>{const u=le,d=E("router-link"),b=ce,F=_e,g=ie,$=ue;return l(),r("div",ke,[o($,{"content-indented":""},{avatar:t(()=>[o(u,{size:54,src:e.contact.avatar},null,8,["src"])]),header:t(()=>[p("span",ye,[o(d,{onClick:i[0]||(i[0]=G(()=>{},["stop"])),class:"username-link",to:{name:"user",query:{s:e.contact.username}}},{default:t(()=>[q(k(e.contact.nickname),1)]),_:1},8,["to"])]),p("span",be," @"+k(e.contact.username),1),e.contact.is_following?(l(),N(b,{key:0,class:"top-tag",type:"success",size:"small",round:""},{default:t(()=>[q(" 已关注 ")]),_:1})):z("",!0),p("div",Fe,[p("span",$e," UID. "+k(e.contact.user_id),1),p("span",ze,k(v(oe)(e.contact.created_on))+" 加入 ",1)])]),"header-extra":t(()=>[p("div",Te,[o(g,{placement:"bottom-end",trigger:"click",size:"small",options:w.value,onSelect:y},{default:t(()=>[o(F,{quaternary:"",circle:""},{icon:t(()=>[o(v(M),null,{default:t(()=>[o(v(te))]),_:1})]),_:1})]),_:1},8,["options"])])]),_:1})])}}});const Ue=S(Ie,[["__scopeId","data-v-64f1874c"]]),qe={key:0,class:"skeleton-wrap"},xe={key:1},Ce={key:0,class:"empty-wrap"},Me={key:0,class:"pagination-wrap"},Be=B({__name:"Following",setup(T){const s=he(),m=J(),n=f(!1),c=f([]),y=m.query.n||"粉丝详情",w=m.query.s||"",e=f(m.query.t||"follows"),i=f(+m.query.p||1),u=f(20),d=f(0),b=_=>{i.value=_,g()},F=_=>{e.value=_,g()},g=()=>{e.value==="follows"?$(w):e.value==="followings"&&D(w)},$=(_,h=!1)=>{c.value.length===0&&(n.value=!0),Z({username:_,page:i.value,page_size:u.value}).then(a=>{n.value=!1,c.value=a.list||[],d.value=Math.ceil(a.pager.total_rows/u.value),h&&setTimeout(()=>{window.scrollTo(0,99999)},50)}).catch(a=>{n.value=!1})},D=(_,h=!1)=>{c.value.length===0&&(n.value=!0),ee({username:_,page:i.value,page_size:u.value}).then(a=>{n.value=!1,c.value=a.list||[],d.value=Math.ceil(a.pager.total_rows/u.value),h&&setTimeout(()=>{window.scrollTo(0,99999)},50)}).catch(a=>{n.value=!1})};return Q(()=>{g()}),(_,h)=>{const a=we,I=me,O=de,P=ve,R=fe,V=Ue,H=ge,j=re,A=pe;return l(),r(C,null,[p("div",null,[o(a,{title:v(y),back:!0},null,8,["title"]),o(j,{class:"main-content-wrap",bordered:""},{default:t(()=>[o(O,{type:"line",animated:"","default-value":e.value,"onUpdate:value":F},{default:t(()=>[o(I,{name:"follows",tab:"正在关注"}),o(I,{name:"followings",tab:"我的粉丝"})]),_:1},8,["default-value"]),n.value?(l(),r("div",qe,[o(P,{num:u.value},null,8,["num"])])):(l(),r("div",xe,[c.value.length===0?(l(),r("div",Ce,[o(R,{size:"large",description:"暂无数据"})])):z("",!0),(l(!0),r(C,null,W(c.value,U=>(l(),N(H,{key:U.user_id},{default:t(()=>[o(V,{contact:U},null,8,["contact"])]),_:2},1024))),128))]))]),_:1})]),d.value>0?(l(),r("div",Me,[o(A,{page:i.value,"onUpdate:page":b,"page-slot":v(s).state.collapsedRight?5:8,"page-count":d.value},null,8,["page","page-slot","page-count"])])):z("",!0)],64)}}});const ao=S(Be,[["__scopeId","data-v-1f0f223d"]]);export{ao as default}; +import{d as B,c as L,r as E,e as l,f as r,k as o,w as t,j as p,y as G,A as q,x as k,q as N,Y as z,bf as v,h as x,H as f,b as Q,F as C,u as W}from"./@vue-a481fc63.js";import{u as Y,b as J}from"./vue-router-e5a2430e.js";import{H as K,I as X,_ as S,R as Z,S as ee}from"./index-757c547c.js";import{b as oe}from"./formatTime-4210fcd1.js";import{i as te,z as ne,u as se}from"./@vicons-1a3558c6.js";import{T as ae,j as M,o as le,M as ce,e as _e,O as ie,L as ue,F as re,Q as pe,f as me,g as de,I as fe,G as ge}from"./naive-ui-d8de3dda.js";import{_ as ve}from"./post-skeleton-c82f8a59.js";import{_ as we}from"./main-nav.vue_vue_type_style_index_0_lang-048bd56b.js";import{u as he}from"./vuex-44de225f.js";import"./axios-4a70c6fc.js";/* empty css */import"./seemly-76b7b838.js";import"./vueuc-39372edb.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";import"./moment-2ab8298d.js";const ke={class:"follow-item"},ye={class:"nickname-wrap"},be={class:"username-wrap"},Fe={class:"user-info"},$e={class:"info-item"},ze={class:"info-item"},Te={class:"item-header-extra"},Ie=B({__name:"follow-item",props:{contact:{}},setup(T){const s=T,m=ae();Y();const n=e=>()=>x(M,null,{default:()=>x(e)}),c=()=>{m.success({title:"提示",content:"确定"+(s.contact.is_following?"取消关注":"关注")+"该用户吗?",positiveText:"确定",negativeText:"取消",onPositiveClick:()=>{s.contact.is_following?K({user_id:s.contact.user_id}).then(e=>{window.$message.success("取消关注成功"),s.contact.is_following=!1}).catch(e=>{console.log(e)}):X({user_id:s.contact.user_id}).then(e=>{window.$message.success("关注成功"),s.contact.is_following=!0}).catch(e=>{console.log(e)})}})},y=e=>{switch(e){case"follow":case"unfollow":c();break}},w=L(()=>{let e=[];return s.contact.is_following?e.push({label:"取消关注",key:"unfollow",icon:n(ne)}):e.push({label:"关注",key:"follow",icon:n(se)}),e});return(e,i)=>{const u=le,d=E("router-link"),b=ce,F=_e,g=ie,$=ue;return l(),r("div",ke,[o($,{"content-indented":""},{avatar:t(()=>[o(u,{size:54,src:e.contact.avatar},null,8,["src"])]),header:t(()=>[p("span",ye,[o(d,{onClick:i[0]||(i[0]=G(()=>{},["stop"])),class:"username-link",to:{name:"user",query:{s:e.contact.username}}},{default:t(()=>[q(k(e.contact.nickname),1)]),_:1},8,["to"])]),p("span",be," @"+k(e.contact.username),1),e.contact.is_following?(l(),N(b,{key:0,class:"top-tag",type:"success",size:"small",round:""},{default:t(()=>[q(" 已关注 ")]),_:1})):z("",!0),p("div",Fe,[p("span",$e," UID. "+k(e.contact.user_id),1),p("span",ze,k(v(oe)(e.contact.created_on))+" 加入 ",1)])]),"header-extra":t(()=>[p("div",Te,[o(g,{placement:"bottom-end",trigger:"click",size:"small",options:w.value,onSelect:y},{default:t(()=>[o(F,{quaternary:"",circle:""},{icon:t(()=>[o(v(M),null,{default:t(()=>[o(v(te))]),_:1})]),_:1})]),_:1},8,["options"])])]),_:1})])}}});const Ue=S(Ie,[["__scopeId","data-v-64f1874c"]]),qe={key:0,class:"skeleton-wrap"},xe={key:1},Ce={key:0,class:"empty-wrap"},Me={key:0,class:"pagination-wrap"},Be=B({__name:"Following",setup(T){const s=he(),m=J(),n=f(!1),c=f([]),y=m.query.n||"粉丝详情",w=m.query.s||"",e=f(m.query.t||"follows"),i=f(+m.query.p||1),u=f(20),d=f(0),b=_=>{i.value=_,g()},F=_=>{e.value=_,g()},g=()=>{e.value==="follows"?$(w):e.value==="followings"&&D(w)},$=(_,h=!1)=>{c.value.length===0&&(n.value=!0),Z({username:_,page:i.value,page_size:u.value}).then(a=>{n.value=!1,c.value=a.list||[],d.value=Math.ceil(a.pager.total_rows/u.value),h&&setTimeout(()=>{window.scrollTo(0,99999)},50)}).catch(a=>{n.value=!1})},D=(_,h=!1)=>{c.value.length===0&&(n.value=!0),ee({username:_,page:i.value,page_size:u.value}).then(a=>{n.value=!1,c.value=a.list||[],d.value=Math.ceil(a.pager.total_rows/u.value),h&&setTimeout(()=>{window.scrollTo(0,99999)},50)}).catch(a=>{n.value=!1})};return Q(()=>{g()}),(_,h)=>{const a=we,I=me,O=de,P=ve,R=fe,V=Ue,H=ge,j=re,A=pe;return l(),r(C,null,[p("div",null,[o(a,{title:v(y),back:!0},null,8,["title"]),o(j,{class:"main-content-wrap",bordered:""},{default:t(()=>[o(O,{type:"line",animated:"","default-value":e.value,"onUpdate:value":F},{default:t(()=>[o(I,{name:"follows",tab:"正在关注"}),o(I,{name:"followings",tab:"我的粉丝"})]),_:1},8,["default-value"]),n.value?(l(),r("div",qe,[o(P,{num:u.value},null,8,["num"])])):(l(),r("div",xe,[c.value.length===0?(l(),r("div",Ce,[o(R,{size:"large",description:"暂无数据"})])):z("",!0),(l(!0),r(C,null,W(c.value,U=>(l(),N(H,{key:U.user_id},{default:t(()=>[o(V,{contact:U},null,8,["contact"])]),_:2},1024))),128))]))]),_:1})]),d.value>0?(l(),r("div",Me,[o(A,{page:i.value,"onUpdate:page":b,"page-slot":v(s).state.collapsedRight?5:8,"page-count":d.value},null,8,["page","page-slot","page-count"])])):z("",!0)],64)}}});const ao=S(Be,[["__scopeId","data-v-1f0f223d"]]);export{ao as default}; diff --git a/web/dist/assets/Home-e4808a73.js b/web/dist/assets/Home-d28a50f3.js similarity index 98% rename from web/dist/assets/Home-e4808a73.js rename to web/dist/assets/Home-d28a50f3.js index 6358324c..78f5417e 100644 --- a/web/dist/assets/Home-e4808a73.js +++ b/web/dist/assets/Home-d28a50f3.js @@ -1 +1 @@ -import{_ as Ue,a as Ve}from"./post-item.vue_vue_type_style_index_0_lang-3755d97f.js";import{_ as Ee}from"./post-skeleton-bae19eed.js";import{d as _e,H as i,c as ce,b as ge,e as c,f as y,bf as V,j as C,k as a,w as n,q as G,Y as b,y as ve,A as M,x as X,F as pe,u as de,E as Te}from"./@vue-a481fc63.js";import{u as fe}from"./vuex-44de225f.js";import{l as me}from"./lodash-e0b37ac3.js";import{g as Ne,a as xe,c as Ge,b as Re,d as Oe,e as Pe,_ as Fe}from"./index-7ab58e72.js";import{p as Le}from"./content-77341dc8.js";import{V as U,P as H}from"./IEnum-5453a777.js";import{I as Ye,V as qe,A as Me,d as Se,E as Ke}from"./@vicons-33f992ab.js";import{o as he,v as Qe,j as We,e as je,w as He,x as Ze,y as Je,z as Xe,A as $e,B as et,C as tt,a as we,D as at,E as st,F as ot,G as nt,l as lt,H as it,I as rt,k as ut}from"./naive-ui-d8de3dda.js";import{_ as ct}from"./main-nav.vue_vue_type_style_index_0_lang-3b4e457a.js";import{b as pt,u as dt}from"./vue-router-e5a2430e.js";import{W as vt}from"./v3-infinite-loading-2c58ec2f.js";import{S as mt}from"./@opentiny-d73a2d67.js";import"./formatTime-4210fcd1.js";import"./moment-2ab8298d.js";import"./copy-to-clipboard-4ef7d3eb.js";import"./@babel-725317a4.js";import"./toggle-selection-93f4ad84.js";import"./axios-4a70c6fc.js";/* empty css */import"./seemly-76b7b838.js";import"./vueuc-39372edb.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";import"./paopao-video-player-2fe58954.js";import"./vue-1e3b54ec.js";import"./xss-a5544f63.js";import"./cssfilter-af71ba68.js";const _t=Z=>{const O=new FileReader,z=r=>["application/zip","application/x-zip","application/octet-stream","application/x-zip-compressed"].includes(r),E=()=>{const r=new Uint8Array(O.result).subarray(0,4);let T="";for(let _=0;_{O.onloadend=()=>{const _=Z.type;r(_===""||_==="application/octet-stream"?E():z(_))},O.readAsArrayBuffer(Z.slice(0,4))})},gt={key:0,class:"compose-wrap"},ft={class:"compose-line"},ht={class:"compose-user"},wt={class:"compose-line compose-options"},yt={class:"attachment"},At={class:"submit-wrap"},kt={class:"attachment-list-wrap"},bt={key:0,class:"attachment-price-wrap"},Ct=C("span",null," 附件价格¥",-1),zt={key:0,class:"eye-wrap"},It={key:1,class:"link-wrap"},Dt={key:1,class:"compose-wrap"},Bt=C("div",{class:"login-wrap"},[C("span",{class:"login-banner"}," 登录后,精彩更多")],-1),Ut={key:0,class:"login-only-wrap"},Vt={key:1,class:"login-wrap"},Et=_e({__name:"compose",emits:["post-success"],setup(Z,{emit:O}){const z=fe(),E=i([]),r=i(!1),T=i(!1),_=i(!1),R=i(!1),g=i(""),A=i([]),x=i(),F=i(0),f=i("public/image"),u=i([]),h=i([]),B=i([]),I=i([]),L=i(U.PUBLIC),P=i(U.PUBLIC),Y="true".toLowerCase()==="true",S=+"400",K=i("true".toLowerCase()==="true"),q=i("true".toLowerCase()==="true"),J=i("true".toLowerCase()==="true"),$=i("false".toLowerCase()==="true"),W=i("true".toLowerCase()==="true"),ee="/v1/attachment",l=i(),d=ce(()=>{let e=[{value:U.PUBLIC,label:"公开"},{value:U.PRIVATE,label:"私密"},{value:U.Following,label:"关注可见"}];return Y&&e.push({value:U.FRIEND,label:"好友可见"}),e}),N=()=>{_.value=!_.value,_.value&&R.value&&(R.value=!1)},k=()=>{R.value=!R.value,R.value&&_.value&&(_.value=!1)},D=me.debounce(e=>{Ne({k:e}).then(t=>{let o=[];t.suggest.map(s=>{o.push({label:s,value:s})}),E.value=o,r.value=!1}).catch(t=>{r.value=!1})},200),te=me.debounce(e=>{xe({k:e}).then(t=>{let o=[];t.suggest.map(s=>{o.push({label:s,value:s})}),E.value=o,r.value=!1}).catch(t=>{r.value=!1})},200),ae=(e,t)=>{r.value||(r.value=!0,t==="@"?D(e):te(e))},se=e=>{e.length>S?g.value=e.substring(0,S):g.value=e},j=e=>{f.value=e},oe=e=>{for(let v=0;v30&&(e[v].name=o.substring(0,18)+"..."+o.substring(o.length-9)+"."+s)}u.value=e},ne=async e=>{var t,o,s,v,p;return f.value==="public/image"&&!["image/png","image/jpg","image/jpeg","image/gif"].includes((t=e.file.file)==null?void 0:t.type)?(window.$message.warning("图片仅允许 png/jpg/gif 格式"),!1):f.value==="image"&&((o=e.file.file)==null?void 0:o.size)>10485760?(window.$message.warning("图片大小不能超过10MB"),!1):f.value==="public/video"&&!["video/mp4","video/quicktime"].includes((s=e.file.file)==null?void 0:s.type)?(window.$message.warning("视频仅允许 mp4/mov 格式"),!1):f.value==="public/video"&&((v=e.file.file)==null?void 0:v.size)>104857600?(window.$message.warning("视频大小不能超过100MB"),!1):f.value==="attachment"&&!await _t(e.file.file)?(window.$message.warning("附件仅允许 zip 格式"),!1):f.value==="attachment"&&((p=e.file.file)==null?void 0:p.size)>104857600?(window.$message.warning("附件大小不能超过100MB"),!1):!0},le=({file:e,event:t})=>{var o;try{let s=JSON.parse((o=t.target)==null?void 0:o.response);s.code===0&&(f.value==="public/image"&&h.value.push({id:e.id,content:s.data.content}),f.value==="public/video"&&B.value.push({id:e.id,content:s.data.content}),f.value==="attachment"&&I.value.push({id:e.id,content:s.data.content}))}catch{window.$message.error("上传失败")}},ie=({file:e,event:t})=>{var o;try{let s=JSON.parse((o=t.target)==null?void 0:o.response);if(s.code!==0){let v=s.msg||"上传失败";s.details&&s.details.length>0&&s.details.map(p=>{v+=":"+p}),window.$message.error(v)}}catch{window.$message.error("上传失败")}},re=({file:e})=>{let t=h.value.findIndex(o=>o.id===e.id);t>-1&&h.value.splice(t,1),t=B.value.findIndex(o=>o.id===e.id),t>-1&&B.value.splice(t,1),t=I.value.findIndex(o=>o.id===e.id),t>-1&&I.value.splice(t,1)},ue=()=>{if(g.value.trim().length===0){window.$message.warning("请输入内容哦");return}let{tags:e,users:t}=Le(g.value);const o=[];let s=100;o.push({content:g.value,type:H.TEXT,sort:s}),h.value.map(p=>{s++,o.push({content:p.content,type:H.IMAGEURL,sort:s})}),B.value.map(p=>{s++,o.push({content:p.content,type:H.VIDEOURL,sort:s})}),I.value.map(p=>{s++,o.push({content:p.content,type:H.ATTACHMENT,sort:s})}),A.value.length>0&&A.value.map(p=>{s++,o.push({content:p,type:H.LINKURL,sort:s})}),T.value=!0;let v=L.value;v==U.Following&&(v=U.PUBLIC),Ge({contents:o,tags:Array.from(new Set(e)),users:Array.from(new Set(t)),attachment_price:+F.value*100,visibility:v}).then(p=>{var Q;window.$message.success("发布成功"),T.value=!1,O("post-success",p),_.value=!1,R.value=!1,(Q=x.value)==null||Q.clear(),u.value=[],g.value="",A.value=[],h.value=[],B.value=[],I.value=[],L.value=P.value}).catch(p=>{T.value=!1})},w=e=>{z.commit("triggerAuth",!0),z.commit("triggerAuthKey",e)};return ge(()=>{const e="friend".toLowerCase();Y&&e==="friend"?P.value=U.FRIEND:e==="following"?P.value=U.Following:e==="public"?P.value=U.PUBLIC:P.value=U.PRIVATE,L.value=P.value,l.value="Bearer "+localStorage.getItem("PAOPAO_TOKEN")}),(e,t)=>{const o=he,s=Qe,v=We,p=je,Q=He,ye=Ze,Ae=Je,ke=Xe,be=$e,Ce=et,ze=tt,Ie=we,De=at,Be=st;return c(),y("div",null,[V(z).state.userInfo.id>0?(c(),y("div",gt,[C("div",ft,[C("div",ht,[a(o,{round:"",size:30,src:V(z).state.userInfo.avatar},null,8,["src"])]),a(s,{type:"textarea",size:"large",autosize:"",bordered:!1,loading:r.value,value:g.value,prefix:["@","#"],options:E.value,onSearch:ae,"onUpdate:value":se,placeholder:"说说您的新鲜事..."},null,8,["loading","value","options"])]),a(Ce,{ref_key:"uploadRef",ref:x,abstract:"","list-type":"image",multiple:!0,max:9,action:ee,headers:{Authorization:l.value},data:{type:f.value},"file-list":u.value,onBeforeUpload:ne,onFinish:le,onError:ie,onRemove:re,"onUpdate:fileList":oe},{default:n(()=>[C("div",wt,[C("div",yt,[a(Q,{abstract:""},{default:n(({handleClick:m})=>[a(p,{disabled:u.value.length>0&&f.value==="public/video"||u.value.length===9,onClick:()=>{j("public/image"),m()},quaternary:"",circle:"",type:"primary"},{icon:n(()=>[a(v,{size:"20",color:"var(--primary-color)"},{default:n(()=>[a(V(Ye))]),_:1})]),_:2},1032,["disabled","onClick"])]),_:1}),q.value?(c(),G(Q,{key:0,abstract:""},{default:n(({handleClick:m})=>[a(p,{disabled:u.value.length>0&&f.value!=="public/video"||u.value.length===9,onClick:()=>{j("public/video"),m()},quaternary:"",circle:"",type:"primary"},{icon:n(()=>[a(v,{size:"20",color:"var(--primary-color)"},{default:n(()=>[a(V(qe))]),_:1})]),_:2},1032,["disabled","onClick"])]),_:1})):b("",!0),J.value?(c(),G(Q,{key:1,abstract:""},{default:n(({handleClick:m})=>[a(p,{disabled:u.value.length>0&&f.value==="public/video"||u.value.length===9,onClick:()=>{j("attachment"),m()},quaternary:"",circle:"",type:"primary"},{icon:n(()=>[a(v,{size:"20",color:"var(--primary-color)"},{default:n(()=>[a(V(Me))]),_:1})]),_:2},1032,["disabled","onClick"])]),_:1})):b("",!0),a(p,{quaternary:"",circle:"",type:"primary",onClick:ve(N,["stop"])},{icon:n(()=>[a(v,{size:"20",color:"var(--primary-color)"},{default:n(()=>[a(V(Se))]),_:1})]),_:1},8,["onClick"]),W.value?(c(),G(p,{key:2,quaternary:"",circle:"",type:"primary",onClick:ve(k,["stop"])},{icon:n(()=>[a(v,{size:"20",color:"var(--primary-color)"},{default:n(()=>[a(V(Ke))]),_:1})]),_:1},8,["onClick"])):b("",!0)]),C("div",At,[a(Ae,{trigger:"hover",placement:"bottom"},{trigger:n(()=>[a(ye,{class:"text-statistic",type:"circle","show-indicator":!1,status:"success","stroke-width":10,percentage:g.value.length/V(S)*100},null,8,["percentage"])]),default:n(()=>[M(" "+X(g.value.length)+" / "+X(V(S)),1)]),_:1}),a(p,{loading:T.value,onClick:ue,type:"primary",secondary:"",round:""},{default:n(()=>[M(" 发布 ")]),_:1},8,["loading"])])]),C("div",kt,[a(ke),I.value.length>0?(c(),y("div",bt,[$.value?(c(),G(be,{key:0,value:F.value,"onUpdate:value":t[0]||(t[0]=m=>F.value=m),min:0,max:1e5,placeholder:"请输入附件价格,0为免费附件"},{prefix:n(()=>[Ct]),_:1},8,["value"])):b("",!0)])):b("",!0)])]),_:1},8,["headers","data","file-list"]),R.value?(c(),y("div",zt,[a(De,{value:L.value,"onUpdate:value":t[1]||(t[1]=m=>L.value=m),name:"radiogroup"},{default:n(()=>[a(Ie,null,{default:n(()=>[(c(!0),y(pe,null,de(d.value,m=>(c(),G(ze,{key:m.value,value:m.value,label:m.label},null,8,["value","label"]))),128))]),_:1})]),_:1},8,["value"])])):b("",!0),_.value?(c(),y("div",It,[a(Be,{value:A.value,"onUpdate:value":t[2]||(t[2]=m=>A.value=m),placeholder:"请输入以http(s)://开头的链接",min:0,max:3},{"create-button-default":n(()=>[M(" 创建链接 ")]),_:1},8,["value"])])):b("",!0)])):(c(),y("div",Dt,[Bt,K.value?b("",!0):(c(),y("div",Ut,[a(p,{strong:"",secondary:"",round:"",type:"primary",onClick:t[3]||(t[3]=m=>w("signin"))},{default:n(()=>[M(" 登录 ")]),_:1})])),K.value?(c(),y("div",Vt,[a(p,{strong:"",secondary:"",round:"",type:"primary",onClick:t[4]||(t[4]=m=>w("signin"))},{default:n(()=>[M(" 登录 ")]),_:1}),a(p,{strong:"",secondary:"",round:"",type:"info",onClick:t[5]||(t[5]=m=>w("signup"))},{default:n(()=>[M(" 注册 ")]),_:1})])):b("",!0)]))])}}});const Tt="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGAAAABgCAYAAADimHc4AAAACXBIWXMAABYlAAAWJQFJUiTwAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAA1lSURBVHgB7Z17cFTVHcd/59y7uze7ISSCqBBIeGmFIGilrVJUwBcw0jKgnc6Ijsr0D8eO1qrt+Kio9fEHRR1n7ExH8IEzdmgZWluxPnhYijJCkZQAtoSQmARaHk2A3WSzu/ec/n6XJpLdu5u9u/eVx2dmJ/u4m909v3N+v/P7nhcDn7JunVSm3xiv0kLabCnERGBQLoGNlQDnM5D0dzQDUOlavJ/C+0cA2BF8rR6fasMn2xnnhzri8U++Ua61MMZS4EMY+AQppXo4lpqjKHyOkHIWfrVrwE4k+wCYrFU433zsJGy7cgzrAB/gqQHq6mSwdCIsk1LchLV4cXeNdgUJbwHjG2NReK9mFIuCR3higINnuqaqqvpTKWGZq4VuguG+JLymBPiacUG2E1zGNQOsWCH5nY/ot+IHPoS+/ErwIRg/doGivFAdYuvBJVwxQEMstYgz9iLWtgnQD2AM6oDzFW4YwlEDNES7LuNcWe3XGt838lPGlMerS9gWcAhHDHDwpCxTNLEKa9I9MADAQloZjfKnnAjWthvgUDQ5D7t6b6C7qYQBBLklBvyBqhK2CWyEg01QkG2I6Y9zzj8eaIVPYI+tRkjxcWOn/hj9VrAJW1rA4TZZDiH9ffx334FBAGbVn8k4WzC+grVDkRRtSezTT5EhsWewFD6BWftVEBTbG7vkpVAkRbWAxjPJOVLhG/GuBoOTOAd+Q1WY/Q0KpOAW0ByXC4TCP4TBW/iEpoPY8lVcLoICKagF0AfqQvwRhugBldeF1RrbaPFt1g3QcDo5G1S+2WsNx28YmhLjN4wvYVutvM+SASjgqor6dxjcbicXcabwK1DCOJDvG/KOAdTVVLn6Oxgq/FxoIORGo1ueJ3kZwEg8qJ/PYAoMkRPsolYzTW7MN1nLywVRhoup+DMwRN5geaGIpzzb53V9XYDazvUoL3wEQ1gGg/I8VFI357wm14t1x2Rp6TD5GTarGhjCOow1pzpYzeQR7HS2S3J2JUtLxZMkQoEP0LGft7s9BbV4OxjVobVTwOmUhIjCYPGYINxWGQLfIeVYJSxW4b3l2S7J2gLqzyTnKgq3VXotBCr4v/w7ARuOJOBYl8h63cMXl8DskQHwI6rgl40tZXtNX8v6JkV5RlJ64SH/PKPDy/Wd0NIp8rrWrwZIcn0N/plp9pppV6nhTGopFv7V4CGbjiXh0X2xvArf7zAckm2Kp24xe83UAFzlT4KHvI8uh2p+sv+XfQ9S8hfNcoOMJ4za72Gvh4Lsbw7Hs75+kcahssS2ASnXwDKdeMcj+tL05zMtovCfgUfEsFfzEtZ83ST0lKkM7p9UAq9eXgpXlPdbHfDh9Cd6GaDhVOJb6Ps9m0LyTnMXnExklj7V+JdmRGDeqAAovpnNah0jFnTJXnJOLwOwoHIXeERbQsD7/0lkPD8qxOHpqWEYGex/bscMkdIfOvdxz6+irBeTruXgEZuOJ02D7v2TtAFT+Aac3V4nZbDnYfedyHBY6OUgy87/Zk7fn1mhwrThA2zcR0KgNK4v63749a9LiQVeTVanoFsf0zOenzvKnsTqBGbQFFsS4mx8qQgy7E0pnsUTqcNN+Gc13TcMsKtVhoGJO8AjjsZ1U/czrayw2t+tG207kYTdbSlDM0ongG1/UkQxWtm8UUHDKK6hsO/TghRatWP8whHDU9fYOEnOMm0mPZ/yAIOygPVC2YqxhHpTR+O5szgy+AGUL+j2TksXzL8gCD8cG4KI6oIh0A01xFPX4b2Pz5Y653PAZ1h1D1TLnz7QAasOdvZZ+OmQMd49moD79kRhT7s7S8m44HONv8YjJqeDhwR5ZmmbuY1cUM3f1VZc4VGceAqNSFKI00hG6+DQAFvQF+Gjm8BDRpj4X6qVdgpx5PPpc8r6cDEUP37dEDfEQCfBpGz2OikVtbo9XgmhIHjJSEy2yOe3J3vX+h0nk7C0iIEW0o1uviAAM88L9NKPTuPn7D2dgs1YyDuztJpXGzqN91wyTAGHYNNPxas417RrwQfMMNF3PsIC6u46WoHixxIcJXsF5YvFY0IZ4h0F91kjAvDEpWF4FrNsyrbToRb4chZdyi6CocBsrovUJPABZoMpFEzf/qoLrECu5tFLwnBnlWYaW9KhRO+FmrCpwkou8L2jzsUDKdhEzhkfDj6AFE5yGen8CQtg+8n8/fHdWPAzz7OWP5ALfHpK2DQ+UO/IqVaA9aOcYzSoAB9AbuP2cZn+nn78yn91wobWvlvCtDIFFl5UWDwjI9xVnTnpj8ahdzvUNdVBjuWYkfnCBRHkhr5tUnvJCK83dcGD/4gZmlG2GnlrkTMjrjs/YNoKax0yANa58/HXstHgEOQ69p/WLb0nkiMDq4/q8MyX5ls80NsoF6BbMZgZl6bBOAFKEZXq/3cdsZ3fo8t4q8laAC0GKrjNx53pu7c6NzFgNHdKgl7f4nw26RZWs/K8kaA6psDFnOxAu0zEQd2a08oOcIAyN1RFl1hS6ZBSwCClnt1pCsaBzVSGeUYApoyTuorFshV1/kIa2Dzs5ZwrN+fzL6bg96Ws2SGOYBBmzQyk7QagwY50A1BLvm9SSVEjUSQXbzIJtgsvDGIypxhjAfUx86B5Cn35/ZNLwDdIdgSDsDgODjDdRNshaaHYbuK6FvOeFfUmSHRbNb0UlmNCZWZkkqtplMwvYMU/hN+bNYMDkLRgJnK93hiHE4nCunWky9TlkVcsGh2Ehy42b2mkLfmof9DGhRSnwAHox1NBpENdul/s67BshM/bkrCmKZ739eS3bzGRJagV7m73xwaKKPS2c4Wr9eAQ5JezqYw/39sBe0/1XRAkR7+JBf/8l9Yn65K2ZCYt+MUNMY4uCCC+DRyCWgHN5wyYZBskcj2GLYHGcUmyOJU8uxqh+0ZGIgHux3tisL61MEWS5GgakEmn1ictAEcdPlHHaVpTo4Nz8GlE6d4JGg5umLsPCozdY7mUO5CxyE3ZNTWdAvPraZJIGxqb5gqNDHk6405Wa1oLR0EIo5r8KzgIzbshI/TV/aSCp4FxO9cFkAs0a4Fmk4BdRcoPaV6Q8dUEyE/BYW7GeLDiUppkW1yGfHYilbXEyCwrL2So01YYq6U/hgGYgM3gApQbvDKjFBZh78TqfFsKpg9iEkXjuFa1GV/KUpwbZW5kS00RdUtVp0i5MTmXpIDl4zVj0Jzk489xgOVQTAezXinV3CuwxtNADeUVhWTQNAMifbYFUeHtjGsZDIHR+TEKfA76osMd+ga8eyu4BBXAkjEh40Y1lOaHdk9RpN4LzeGxI0juP5OZuFFMMOueuoaEtWPY2c3De2o8Y/wDKYVrBjgXqtmVJQrewHY+Mln0MTni3cxoAyZ7NnbqqQZRDdY6JU17BSV6ZhOvrqzwcM0Bg2QsqrzX/bDHADWMJRiDtTBAIKnDLPcg90PdYs8QsPrcHXh7OUKeSv0KBgBU+KQ3mW1tQNPQXV0LkIYI8DXnPu5lgKphoX2oju6CfgoFc5pU+8Ae8xX2FNhpDYBXoNiya2LaGQVq5kViJTqq30I/4wvUd+79Ipp1bUC3LhXxcKhUKvBC+nMZfbHqEoX2hWuAfgbV+FwLM36EuccMDxd4Swl1E0NqxnkEGQZAfUJIKX8CAwQKulTz51/o7RR8qcoVZs+bZiMTIuq7/TkWdENC3HNTI5a1I7vBSr3drPYTWdukiCfvYZpaCz7EWDRxNPvrNBS6GEfjSAD0x9YG7Imsr0AOGmL6a349BYMG5zfgQA1NACPNaAzW9smliiH4FaobOQFN7p4QVh7O9nrOr2kcRVIi9rEBeCCDO7C9sSi7OtfRJ33Wk8ZOORc1Is/3juuPcMav7+vIkz4lQdr3Eg3wBAxhCcng8XzOm8lLkx0fVp/Df7kDhsgPKXe8pfHn87k071BFG1LLkNzDQFbBENmRsL89wWddnuf5MkPb19tLPKWnvjl5WGh/vm+wNCxk/GPG5w+0cQObSNJ5MlYKn7A8LkcnRHDOvwdD9EKRfGkhh/kUNDBKZ6VINMJQSzBIMskXjouwd6EAisoXmzrkdwUI2tp+0B5jRS7Z6rkx51LU1ABqchR0KPLDIANbfxP99mIKn7DvKMMgHXEySE7Tw35+e0KZf7kfjjIk6EzF6rAyazBkzJThvom/1Y7CJ2zXDJs65TxdiJdQRR1Qp26gy2lBbefOvo4ksYrt08NI/+iI8atIhoUBAg4nrtY726faXfiEo6o5KqlzpNR/iR/j6VkEhYJDs7sCUrk72+kXduDKsEVjh1wipFjRX9wSDsceYpw9UKWxP4PDuDJDtTrM1k+IKNMYcDqbwLdjzfTdUE74wRsl7GI3Cp/wZOCOtsk3dmqXxnCn1we/JLEU3kZ5ZWVViLmez3g6cko7tkdK9YVoiAWYQyxz8fvQksA/4Kd90HFIWVtTwzzb2sU3O2q0tspwYjjMBi5wCFROZ4zdCPZ9P+zIyG1Msu2Yq2wZH1G30Pos8AG+3dKENrdujMcr0UNda+wuCFAuGFTggNAkCYw2mboIvp5WQzv6HMV3NePzx7GgmwVAO63DTUByW62mNd1mLEb0H/8DkOAXi0+nceAAAAAASUVORK5CYII=",Nt={class:"slide-bar-item"},xt={class:"slide-bar-item-title slide-bar-user-link"},Gt={key:1,class:"skeleton-wrap"},Rt={key:0,class:"empty-wrap"},Ot={key:1},Pt={key:2},Ft={class:"load-more-wrap"},Lt={class:"load-more-spinner"},Yt=_e({__name:"Home",setup(Z){const O="true".toLowerCase()==="true",z="true".toLowerCase()==="true",E=fe(),r=pt(),T=dt(),_=i(9),R=i(8),g=i([{title:"最新动态",style:1,username:"",avatar:Tt,show:!0},{title:"",style:1,username:"",avatar:"",show:!0},{title:"",style:1,username:"",avatar:"",show:!0},{title:"",style:1,username:"",avatar:"",show:!0},{title:"",style:1,username:"",avatar:"",show:!0},{title:"",style:1,username:"",avatar:"",show:!0},{title:"",style:1,username:"",avatar:"",show:!0},{title:"",style:1,username:"",avatar:"",show:!0},{title:"",style:1,username:"",avatar:"",show:!0},{title:"",style:1,username:"",avatar:"",show:!0}]),A=i(!1),x=i(!1),F=i(1),f=i(""),u=i([]),h=i(1),B=i(20),I=i(0),L=ce(()=>{let l="泡泡广场";return r.query&&r.query.q&&(r.query.t&&r.query.t==="tag"?l="#"+decodeURIComponent(r.query.q):l="搜索: "+decodeURIComponent(r.query.q)),l}),P=ce(()=>O&&z&&E.state.desktopModelShow&&E.state.userInfo.id>0),Y=()=>{A.value=!1,x.value=!1,u.value=[],h.value=1,I.value=0},S=(l,d)=>{switch(Y(),F.value=l.style,l.style){case 1:q();break;case 2:q();break;case 21:f.value=l.username,J();break}g.value[d].show=!1},K=()=>{g.value=g.value.slice(0,1),!(!O||!z||E.state.userInfo.id===0)&&Re({page:1,page_size:50}).then(l=>{var d=0;const N=l.list||[];let k=[];for(;d0&&(g.value=g.value.concat(k))}).catch(l=>{console.log(l)})},q=()=>{A.value=!0,Oe({query:r.query.q?decodeURIComponent(r.query.q):null,type:r.query.t,page:h.value,page_size:B.value}).then(l=>{A.value=!1,l.list.length===0&&(x.value=!0),h.value>1?u.value=u.value.concat(l.list):(u.value=l.list,window.scrollTo(0,0)),I.value=Math.ceil(l.pager.total_rows/B.value)}).catch(l=>{A.value=!1,h.value>1&&h.value--})},J=()=>{A.value=!0,Pe({username:f.value,style:"post",page:h.value,page_size:B.value}).then(l=>{A.value=!1,l.list.length===0&&(x.value=!0),h.value>1?u.value=u.value.concat(l.list):(u.value=l.list||[],window.scrollTo(0,0)),I.value=Math.ceil(l.pager.total_rows/B.value)}).catch(l=>{u.value=[],h.value>1&&h.value--,A.value=!1})},$=l=>{if(F.value!=1){T.push({name:"post",query:{id:l.id}});return}let d=[],N=u.value.length;N==B.value&&N--;for(var k=0;k{switch(F.value){case 1:q();break;case 2:q();break;case 21:J();break}},ee=()=>{h.value{Y(),K(),q()}),Te(()=>({path:r.path,query:r.query,refresh:E.state.refresh}),(l,d)=>{if(l.refresh!==d.refresh){Y(),setTimeout(()=>{K(),W()},0);return}d.path!=="/post"&&l.path==="/"&&(Y(),setTimeout(()=>{K(),W()},0))}),(l,d)=>{const N=ct,k=Et,D=nt,te=he,ae=lt,se=it,j=Ee,oe=rt,ne=Ue,le=Ve,ie=ot,re=ut,ue=we;return c(),y("div",null,[a(N,{title:L.value},null,8,["title"]),a(ie,{class:"main-content-wrap",bordered:""},{default:n(()=>[a(D,null,{default:n(()=>[a(k,{onPostSuccess:$})]),_:1}),P.value?(c(),G(D,{key:0},{default:n(()=>[a(V(mt),{modelValue:g.value,"onUpdate:modelValue":d[0]||(d[0]=w=>g.value=w),"wheel-blocks":R.value,"init-blocks":_.value,onClick:S,tag:"div","sub-tag":"div"},{default:n(w=>[C("div",Nt,[a(ae,{value:"1",offset:[-4,48],dot:"",show:w.slotData.show},{default:n(()=>[a(te,{round:"",size:48,src:w.slotData.avatar,class:"slide-bar-item-avatar"},null,8,["src"])]),_:2},1032,["show"]),C("div",xt,[a(se,{"line-clamp":2},{default:n(()=>[M(X(w.slotData.title),1)]),_:2},1024)])])]),_:1},8,["modelValue","wheel-blocks","init-blocks"])]),_:1})):b("",!0),A.value&&u.value.length===0?(c(),y("div",Gt,[a(j,{num:B.value},null,8,["num"])])):b("",!0),C("div",null,[u.value.length===0?(c(),y("div",Rt,[a(oe,{size:"large",description:"暂无数据"})])):b("",!0),V(E).state.desktopModelShow?(c(),y("div",Ot,[(c(!0),y(pe,null,de(u.value,w=>(c(),G(D,{key:w.id},{default:n(()=>[a(ne,{post:w},null,8,["post"])]),_:2},1024))),128))])):(c(),y("div",Pt,[(c(!0),y(pe,null,de(u.value,w=>(c(),G(D,{key:w.id},{default:n(()=>[a(le,{post:w},null,8,["post"])]),_:2},1024))),128))]))])]),_:1}),I.value>0?(c(),G(ue,{key:0,justify:"center"},{default:n(()=>[a(V(vt),{class:"load-more",slots:{complete:"没有更多泡泡了",error:"加载出错"},onInfinite:d[1]||(d[1]=w=>ee())},{spinner:n(()=>[C("div",Ft,[x.value?b("",!0):(c(),G(re,{key:0,size:14})),C("span",Lt,X(x.value?"没有更多泡泡了":"加载更多"),1)])]),_:1})]),_:1})):b("",!0)])}}});const Ia=Fe(Yt,[["__scopeId","data-v-26704746"]]);export{Ia as default}; +import{_ as Ue,a as Ve}from"./post-item.vue_vue_type_style_index_0_lang-cf11e2c5.js";import{_ as Ee}from"./post-skeleton-c82f8a59.js";import{d as _e,H as i,c as ce,b as ge,e as c,f as y,bf as V,j as C,k as a,w as n,q as G,Y as b,y as ve,A as M,x as X,F as pe,u as de,E as Te}from"./@vue-a481fc63.js";import{u as fe}from"./vuex-44de225f.js";import{l as me}from"./lodash-e0b37ac3.js";import{g as Ne,a as xe,c as Ge,b as Re,d as Oe,e as Pe,_ as Fe}from"./index-757c547c.js";import{p as Le}from"./content-d5264b98.js";import{V as U,P as H}from"./IEnum-5453a777.js";import{I as Ye,V as qe,A as Me,d as Se,E as Ke}from"./@vicons-1a3558c6.js";import{o as he,v as Qe,j as We,e as je,w as He,x as Ze,y as Je,z as Xe,A as $e,B as et,C as tt,a as we,D as at,E as st,F as ot,G as nt,l as lt,H as it,I as rt,k as ut}from"./naive-ui-d8de3dda.js";import{_ as ct}from"./main-nav.vue_vue_type_style_index_0_lang-048bd56b.js";import{b as pt,u as dt}from"./vue-router-e5a2430e.js";import{W as vt}from"./v3-infinite-loading-2c58ec2f.js";import{S as mt}from"./@opentiny-d73a2d67.js";import"./formatTime-4210fcd1.js";import"./moment-2ab8298d.js";import"./copy-to-clipboard-4ef7d3eb.js";import"./@babel-725317a4.js";import"./toggle-selection-93f4ad84.js";import"./axios-4a70c6fc.js";/* empty css */import"./seemly-76b7b838.js";import"./vueuc-39372edb.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";import"./paopao-video-player-2fe58954.js";import"./vue-1e3b54ec.js";import"./xss-a5544f63.js";import"./cssfilter-af71ba68.js";const _t=Z=>{const O=new FileReader,z=r=>["application/zip","application/x-zip","application/octet-stream","application/x-zip-compressed"].includes(r),E=()=>{const r=new Uint8Array(O.result).subarray(0,4);let T="";for(let _=0;_{O.onloadend=()=>{const _=Z.type;r(_===""||_==="application/octet-stream"?E():z(_))},O.readAsArrayBuffer(Z.slice(0,4))})},gt={key:0,class:"compose-wrap"},ft={class:"compose-line"},ht={class:"compose-user"},wt={class:"compose-line compose-options"},yt={class:"attachment"},At={class:"submit-wrap"},kt={class:"attachment-list-wrap"},bt={key:0,class:"attachment-price-wrap"},Ct=C("span",null," 附件价格¥",-1),zt={key:0,class:"eye-wrap"},It={key:1,class:"link-wrap"},Dt={key:1,class:"compose-wrap"},Bt=C("div",{class:"login-wrap"},[C("span",{class:"login-banner"}," 登录后,精彩更多")],-1),Ut={key:0,class:"login-only-wrap"},Vt={key:1,class:"login-wrap"},Et=_e({__name:"compose",emits:["post-success"],setup(Z,{emit:O}){const z=fe(),E=i([]),r=i(!1),T=i(!1),_=i(!1),R=i(!1),g=i(""),A=i([]),x=i(),F=i(0),f=i("public/image"),u=i([]),h=i([]),B=i([]),I=i([]),L=i(U.PUBLIC),P=i(U.PUBLIC),Y="true".toLowerCase()==="true",S=+"400",K=i("true".toLowerCase()==="true"),q=i("true".toLowerCase()==="true"),J=i("true".toLowerCase()==="true"),$=i("false".toLowerCase()==="true"),W=i("true".toLowerCase()==="true"),ee="/v1/attachment",l=i(),d=ce(()=>{let e=[{value:U.PUBLIC,label:"公开"},{value:U.PRIVATE,label:"私密"},{value:U.Following,label:"关注可见"}];return Y&&e.push({value:U.FRIEND,label:"好友可见"}),e}),N=()=>{_.value=!_.value,_.value&&R.value&&(R.value=!1)},k=()=>{R.value=!R.value,R.value&&_.value&&(_.value=!1)},D=me.debounce(e=>{Ne({k:e}).then(t=>{let o=[];t.suggest.map(s=>{o.push({label:s,value:s})}),E.value=o,r.value=!1}).catch(t=>{r.value=!1})},200),te=me.debounce(e=>{xe({k:e}).then(t=>{let o=[];t.suggest.map(s=>{o.push({label:s,value:s})}),E.value=o,r.value=!1}).catch(t=>{r.value=!1})},200),ae=(e,t)=>{r.value||(r.value=!0,t==="@"?D(e):te(e))},se=e=>{e.length>S?g.value=e.substring(0,S):g.value=e},j=e=>{f.value=e},oe=e=>{for(let v=0;v30&&(e[v].name=o.substring(0,18)+"..."+o.substring(o.length-9)+"."+s)}u.value=e},ne=async e=>{var t,o,s,v,p;return f.value==="public/image"&&!["image/png","image/jpg","image/jpeg","image/gif"].includes((t=e.file.file)==null?void 0:t.type)?(window.$message.warning("图片仅允许 png/jpg/gif 格式"),!1):f.value==="image"&&((o=e.file.file)==null?void 0:o.size)>10485760?(window.$message.warning("图片大小不能超过10MB"),!1):f.value==="public/video"&&!["video/mp4","video/quicktime"].includes((s=e.file.file)==null?void 0:s.type)?(window.$message.warning("视频仅允许 mp4/mov 格式"),!1):f.value==="public/video"&&((v=e.file.file)==null?void 0:v.size)>104857600?(window.$message.warning("视频大小不能超过100MB"),!1):f.value==="attachment"&&!await _t(e.file.file)?(window.$message.warning("附件仅允许 zip 格式"),!1):f.value==="attachment"&&((p=e.file.file)==null?void 0:p.size)>104857600?(window.$message.warning("附件大小不能超过100MB"),!1):!0},le=({file:e,event:t})=>{var o;try{let s=JSON.parse((o=t.target)==null?void 0:o.response);s.code===0&&(f.value==="public/image"&&h.value.push({id:e.id,content:s.data.content}),f.value==="public/video"&&B.value.push({id:e.id,content:s.data.content}),f.value==="attachment"&&I.value.push({id:e.id,content:s.data.content}))}catch{window.$message.error("上传失败")}},ie=({file:e,event:t})=>{var o;try{let s=JSON.parse((o=t.target)==null?void 0:o.response);if(s.code!==0){let v=s.msg||"上传失败";s.details&&s.details.length>0&&s.details.map(p=>{v+=":"+p}),window.$message.error(v)}}catch{window.$message.error("上传失败")}},re=({file:e})=>{let t=h.value.findIndex(o=>o.id===e.id);t>-1&&h.value.splice(t,1),t=B.value.findIndex(o=>o.id===e.id),t>-1&&B.value.splice(t,1),t=I.value.findIndex(o=>o.id===e.id),t>-1&&I.value.splice(t,1)},ue=()=>{if(g.value.trim().length===0){window.$message.warning("请输入内容哦");return}let{tags:e,users:t}=Le(g.value);const o=[];let s=100;o.push({content:g.value,type:H.TEXT,sort:s}),h.value.map(p=>{s++,o.push({content:p.content,type:H.IMAGEURL,sort:s})}),B.value.map(p=>{s++,o.push({content:p.content,type:H.VIDEOURL,sort:s})}),I.value.map(p=>{s++,o.push({content:p.content,type:H.ATTACHMENT,sort:s})}),A.value.length>0&&A.value.map(p=>{s++,o.push({content:p,type:H.LINKURL,sort:s})}),T.value=!0;let v=L.value;v==U.Following&&(v=U.PUBLIC),Ge({contents:o,tags:Array.from(new Set(e)),users:Array.from(new Set(t)),attachment_price:+F.value*100,visibility:v}).then(p=>{var Q;window.$message.success("发布成功"),T.value=!1,O("post-success",p),_.value=!1,R.value=!1,(Q=x.value)==null||Q.clear(),u.value=[],g.value="",A.value=[],h.value=[],B.value=[],I.value=[],L.value=P.value}).catch(p=>{T.value=!1})},w=e=>{z.commit("triggerAuth",!0),z.commit("triggerAuthKey",e)};return ge(()=>{const e="friend".toLowerCase();Y&&e==="friend"?P.value=U.FRIEND:e==="following"?P.value=U.Following:e==="public"?P.value=U.PUBLIC:P.value=U.PRIVATE,L.value=P.value,l.value="Bearer "+localStorage.getItem("PAOPAO_TOKEN")}),(e,t)=>{const o=he,s=Qe,v=We,p=je,Q=He,ye=Ze,Ae=Je,ke=Xe,be=$e,Ce=et,ze=tt,Ie=we,De=at,Be=st;return c(),y("div",null,[V(z).state.userInfo.id>0?(c(),y("div",gt,[C("div",ft,[C("div",ht,[a(o,{round:"",size:30,src:V(z).state.userInfo.avatar},null,8,["src"])]),a(s,{type:"textarea",size:"large",autosize:"",bordered:!1,loading:r.value,value:g.value,prefix:["@","#"],options:E.value,onSearch:ae,"onUpdate:value":se,placeholder:"说说您的新鲜事..."},null,8,["loading","value","options"])]),a(Ce,{ref_key:"uploadRef",ref:x,abstract:"","list-type":"image",multiple:!0,max:9,action:ee,headers:{Authorization:l.value},data:{type:f.value},"file-list":u.value,onBeforeUpload:ne,onFinish:le,onError:ie,onRemove:re,"onUpdate:fileList":oe},{default:n(()=>[C("div",wt,[C("div",yt,[a(Q,{abstract:""},{default:n(({handleClick:m})=>[a(p,{disabled:u.value.length>0&&f.value==="public/video"||u.value.length===9,onClick:()=>{j("public/image"),m()},quaternary:"",circle:"",type:"primary"},{icon:n(()=>[a(v,{size:"20",color:"var(--primary-color)"},{default:n(()=>[a(V(Ye))]),_:1})]),_:2},1032,["disabled","onClick"])]),_:1}),q.value?(c(),G(Q,{key:0,abstract:""},{default:n(({handleClick:m})=>[a(p,{disabled:u.value.length>0&&f.value!=="public/video"||u.value.length===9,onClick:()=>{j("public/video"),m()},quaternary:"",circle:"",type:"primary"},{icon:n(()=>[a(v,{size:"20",color:"var(--primary-color)"},{default:n(()=>[a(V(qe))]),_:1})]),_:2},1032,["disabled","onClick"])]),_:1})):b("",!0),J.value?(c(),G(Q,{key:1,abstract:""},{default:n(({handleClick:m})=>[a(p,{disabled:u.value.length>0&&f.value==="public/video"||u.value.length===9,onClick:()=>{j("attachment"),m()},quaternary:"",circle:"",type:"primary"},{icon:n(()=>[a(v,{size:"20",color:"var(--primary-color)"},{default:n(()=>[a(V(Me))]),_:1})]),_:2},1032,["disabled","onClick"])]),_:1})):b("",!0),a(p,{quaternary:"",circle:"",type:"primary",onClick:ve(N,["stop"])},{icon:n(()=>[a(v,{size:"20",color:"var(--primary-color)"},{default:n(()=>[a(V(Se))]),_:1})]),_:1},8,["onClick"]),W.value?(c(),G(p,{key:2,quaternary:"",circle:"",type:"primary",onClick:ve(k,["stop"])},{icon:n(()=>[a(v,{size:"20",color:"var(--primary-color)"},{default:n(()=>[a(V(Ke))]),_:1})]),_:1},8,["onClick"])):b("",!0)]),C("div",At,[a(Ae,{trigger:"hover",placement:"bottom"},{trigger:n(()=>[a(ye,{class:"text-statistic",type:"circle","show-indicator":!1,status:"success","stroke-width":10,percentage:g.value.length/V(S)*100},null,8,["percentage"])]),default:n(()=>[M(" "+X(g.value.length)+" / "+X(V(S)),1)]),_:1}),a(p,{loading:T.value,onClick:ue,type:"primary",secondary:"",round:""},{default:n(()=>[M(" 发布 ")]),_:1},8,["loading"])])]),C("div",kt,[a(ke),I.value.length>0?(c(),y("div",bt,[$.value?(c(),G(be,{key:0,value:F.value,"onUpdate:value":t[0]||(t[0]=m=>F.value=m),min:0,max:1e5,placeholder:"请输入附件价格,0为免费附件"},{prefix:n(()=>[Ct]),_:1},8,["value"])):b("",!0)])):b("",!0)])]),_:1},8,["headers","data","file-list"]),R.value?(c(),y("div",zt,[a(De,{value:L.value,"onUpdate:value":t[1]||(t[1]=m=>L.value=m),name:"radiogroup"},{default:n(()=>[a(Ie,null,{default:n(()=>[(c(!0),y(pe,null,de(d.value,m=>(c(),G(ze,{key:m.value,value:m.value,label:m.label},null,8,["value","label"]))),128))]),_:1})]),_:1},8,["value"])])):b("",!0),_.value?(c(),y("div",It,[a(Be,{value:A.value,"onUpdate:value":t[2]||(t[2]=m=>A.value=m),placeholder:"请输入以http(s)://开头的链接",min:0,max:3},{"create-button-default":n(()=>[M(" 创建链接 ")]),_:1},8,["value"])])):b("",!0)])):(c(),y("div",Dt,[Bt,K.value?b("",!0):(c(),y("div",Ut,[a(p,{strong:"",secondary:"",round:"",type:"primary",onClick:t[3]||(t[3]=m=>w("signin"))},{default:n(()=>[M(" 登录 ")]),_:1})])),K.value?(c(),y("div",Vt,[a(p,{strong:"",secondary:"",round:"",type:"primary",onClick:t[4]||(t[4]=m=>w("signin"))},{default:n(()=>[M(" 登录 ")]),_:1}),a(p,{strong:"",secondary:"",round:"",type:"info",onClick:t[5]||(t[5]=m=>w("signup"))},{default:n(()=>[M(" 注册 ")]),_:1})])):b("",!0)]))])}}});const Tt="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGAAAABgCAYAAADimHc4AAAACXBIWXMAABYlAAAWJQFJUiTwAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAA1lSURBVHgB7Z17cFTVHcd/59y7uze7ISSCqBBIeGmFIGilrVJUwBcw0jKgnc6Ijsr0D8eO1qrt+Kio9fEHRR1n7ExH8IEzdmgZWluxPnhYijJCkZQAtoSQmARaHk2A3WSzu/ec/n6XJpLdu5u9u/eVx2dmJ/u4m909v3N+v/P7nhcDn7JunVSm3xiv0kLabCnERGBQLoGNlQDnM5D0dzQDUOlavJ/C+0cA2BF8rR6fasMn2xnnhzri8U++Ua61MMZS4EMY+AQppXo4lpqjKHyOkHIWfrVrwE4k+wCYrFU433zsJGy7cgzrAB/gqQHq6mSwdCIsk1LchLV4cXeNdgUJbwHjG2NReK9mFIuCR3higINnuqaqqvpTKWGZq4VuguG+JLymBPiacUG2E1zGNQOsWCH5nY/ot+IHPoS+/ErwIRg/doGivFAdYuvBJVwxQEMstYgz9iLWtgnQD2AM6oDzFW4YwlEDNES7LuNcWe3XGt838lPGlMerS9gWcAhHDHDwpCxTNLEKa9I9MADAQloZjfKnnAjWthvgUDQ5D7t6b6C7qYQBBLklBvyBqhK2CWyEg01QkG2I6Y9zzj8eaIVPYI+tRkjxcWOn/hj9VrAJW1rA4TZZDiH9ffx334FBAGbVn8k4WzC+grVDkRRtSezTT5EhsWewFD6BWftVEBTbG7vkpVAkRbWAxjPJOVLhG/GuBoOTOAd+Q1WY/Q0KpOAW0ByXC4TCP4TBW/iEpoPY8lVcLoICKagF0AfqQvwRhugBldeF1RrbaPFt1g3QcDo5G1S+2WsNx28YmhLjN4wvYVutvM+SASjgqor6dxjcbicXcabwK1DCOJDvG/KOAdTVVLn6Oxgq/FxoIORGo1ueJ3kZwEg8qJ/PYAoMkRPsolYzTW7MN1nLywVRhoup+DMwRN5geaGIpzzb53V9XYDazvUoL3wEQ1gGg/I8VFI357wm14t1x2Rp6TD5GTarGhjCOow1pzpYzeQR7HS2S3J2JUtLxZMkQoEP0LGft7s9BbV4OxjVobVTwOmUhIjCYPGYINxWGQLfIeVYJSxW4b3l2S7J2gLqzyTnKgq3VXotBCr4v/w7ARuOJOBYl8h63cMXl8DskQHwI6rgl40tZXtNX8v6JkV5RlJ64SH/PKPDy/Wd0NIp8rrWrwZIcn0N/plp9pppV6nhTGopFv7V4CGbjiXh0X2xvArf7zAckm2Kp24xe83UAFzlT4KHvI8uh2p+sv+XfQ9S8hfNcoOMJ4za72Gvh4Lsbw7Hs75+kcahssS2ASnXwDKdeMcj+tL05zMtovCfgUfEsFfzEtZ83ST0lKkM7p9UAq9eXgpXlPdbHfDh9Cd6GaDhVOJb6Ps9m0LyTnMXnExklj7V+JdmRGDeqAAovpnNah0jFnTJXnJOLwOwoHIXeERbQsD7/0lkPD8qxOHpqWEYGex/bscMkdIfOvdxz6+irBeTruXgEZuOJ02D7v2TtAFT+Aac3V4nZbDnYfedyHBY6OUgy87/Zk7fn1mhwrThA2zcR0KgNK4v63749a9LiQVeTVanoFsf0zOenzvKnsTqBGbQFFsS4mx8qQgy7E0pnsUTqcNN+Gc13TcMsKtVhoGJO8AjjsZ1U/czrayw2t+tG207kYTdbSlDM0ongG1/UkQxWtm8UUHDKK6hsO/TghRatWP8whHDU9fYOEnOMm0mPZ/yAIOygPVC2YqxhHpTR+O5szgy+AGUL+j2TksXzL8gCD8cG4KI6oIh0A01xFPX4b2Pz5Y653PAZ1h1D1TLnz7QAasOdvZZ+OmQMd49moD79kRhT7s7S8m44HONv8YjJqeDhwR5ZmmbuY1cUM3f1VZc4VGceAqNSFKI00hG6+DQAFvQF+Gjm8BDRpj4X6qVdgpx5PPpc8r6cDEUP37dEDfEQCfBpGz2OikVtbo9XgmhIHjJSEy2yOe3J3vX+h0nk7C0iIEW0o1uviAAM88L9NKPTuPn7D2dgs1YyDuztJpXGzqN91wyTAGHYNNPxas417RrwQfMMNF3PsIC6u46WoHixxIcJXsF5YvFY0IZ4h0F91kjAvDEpWF4FrNsyrbToRb4chZdyi6CocBsrovUJPABZoMpFEzf/qoLrECu5tFLwnBnlWYaW9KhRO+FmrCpwkou8L2jzsUDKdhEzhkfDj6AFE5yGen8CQtg+8n8/fHdWPAzz7OWP5ALfHpK2DQ+UO/IqVaA9aOcYzSoAB9AbuP2cZn+nn78yn91wobWvlvCtDIFFl5UWDwjI9xVnTnpj8ahdzvUNdVBjuWYkfnCBRHkhr5tUnvJCK83dcGD/4gZmlG2GnlrkTMjrjs/YNoKax0yANa58/HXstHgEOQ69p/WLb0nkiMDq4/q8MyX5ls80NsoF6BbMZgZl6bBOAFKEZXq/3cdsZ3fo8t4q8laAC0GKrjNx53pu7c6NzFgNHdKgl7f4nw26RZWs/K8kaA6psDFnOxAu0zEQd2a08oOcIAyN1RFl1hS6ZBSwCClnt1pCsaBzVSGeUYApoyTuorFshV1/kIa2Dzs5ZwrN+fzL6bg96Ws2SGOYBBmzQyk7QagwY50A1BLvm9SSVEjUSQXbzIJtgsvDGIypxhjAfUx86B5Cn35/ZNLwDdIdgSDsDgODjDdRNshaaHYbuK6FvOeFfUmSHRbNb0UlmNCZWZkkqtplMwvYMU/hN+bNYMDkLRgJnK93hiHE4nCunWky9TlkVcsGh2Ehy42b2mkLfmof9DGhRSnwAHox1NBpENdul/s67BshM/bkrCmKZ739eS3bzGRJagV7m73xwaKKPS2c4Wr9eAQ5JezqYw/39sBe0/1XRAkR7+JBf/8l9Yn65K2ZCYt+MUNMY4uCCC+DRyCWgHN5wyYZBskcj2GLYHGcUmyOJU8uxqh+0ZGIgHux3tisL61MEWS5GgakEmn1ictAEcdPlHHaVpTo4Nz8GlE6d4JGg5umLsPCozdY7mUO5CxyE3ZNTWdAvPraZJIGxqb5gqNDHk6405Wa1oLR0EIo5r8KzgIzbshI/TV/aSCp4FxO9cFkAs0a4Fmk4BdRcoPaV6Q8dUEyE/BYW7GeLDiUppkW1yGfHYilbXEyCwrL2So01YYq6U/hgGYgM3gApQbvDKjFBZh78TqfFsKpg9iEkXjuFa1GV/KUpwbZW5kS00RdUtVp0i5MTmXpIDl4zVj0Jzk489xgOVQTAezXinV3CuwxtNADeUVhWTQNAMifbYFUeHtjGsZDIHR+TEKfA76osMd+ga8eyu4BBXAkjEh40Y1lOaHdk9RpN4LzeGxI0juP5OZuFFMMOueuoaEtWPY2c3De2o8Y/wDKYVrBjgXqtmVJQrewHY+Mln0MTni3cxoAyZ7NnbqqQZRDdY6JU17BSV6ZhOvrqzwcM0Bg2QsqrzX/bDHADWMJRiDtTBAIKnDLPcg90PdYs8QsPrcHXh7OUKeSv0KBgBU+KQ3mW1tQNPQXV0LkIYI8DXnPu5lgKphoX2oju6CfgoFc5pU+8Ae8xX2FNhpDYBXoNiya2LaGQVq5kViJTqq30I/4wvUd+79Ipp1bUC3LhXxcKhUKvBC+nMZfbHqEoX2hWuAfgbV+FwLM36EuccMDxd4Swl1E0NqxnkEGQZAfUJIKX8CAwQKulTz51/o7RR8qcoVZs+bZiMTIuq7/TkWdENC3HNTI5a1I7vBSr3drPYTWdukiCfvYZpaCz7EWDRxNPvrNBS6GEfjSAD0x9YG7Imsr0AOGmL6a349BYMG5zfgQA1NACPNaAzW9smliiH4FaobOQFN7p4QVh7O9nrOr2kcRVIi9rEBeCCDO7C9sSi7OtfRJ33Wk8ZOORc1Is/3juuPcMav7+vIkz4lQdr3Eg3wBAxhCcng8XzOm8lLkx0fVp/Df7kDhsgPKXe8pfHn87k071BFG1LLkNzDQFbBENmRsL89wWddnuf5MkPb19tLPKWnvjl5WGh/vm+wNCxk/GPG5w+0cQObSNJ5MlYKn7A8LkcnRHDOvwdD9EKRfGkhh/kUNDBKZ6VINMJQSzBIMskXjouwd6EAisoXmzrkdwUI2tp+0B5jRS7Z6rkx51LU1ABqchR0KPLDIANbfxP99mIKn7DvKMMgHXEySE7Tw35+e0KZf7kfjjIk6EzF6rAyazBkzJThvom/1Y7CJ2zXDJs65TxdiJdQRR1Qp26gy2lBbefOvo4ksYrt08NI/+iI8atIhoUBAg4nrtY726faXfiEo6o5KqlzpNR/iR/j6VkEhYJDs7sCUrk72+kXduDKsEVjh1wipFjRX9wSDsceYpw9UKWxP4PDuDJDtTrM1k+IKNMYcDqbwLdjzfTdUE74wRsl7GI3Cp/wZOCOtsk3dmqXxnCn1we/JLEU3kZ5ZWVViLmez3g6cko7tkdK9YVoiAWYQyxz8fvQksA/4Kd90HFIWVtTwzzb2sU3O2q0tspwYjjMBi5wCFROZ4zdCPZ9P+zIyG1Msu2Yq2wZH1G30Pos8AG+3dKENrdujMcr0UNda+wuCFAuGFTggNAkCYw2mboIvp5WQzv6HMV3NePzx7GgmwVAO63DTUByW62mNd1mLEb0H/8DkOAXi0+nceAAAAAASUVORK5CYII=",Nt={class:"slide-bar-item"},xt={class:"slide-bar-item-title slide-bar-user-link"},Gt={key:1,class:"skeleton-wrap"},Rt={key:0,class:"empty-wrap"},Ot={key:1},Pt={key:2},Ft={class:"load-more-wrap"},Lt={class:"load-more-spinner"},Yt=_e({__name:"Home",setup(Z){const O="true".toLowerCase()==="true",z="true".toLowerCase()==="true",E=fe(),r=pt(),T=dt(),_=i(9),R=i(8),g=i([{title:"最新动态",style:1,username:"",avatar:Tt,show:!0},{title:"",style:1,username:"",avatar:"",show:!0},{title:"",style:1,username:"",avatar:"",show:!0},{title:"",style:1,username:"",avatar:"",show:!0},{title:"",style:1,username:"",avatar:"",show:!0},{title:"",style:1,username:"",avatar:"",show:!0},{title:"",style:1,username:"",avatar:"",show:!0},{title:"",style:1,username:"",avatar:"",show:!0},{title:"",style:1,username:"",avatar:"",show:!0},{title:"",style:1,username:"",avatar:"",show:!0}]),A=i(!1),x=i(!1),F=i(1),f=i(""),u=i([]),h=i(1),B=i(20),I=i(0),L=ce(()=>{let l="泡泡广场";return r.query&&r.query.q&&(r.query.t&&r.query.t==="tag"?l="#"+decodeURIComponent(r.query.q):l="搜索: "+decodeURIComponent(r.query.q)),l}),P=ce(()=>O&&z&&E.state.desktopModelShow&&E.state.userInfo.id>0),Y=()=>{A.value=!1,x.value=!1,u.value=[],h.value=1,I.value=0},S=(l,d)=>{switch(Y(),F.value=l.style,l.style){case 1:q();break;case 2:q();break;case 21:f.value=l.username,J();break}g.value[d].show=!1},K=()=>{g.value=g.value.slice(0,1),!(!O||!z||E.state.userInfo.id===0)&&Re({page:1,page_size:50}).then(l=>{var d=0;const N=l.list||[];let k=[];for(;d0&&(g.value=g.value.concat(k))}).catch(l=>{console.log(l)})},q=()=>{A.value=!0,Oe({query:r.query.q?decodeURIComponent(r.query.q):null,type:r.query.t,page:h.value,page_size:B.value}).then(l=>{A.value=!1,l.list.length===0&&(x.value=!0),h.value>1?u.value=u.value.concat(l.list):(u.value=l.list,window.scrollTo(0,0)),I.value=Math.ceil(l.pager.total_rows/B.value)}).catch(l=>{A.value=!1,h.value>1&&h.value--})},J=()=>{A.value=!0,Pe({username:f.value,style:"post",page:h.value,page_size:B.value}).then(l=>{A.value=!1,l.list.length===0&&(x.value=!0),h.value>1?u.value=u.value.concat(l.list):(u.value=l.list||[],window.scrollTo(0,0)),I.value=Math.ceil(l.pager.total_rows/B.value)}).catch(l=>{u.value=[],h.value>1&&h.value--,A.value=!1})},$=l=>{if(F.value!=1){T.push({name:"post",query:{id:l.id}});return}let d=[],N=u.value.length;N==B.value&&N--;for(var k=0;k{switch(F.value){case 1:q();break;case 2:q();break;case 21:J();break}},ee=()=>{h.value{Y(),K(),q()}),Te(()=>({path:r.path,query:r.query,refresh:E.state.refresh}),(l,d)=>{if(l.refresh!==d.refresh){Y(),setTimeout(()=>{K(),W()},0);return}d.path!=="/post"&&l.path==="/"&&(Y(),setTimeout(()=>{K(),W()},0))}),(l,d)=>{const N=ct,k=Et,D=nt,te=he,ae=lt,se=it,j=Ee,oe=rt,ne=Ue,le=Ve,ie=ot,re=ut,ue=we;return c(),y("div",null,[a(N,{title:L.value},null,8,["title"]),a(ie,{class:"main-content-wrap",bordered:""},{default:n(()=>[a(D,null,{default:n(()=>[a(k,{onPostSuccess:$})]),_:1}),P.value?(c(),G(D,{key:0},{default:n(()=>[a(V(mt),{modelValue:g.value,"onUpdate:modelValue":d[0]||(d[0]=w=>g.value=w),"wheel-blocks":R.value,"init-blocks":_.value,onClick:S,tag:"div","sub-tag":"div"},{default:n(w=>[C("div",Nt,[a(ae,{value:"1",offset:[-4,48],dot:"",show:w.slotData.show},{default:n(()=>[a(te,{round:"",size:48,src:w.slotData.avatar,class:"slide-bar-item-avatar"},null,8,["src"])]),_:2},1032,["show"]),C("div",xt,[a(se,{"line-clamp":2},{default:n(()=>[M(X(w.slotData.title),1)]),_:2},1024)])])]),_:1},8,["modelValue","wheel-blocks","init-blocks"])]),_:1})):b("",!0),A.value&&u.value.length===0?(c(),y("div",Gt,[a(j,{num:B.value},null,8,["num"])])):b("",!0),C("div",null,[u.value.length===0?(c(),y("div",Rt,[a(oe,{size:"large",description:"暂无数据"})])):b("",!0),V(E).state.desktopModelShow?(c(),y("div",Ot,[(c(!0),y(pe,null,de(u.value,w=>(c(),G(D,{key:w.id},{default:n(()=>[a(ne,{post:w},null,8,["post"])]),_:2},1024))),128))])):(c(),y("div",Pt,[(c(!0),y(pe,null,de(u.value,w=>(c(),G(D,{key:w.id},{default:n(()=>[a(le,{post:w},null,8,["post"])]),_:2},1024))),128))]))])]),_:1}),I.value>0?(c(),G(ue,{key:0,justify:"center"},{default:n(()=>[a(V(vt),{class:"load-more",slots:{complete:"没有更多泡泡了",error:"加载出错"},onInfinite:d[1]||(d[1]=w=>ee())},{spinner:n(()=>[C("div",Ft,[x.value?b("",!0):(c(),G(re,{key:0,size:14})),C("span",Lt,X(x.value?"没有更多泡泡了":"加载更多"),1)])]),_:1})]),_:1})):b("",!0)])}}});const Ia=Fe(Yt,[["__scopeId","data-v-26704746"]]);export{Ia as default}; diff --git a/web/dist/assets/Messages-1e4acdf3.css b/web/dist/assets/Messages-1e4acdf3.css new file mode 100644 index 00000000..1813ff11 --- /dev/null +++ b/web/dist/assets/Messages-1e4acdf3.css @@ -0,0 +1 @@ +.message-item[data-v-b2ee6429]{padding:16px}.message-item.unread[data-v-b2ee6429]{background:#fcfffc}.message-item .sender-wrap[data-v-b2ee6429]{display:flex;align-items:center}.message-item .sender-wrap .top-tag[data-v-b2ee6429]{transform:scale(.75)}.message-item .sender-wrap .username[data-v-b2ee6429]{opacity:.75;font-size:14px}.message-item .timestamp[data-v-b2ee6429]{opacity:.75;font-size:12px;display:flex;align-items:center}.message-item .timestamp .timestamp-txt[data-v-b2ee6429]{margin-left:6px}.message-item .brief-wrap[data-v-b2ee6429]{margin-top:10px}.message-item .brief-wrap .brief-content[data-v-b2ee6429],.message-item .brief-wrap .whisper-content-wrap[data-v-b2ee6429],.message-item .brief-wrap .requesting-friend-wrap[data-v-b2ee6429]{display:flex;width:100%}.message-item .view-link[data-v-b2ee6429]{margin-left:8px;display:flex;align-items:center}.message-item .status-info[data-v-b2ee6429]{margin-left:8px;align-items:center}.dark .message-item[data-v-b2ee6429]{background-color:#101014bf}.dark .message-item.unread[data-v-b2ee6429]{background:#0f180b}.dark .message-item .brief-wrap[data-v-b2ee6429]{background-color:#18181c}.skeleton-item[data-v-01d2e871]{padding:12px;display:flex}.skeleton-item .content[data-v-01d2e871]{width:100%}.dark .skeleton-item[data-v-01d2e871]{background-color:#101014bf}.pagination-wrap[data-v-4e7b1342]{padding:10px;display:flex;justify-content:center;overflow:hidden}.dark .empty-wrap[data-v-4e7b1342],.dark .messages-wrap[data-v-4e7b1342],.dark .pagination-wrap[data-v-4e7b1342]{background-color:#101014bf} diff --git a/web/dist/assets/Messages-4104caea.js b/web/dist/assets/Messages-4104caea.js new file mode 100644 index 00000000..ac689011 --- /dev/null +++ b/web/dist/assets/Messages-4104caea.js @@ -0,0 +1 @@ +import{d as j,c as O,r as K,e as n,f as a,k as s,w as o,bf as p,j as v,y as h,A as l,x as c,q as $,Y as i,l as P,u as D,F as L,H as w,b as Q}from"./@vue-a481fc63.js";import{u as W}from"./vuex-44de225f.js";import{u as T,b as U}from"./vue-router-e5a2430e.js";import{K as E,L as G,M as H,_ as A,N as J}from"./index-757c547c.js";import{a as Y}from"./formatTime-4210fcd1.js";import{J as B,K as X,N as Z,O as V,Q as x}from"./@vicons-1a3558c6.js";import{o as ee,M as se,j as ne,l as te,S as ae,L as oe,U as re,F as ie,Q as le,I as _e,G as ue}from"./naive-ui-d8de3dda.js";import{_ as pe}from"./main-nav.vue_vue_type_style_index_0_lang-048bd56b.js";import"./axios-4a70c6fc.js";/* empty css */import"./seemly-76b7b838.js";import"./vueuc-39372edb.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";import"./moment-2ab8298d.js";const me={class:"sender-wrap"},de={key:0,class:"nickname"},ce={class:"username"},ge={key:1,class:"nickname"},ve={class:"username"},ye={key:2,class:"nickname"},fe={class:"timestamp"},ke={class:"timestamp-txt"},he={key:0,class:"brief-content"},we={key:1,class:"whisper-content-wrap"},$e={key:2,class:"requesting-friend-wrap"},Ce={key:2,class:"status-info"},be={key:3,class:"status-info"},Ie="https://assets.paopao.info/public/avatar/default/admin.png",Me=j({__name:"message-item",props:{message:{}},setup(z){const _=z,C=T(),r=W(),m=O(()=>_.message.type!==4||_.message.sender_user_id!==r.state.userInfo.id),y=O(()=>_.message.type==4&&_.message.receiver_user_id==r.state.userInfo.id),g=O(()=>_.message.type==4&&_.message.sender_user_id==r.state.userInfo.id),f=e=>{u(e),(e.type===1||e.type===2||e.type===3)&&(e.post&&e.post.id>0?C.push({name:"post",query:{id:e.post_id}}):window.$message.error("该动态已被删除"))},b=e=>{u(e),E({user_id:e.sender_user_id}).then(t=>{e.reply_id=2,window.$message.success("已同意添加好友")}).catch(t=>{console.log(t)})},N=e=>{u(e),G({user_id:e.sender_user_id}).then(t=>{e.reply_id=3,window.$message.success("已拒绝添加好友")}).catch(t=>{console.log(t)})},u=e=>{_.message.receiver_user_id==r.state.userInfo.id&&e.is_read===0&&H({id:e.id}).then(t=>{e.is_read=1}).catch(t=>{console.log(t)})};return(e,t)=>{const S=ee,I=K("router-link"),k=se,d=ne,F=te,q=ae,M=oe;return n(),a("div",{class:P(["message-item",{unread:m.value&&e.message.is_read===0}]),onClick:t[5]||(t[5]=R=>u(e.message))},[s(M,{"content-indented":""},{avatar:o(()=>[s(S,{round:"",size:30,src:e.message.type==4&&e.message.sender_user_id==p(r).state.userInfo.id?e.message.receiver_user.avatar:e.message.sender_user.id>0?e.message.sender_user.avatar:Ie},null,8,["src"])]),header:o(()=>[v("div",me,[e.message.type!=4&&e.message.sender_user.id>0||y.value?(n(),a("span",de,[s(I,{onClick:t[0]||(t[0]=h(()=>{},["stop"])),class:"username-link",to:{name:"user",query:{s:e.message.sender_user.username}}},{default:o(()=>[l(c(e.message.sender_user.nickname),1)]),_:1},8,["to"]),v("span",ce," @"+c(e.message.sender_user.username),1)])):g.value?(n(),a("span",ge,[s(I,{onClick:t[1]||(t[1]=h(()=>{},["stop"])),class:"username-link",to:{name:"user",query:{s:e.message.receiver_user.username}}},{default:o(()=>[l(c(e.message.receiver_user.nickname),1)]),_:1},8,["to"]),v("span",ve," @"+c(e.message.receiver_user.username),1)])):(n(),a("span",ye," 系统 ")),e.message.type==4?(n(),$(k,{key:3,class:"top-tag",type:"success",size:"small",round:""},{default:o(()=>[l(" 私信 ")]),_:1})):i("",!0),g.value?(n(),$(k,{key:4,class:"top-tag",type:"info",size:"small",round:""},{icon:o(()=>[s(d,{component:p(B)},null,8,["component"])]),default:o(()=>[l(" 已发送 ")]),_:1})):i("",!0),e.message.type==4&&e.message.receiver_user_id==p(r).state.userInfo.id?(n(),$(k,{key:5,class:"top-tag",type:"warning",size:"small",round:""},{icon:o(()=>[s(d,{component:p(B)},null,8,["component"])]),default:o(()=>[l(" 已接收 ")]),_:1})):i("",!0)])]),"header-extra":o(()=>[v("span",fe,[m.value&&e.message.is_read===0?(n(),$(F,{key:0,dot:"",processing:""})):i("",!0),v("span",ke,c(p(Y)(e.message.created_on)),1)])]),description:o(()=>[s(q,{"show-icon":!1,class:"brief-wrap",type:!m.value||e.message.is_read>0?"default":"success"},{default:o(()=>[e.message.type!=4?(n(),a("div",he,[l(c(e.message.brief)+" ",1),e.message.type===1||e.message.type===2||e.message.type===3?(n(),a("span",{key:0,onClick:t[2]||(t[2]=h(R=>f(e.message),["stop"])),class:"hash-link view-link"},[s(d,null,{default:o(()=>[s(p(X))]),_:1}),l(" 查看详情 ")])):i("",!0)])):i("",!0),e.message.type===4?(n(),a("div",we,c(e.message.content),1)):i("",!0),e.message.type===5?(n(),a("div",$e,[l(c(e.message.content)+" ",1),e.message.reply_id===1?(n(),a("span",{key:0,onClick:t[3]||(t[3]=h(R=>b(e.message),["stop"])),class:"hash-link view-link"},[s(d,null,{default:o(()=>[s(p(Z))]),_:1}),l(" 同意 ")])):i("",!0),e.message.reply_id===1?(n(),a("span",{key:1,onClick:t[4]||(t[4]=h(R=>N(e.message),["stop"])),class:"hash-link view-link"},[s(d,null,{default:o(()=>[s(p(V))]),_:1}),l(" 拒绝 ")])):i("",!0),e.message.reply_id===2?(n(),a("span",Ce,[s(d,null,{default:o(()=>[s(p(x))]),_:1}),l(" 已同意 ")])):i("",!0),e.message.reply_id===3?(n(),a("span",be,[s(d,null,{default:o(()=>[s(p(V))]),_:1}),l(" 已拒绝 ")])):i("",!0)])):i("",!0)]),_:1},8,["type"])]),_:1})],2)}}});const ze=A(Me,[["__scopeId","data-v-b2ee6429"]]),Ne={class:"content"},Se=j({__name:"message-skeleton",props:{num:{default:1}},setup(z){return(_,C)=>{const r=re;return n(!0),a(L,null,D(new Array(_.num),m=>(n(),a("div",{class:"skeleton-item",key:m},[v("div",Ne,[s(r,{text:"",repeat:2}),s(r,{text:"",style:{width:"60%"}})])]))),128)}}});const Fe=A(Se,[["__scopeId","data-v-01d2e871"]]),qe={key:0,class:"skeleton-wrap"},Re={key:1},Oe={key:0,class:"empty-wrap"},je={key:0,class:"pagination-wrap"},Ae=j({__name:"Messages",setup(z){const _=U(),C=W(),r=w(!1),m=w(+_.query.p||1),y=w(10),g=w(0),f=w([]),b=()=>{r.value=!0,J({page:m.value,page_size:y.value}).then(u=>{r.value=!1,f.value=u.list,g.value=Math.ceil(u.pager.total_rows/y.value)}).catch(u=>{r.value=!1})},N=u=>{m.value=u,b()};return Q(()=>{b()}),(u,e)=>{const t=pe,S=Fe,I=_e,k=ze,d=ue,F=ie,q=le;return n(),a("div",null,[s(t,{title:"消息"}),s(F,{class:"main-content-wrap messages-wrap",bordered:""},{default:o(()=>[r.value?(n(),a("div",qe,[s(S,{num:y.value},null,8,["num"])])):(n(),a("div",Re,[f.value.length===0?(n(),a("div",Oe,[s(I,{size:"large",description:"暂无数据"})])):i("",!0),(n(!0),a(L,null,D(f.value,M=>(n(),$(d,{key:M.id},{default:o(()=>[s(k,{message:M},null,8,["message"])]),_:2},1024))),128))]))]),_:1}),g.value>0?(n(),a("div",je,[s(q,{page:m.value,"onUpdate:page":N,"page-slot":p(C).state.collapsedRight?5:8,"page-count":g.value},null,8,["page","page-slot","page-count"])])):i("",!0)])}}});const rs=A(Ae,[["__scopeId","data-v-4e7b1342"]]);export{rs as default}; diff --git a/web/dist/assets/Messages-7a898af3.css b/web/dist/assets/Messages-7a898af3.css deleted file mode 100644 index fe6c85f3..00000000 --- a/web/dist/assets/Messages-7a898af3.css +++ /dev/null @@ -1 +0,0 @@ -.message-item[data-v-07fc447f]{padding:16px}.message-item.unread[data-v-07fc447f]{background:#fcfffc}.message-item .sender-wrap[data-v-07fc447f]{display:flex;align-items:center}.message-item .sender-wrap .username[data-v-07fc447f]{opacity:.75;font-size:14px}.message-item .timestamp[data-v-07fc447f]{opacity:.75;font-size:12px;display:flex;align-items:center}.message-item .timestamp .timestamp-txt[data-v-07fc447f]{margin-left:6px}.message-item .brief-wrap[data-v-07fc447f]{margin-top:10px}.message-item .brief-wrap .brief-content[data-v-07fc447f],.message-item .brief-wrap .whisper-content-wrap[data-v-07fc447f],.message-item .brief-wrap .requesting-friend-wrap[data-v-07fc447f]{display:flex;width:100%}.message-item .view-link[data-v-07fc447f]{margin-left:8px;display:flex;align-items:center}.message-item .status-info[data-v-07fc447f]{margin-left:8px;align-items:center}.dark .message-item[data-v-07fc447f]{background-color:#101014bf}.dark .message-item.unread[data-v-07fc447f]{background:#0f180b}.dark .message-item .brief-wrap[data-v-07fc447f]{background-color:#18181c}.skeleton-item[data-v-01d2e871]{padding:12px;display:flex}.skeleton-item .content[data-v-01d2e871]{width:100%}.dark .skeleton-item[data-v-01d2e871]{background-color:#101014bf}.pagination-wrap[data-v-4e7b1342]{padding:10px;display:flex;justify-content:center;overflow:hidden}.dark .empty-wrap[data-v-4e7b1342],.dark .messages-wrap[data-v-4e7b1342],.dark .pagination-wrap[data-v-4e7b1342]{background-color:#101014bf} diff --git a/web/dist/assets/Messages-f750805b.js b/web/dist/assets/Messages-f750805b.js deleted file mode 100644 index 21a8946a..00000000 --- a/web/dist/assets/Messages-f750805b.js +++ /dev/null @@ -1 +0,0 @@ -import{d as M,r as V,e as t,f as a,k as n,w as o,j as y,y as w,A as p,x as m,q,Y as r,bf as c,l as D,u as z,F as O,H as f,b as L}from"./@vue-a481fc63.js";import{u as K,b as P}from"./vue-router-e5a2430e.js";import{K as T,L as U,M as E,_ as F,N as G}from"./index-7ab58e72.js";import{a as H}from"./formatTime-4210fcd1.js";import{J,K as Q,N as S,O as Y}from"./@vicons-33f992ab.js";import{o as W,l as X,j as Z,S as x,L as ee,U as se,F as ne,Q as te,I as ae,G as oe}from"./naive-ui-d8de3dda.js";import{_ as re}from"./main-nav.vue_vue_type_style_index_0_lang-3b4e457a.js";import{u as ie}from"./vuex-44de225f.js";import"./axios-4a70c6fc.js";/* empty css */import"./seemly-76b7b838.js";import"./vueuc-39372edb.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";import"./moment-2ab8298d.js";const _e={class:"sender-wrap"},le={key:0,class:"nickname"},pe={class:"username"},ue={key:1,class:"nickname"},ce={class:"timestamp"},de={class:"timestamp-txt"},me={key:0,class:"brief-content"},ge={key:1,class:"whisper-content-wrap"},ve={key:2,class:"requesting-friend-wrap"},fe={key:2,class:"status-info"},ye={key:3,class:"status-info"},ke="https://assets.paopao.info/public/avatar/default/admin.png",he=M({__name:"message-item",props:{message:{}},setup(N){const g=K(),k=e=>{_(e),(e.type===1||e.type===2||e.type===3)&&(e.post&&e.post.id>0?g.push({name:"post",query:{id:e.post_id}}):window.$message.error("该动态已被删除"))},i=e=>{_(e),T({user_id:e.sender_user_id}).then(s=>{e.reply_id=2,window.$message.success("已同意添加好友")}).catch(s=>{console.log(s)})},u=e=>{_(e),U({user_id:e.sender_user_id}).then(s=>{e.reply_id=3,window.$message.success("已拒绝添加好友")}).catch(s=>{console.log(s)})},_=e=>{e.is_read===0&&E({id:e.id}).then(s=>{e.is_read=1}).catch(s=>{console.log(s)})};return(e,s)=>{const h=W,$=V("router-link"),l=X,d=Z,C=x,b=ee;return t(),a("div",{class:D(["message-item",{unread:e.message.is_read===0}]),onClick:s[4]||(s[4]=v=>_(e.message))},[n(b,{"content-indented":""},{avatar:o(()=>[n(h,{round:"",size:30,src:e.message.sender_user.id>0?e.message.sender_user.avatar:ke},null,8,["src"])]),header:o(()=>[y("div",_e,[e.message.sender_user.id>0?(t(),a("span",le,[n($,{onClick:s[0]||(s[0]=w(()=>{},["stop"])),class:"username-link",to:{name:"user",query:{s:e.message.sender_user.username}}},{default:o(()=>[p(m(e.message.sender_user.nickname),1)]),_:1},8,["to"]),y("span",pe," @"+m(e.message.sender_user.username),1)])):(t(),a("span",ue," 系统 "))])]),"header-extra":o(()=>[y("span",ce,[e.message.is_read===0?(t(),q(l,{key:0,dot:"",processing:""})):r("",!0),y("span",de,m(c(H)(e.message.created_on)),1)])]),description:o(()=>[n(C,{"show-icon":!1,class:"brief-wrap",type:e.message.is_read>0?"default":"success"},{default:o(()=>[e.message.type!=4?(t(),a("div",me,[p(m(e.message.brief)+" ",1),e.message.type===1||e.message.type===2||e.message.type===3?(t(),a("span",{key:0,onClick:s[1]||(s[1]=w(v=>k(e.message),["stop"])),class:"hash-link view-link"},[n(d,null,{default:o(()=>[n(c(J))]),_:1}),p(" 查看详情 ")])):r("",!0)])):r("",!0),e.message.type===4?(t(),a("div",ge,m(e.message.content),1)):r("",!0),e.message.type===5?(t(),a("div",ve,[p(m(e.message.content)+" ",1),e.message.reply_id===1?(t(),a("span",{key:0,onClick:s[2]||(s[2]=w(v=>i(e.message),["stop"])),class:"hash-link view-link"},[n(d,null,{default:o(()=>[n(c(Q))]),_:1}),p(" 同意 ")])):r("",!0),e.message.reply_id===1?(t(),a("span",{key:1,onClick:s[3]||(s[3]=w(v=>u(e.message),["stop"])),class:"hash-link view-link"},[n(d,null,{default:o(()=>[n(c(S))]),_:1}),p(" 拒绝 ")])):r("",!0),e.message.reply_id===2?(t(),a("span",fe,[n(d,null,{default:o(()=>[n(c(Y))]),_:1}),p(" 已同意 ")])):r("",!0),e.message.reply_id===3?(t(),a("span",ye,[n(d,null,{default:o(()=>[n(c(S))]),_:1}),p(" 已拒绝 ")])):r("",!0)])):r("",!0)]),_:1},8,["type"])]),_:1})],2)}}});const we=F(he,[["__scopeId","data-v-07fc447f"]]),$e={class:"content"},Ce=M({__name:"message-skeleton",props:{num:{default:1}},setup(N){return(g,k)=>{const i=se;return t(!0),a(O,null,z(new Array(g.num),u=>(t(),a("div",{class:"skeleton-item",key:u},[y("div",$e,[n(i,{text:"",repeat:2}),n(i,{text:"",style:{width:"60%"}})])]))),128)}}});const be=F(Ce,[["__scopeId","data-v-01d2e871"]]),Me={key:0,class:"skeleton-wrap"},Fe={key:1},Ne={key:0,class:"empty-wrap"},Ie={key:0,class:"pagination-wrap"},Se=M({__name:"Messages",setup(N){const g=P(),k=ie(),i=f(!1),u=f(+g.query.p||1),_=f(10),e=f(0),s=f([]),h=()=>{i.value=!0,G({page:u.value,page_size:_.value}).then(l=>{i.value=!1,s.value=l.list,e.value=Math.ceil(l.pager.total_rows/_.value)}).catch(l=>{i.value=!1})},$=l=>{u.value=l,h()};return L(()=>{h()}),(l,d)=>{const C=re,b=be,v=ae,R=we,j=oe,A=ne,B=te;return t(),a("div",null,[n(C,{title:"消息"}),n(A,{class:"main-content-wrap messages-wrap",bordered:""},{default:o(()=>[i.value?(t(),a("div",Me,[n(b,{num:_.value},null,8,["num"])])):(t(),a("div",Fe,[s.value.length===0?(t(),a("div",Ne,[n(v,{size:"large",description:"暂无数据"})])):r("",!0),(t(!0),a(O,null,z(s.value,I=>(t(),q(j,{key:I.id},{default:o(()=>[n(R,{message:I},null,8,["message"])]),_:2},1024))),128))]))]),_:1}),e.value>0?(t(),a("div",Ie,[n(B,{page:u.value,"onUpdate:page":$,"page-slot":c(k).state.collapsedRight?5:8,"page-count":e.value},null,8,["page","page-slot","page-count"])])):r("",!0)])}}});const es=F(Se,[["__scopeId","data-v-4e7b1342"]]);export{es as default}; diff --git a/web/dist/assets/Post-38faf6e2.js b/web/dist/assets/Post-2d267990.js similarity index 98% rename from web/dist/assets/Post-38faf6e2.js rename to web/dist/assets/Post-2d267990.js index b24988c7..2880bbd0 100644 --- a/web/dist/assets/Post-38faf6e2.js +++ b/web/dist/assets/Post-2d267990.js @@ -1 +1 @@ -import{d as Z,H as r,r as ge,e as n,f as c,j as v,k as t,w as a,A as x,x as I,q as P,Y as u,bf as l,y as j,c as ue,al as Ne,F as ce,u as re,b as ye,$ as Te,a0 as Pe,h as be,E as Be}from"./@vue-a481fc63.js";import{u as te}from"./vuex-44de225f.js";import{f as _e}from"./formatTime-4210fcd1.js";import{t as je,f as Fe,h as He,_ as se,i as Ve,j as Ye,k as Je,l as Ke,g as Ge,m as Qe,n as We,o as Xe,p as Ze,q as et,s as tt,r as st,v as ot,u as nt,w as at,x as lt,y as $e}from"./index-7ab58e72.js";import{Y as pe,V as W}from"./IEnum-5453a777.js";import{T as ze,e as de,f as Ue,g as me,h as Re,I as it,i as ut,j as ct,k as rt,l as _t,m as pt,n as dt,o as mt,p as vt,q as ht,r as ft,s as Ce,F as xe,E as ae,t as le,u as ie,v as Ie}from"./@vicons-33f992ab.js";import{j as Y,e as oe,J as Se,H as gt,b as yt,K as kt,o as ke,L as Le,v as wt,w as bt,x as $t,y as Ct,z as xt,B as It,M as Tt,O as Pt,i as zt,P as Ut,a as Oe,F as Rt,I as St,k as Lt,G as Ot,f as At,g as Dt}from"./naive-ui-d8de3dda.js";import{p as we,_ as Ae,a as Mt,b as Et,c as qt}from"./content-77341dc8.js";import{u as De,b as Nt}from"./vue-router-e5a2430e.js";import{_ as Bt}from"./post-skeleton-bae19eed.js";import{l as jt}from"./lodash-e0b37ac3.js";import{c as Ft}from"./copy-to-clipboard-4ef7d3eb.js";import{_ as Ht}from"./main-nav.vue_vue_type_style_index_0_lang-3b4e457a.js";import{W as Vt}from"./v3-infinite-loading-2c58ec2f.js";import"./moment-2ab8298d.js";import"./axios-4a70c6fc.js";/* empty css */import"./seemly-76b7b838.js";import"./vueuc-39372edb.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";import"./paopao-video-player-2fe58954.js";import"./@babel-725317a4.js";import"./toggle-selection-93f4ad84.js";const Yt={class:"reply-item"},Jt={class:"header-wrap"},Kt={class:"username"},Gt={class:"reply-name"},Qt={class:"timestamp"},Wt={class:"base-wrap"},Xt={class:"content"},Zt={class:"reply-switch"},es={class:"time-item"},ts={class:"actions"},ss={class:"upvote-count"},os=["onClick"],ns={class:"upvote-count"},as={key:2,class:"action-item"},ls=["onClick"],is=Z({__name:"reply-item",props:{tweetId:{},reply:{}},emits:["focusReply","reload"],setup(A,{emit:D}){const i=A,h=te(),f=r(i.reply.is_thumbs_up==pe.YES),y=r(i.reply.is_thumbs_down==pe.YES),k=r(i.reply.thumbs_up_count),U=()=>{je({tweet_id:i.tweetId,comment_id:i.reply.comment_id,reply_id:i.reply.id}).then(g=>{f.value=!f.value,f.value?(k.value++,y.value=!1):k.value--}).catch(g=>{console.log(g)})},_=()=>{Fe({tweet_id:i.tweetId,comment_id:i.reply.comment_id,reply_id:i.reply.id}).then(g=>{y.value=!y.value,y.value&&f.value&&(k.value--,f.value=!1)}).catch(g=>{console.log(g)})},R=()=>{D("focusReply",i.reply)},T=()=>{He({id:i.reply.id}).then(g=>{window.$message.success("删除成功"),setTimeout(()=>{D("reload")},50)}).catch(g=>{console.log(g)})};return(g,b)=>{const O=ge("router-link"),d=Y,e=oe,p=Se,w=gt;return n(),c("div",Yt,[v("div",Jt,[v("div",Kt,[t(O,{class:"user-link",to:{name:"user",query:{s:i.reply.user.username}}},{default:a(()=>[x(I(i.reply.user.username),1)]),_:1},8,["to"]),v("span",Gt,I(i.reply.at_user_id>0?"回复":":"),1),i.reply.at_user_id>0?(n(),P(O,{key:0,class:"user-link",to:{name:"user",query:{s:i.reply.at_user.username}}},{default:a(()=>[x(I(i.reply.at_user.username),1)]),_:1},8,["to"])):u("",!0)]),v("div",Qt,[x(I(i.reply.ip_loc)+" ",1),l(h).state.userInfo.is_admin||l(h).state.userInfo.id===i.reply.user.id?(n(),P(p,{key:0,"negative-text":"取消","positive-text":"确认",onPositiveClick:T},{trigger:a(()=>[t(e,{quaternary:"",circle:"",size:"tiny",class:"del-btn"},{icon:a(()=>[t(d,null,{default:a(()=>[t(l(ze))]),_:1})]),_:1})]),default:a(()=>[x(" 是否确认删除? ")]),_:1})):u("",!0)])]),v("div",Wt,[v("div",Xt,[t(w,{"expand-trigger":"click","line-clamp":"5",tooltip:!1},{default:a(()=>[x(I(i.reply.content),1)]),_:1})]),v("div",Zt,[v("span",es,I(l(_e)(i.reply.created_on)),1),v("div",ts,[l(h).state.userLogined?u("",!0):(n(),c("div",{key:0,class:"action-item",onClick:b[0]||(b[0]=j(()=>{},["stop"]))},[t(d,{size:"medium"},{default:a(()=>[t(l(de))]),_:1}),v("span",ss,I(k.value),1)])),l(h).state.userLogined?(n(),c("div",{key:1,class:"action-item hover",onClick:j(U,["stop"])},[t(d,{size:"medium"},{default:a(()=>[f.value?u("",!0):(n(),P(l(de),{key:0})),f.value?(n(),P(l(Ue),{key:1,class:"show"})):u("",!0)]),_:1}),v("span",ns,I(k.value>0?k.value:"赞"),1)],8,os)):u("",!0),l(h).state.userLogined?u("",!0):(n(),c("div",as,[t(d,{size:"medium"},{default:a(()=>[t(l(me))]),_:1})])),l(h).state.userLogined?(n(),c("div",{key:3,class:"action-item hover",onClick:j(_,["stop"])},[t(d,{size:"medium"},{default:a(()=>[y.value?u("",!0):(n(),P(l(me),{key:0})),y.value?(n(),P(l(Re),{key:1,class:"show"})):u("",!0)]),_:1})],8,ls)):u("",!0),l(h).state.userLogined?(n(),c("span",{key:4,class:"show opacity-item reply-btn",onClick:R}," 回复 ")):u("",!0)])])])])}}});const us=se(is,[["__scopeId","data-v-187a4ed3"]]),cs={class:"reply-compose-wrap"},rs={class:"reply-switch"},_s={class:"time-item"},ps={class:"actions"},ds={key:0,class:"action-item"},ms={class:"upvote-count"},vs=["onClick"],hs={class:"upvote-count"},fs={key:2,class:"action-item"},gs=["onClick"],ys={key:0,class:"reply-input-wrap"},ks=Z({__name:"compose-reply",props:{comment:{},atUserid:{default:0},atUsername:{default:""}},emits:["reload","reset"],setup(A,{expose:D,emit:i}){const h=A,f=te(),y=r(),k=r(!1),U=r(""),_=r(!1),R=+"300",T=r(h.comment.is_thumbs_up==pe.YES),g=r(h.comment.is_thumbs_down==pe.YES),b=r(h.comment.thumbs_up_count),O=()=>{Ve({tweet_id:h.comment.post_id,comment_id:h.comment.id}).then(w=>{T.value=!T.value,T.value?(b.value++,g.value=!1):b.value--}).catch(w=>{console.log(w)})},d=()=>{Ye({tweet_id:h.comment.post_id,comment_id:h.comment.id}).then(w=>{g.value=!g.value,g.value&&T.value&&(b.value--,T.value=!1)}).catch(w=>{console.log(w)})},e=w=>{k.value=w,w?setTimeout(()=>{var S;(S=y.value)==null||S.focus()},10):(_.value=!1,U.value="",i("reset"))},p=()=>{_.value=!0,Je({comment_id:h.comment.id,at_user_id:h.atUserid,content:U.value}).then(w=>{e(!1),window.$message.success("评论成功"),i("reload")}).catch(w=>{_.value=!1})};return D({switchReply:e}),(w,S)=>{const q=Y,N=yt,H=oe,z=kt;return n(),c("div",cs,[v("div",rs,[v("span",_s,I(l(_e)(w.comment.created_on)),1),v("div",ps,[l(f).state.userLogined?u("",!0):(n(),c("div",ds,[t(q,{size:"medium"},{default:a(()=>[t(l(de))]),_:1}),v("span",ms,I(b.value),1)])),l(f).state.userLogined?(n(),c("div",{key:1,class:"action-item hover",onClick:j(O,["stop"])},[t(q,{size:"medium"},{default:a(()=>[T.value?u("",!0):(n(),P(l(de),{key:0})),T.value?(n(),P(l(Ue),{key:1,class:"show"})):u("",!0)]),_:1}),v("span",hs,I(b.value>0?b.value:"赞"),1)],8,vs)):u("",!0),l(f).state.userLogined?u("",!0):(n(),c("div",fs,[t(q,{size:"medium"},{default:a(()=>[t(l(me))]),_:1})])),l(f).state.userLogined?(n(),c("div",{key:3,class:"action-item hover",onClick:j(d,["stop"])},[t(q,{size:"medium"},{default:a(()=>[g.value?u("",!0):(n(),P(l(me),{key:0})),g.value?(n(),P(l(Re),{key:1,class:"show"})):u("",!0)]),_:1})],8,gs)):u("",!0),l(f).state.userLogined&&!k.value?(n(),c("span",{key:4,class:"show reply-btn",onClick:S[0]||(S[0]=L=>e(!0))}," 回复 ")):u("",!0),l(f).state.userLogined&&k.value?(n(),c("span",{key:5,class:"hide reply-btn",onClick:S[1]||(S[1]=L=>e(!1))}," 取消 ")):u("",!0)])]),k.value?(n(),c("div",ys,[t(z,null,{default:a(()=>[t(N,{ref_key:"inputInstRef",ref:y,size:"small",placeholder:h.atUsername?"@"+h.atUsername:"请输入回复内容..",maxlength:l(R),value:U.value,"onUpdate:value":S[2]||(S[2]=L=>U.value=L),"show-count":"",clearable:""},null,8,["placeholder","maxlength","value"]),t(H,{type:"primary",size:"small",ghost:"",loading:_.value,onClick:p},{default:a(()=>[x(" 回复 ")]),_:1},8,["loading"])]),_:1})])):u("",!0)])}}});const ws=se(ks,[["__scopeId","data-v-f9af7a93"]]),bs={class:"comment-item"},$s={class:"nickname-wrap"},Cs={class:"username-wrap"},xs={class:"opt-wrap"},Is={class:"timestamp"},Ts=["innerHTML"],Ps={class:"reply-wrap"},zs=Z({__name:"comment-item",props:{comment:{}},emits:["reload"],setup(A,{emit:D}){const i=A,h=te(),f=De(),y=r(0),k=r(""),U=r(),_=ue(()=>{let d=Object.assign({texts:[],imgs:[]},i.comment);return d.contents.map(e=>{(+e.type==1||+e.type==2)&&d.texts.push(e),+e.type==3&&d.imgs.push(e)}),d}),R=(d,e)=>{let p=d.target;if(p.dataset.detail){const w=p.dataset.detail.split(":");w.length===2&&(h.commit("refresh"),w[0]==="tag"?window.$message.warning("评论内的无效话题"):f.push({name:"user",query:{s:w[1]}}))}},T=d=>{var e,p;y.value=d.user_id,k.value=((e=d.user)==null?void 0:e.username)||"",(p=U.value)==null||p.switchReply(!0)},g=()=>{D("reload")},b=()=>{y.value=0,k.value=""},O=()=>{Ke({id:_.value.id}).then(d=>{window.$message.success("删除成功"),setTimeout(()=>{g()},50)}).catch(d=>{})};return(d,e)=>{const p=ke,w=ge("router-link"),S=Y,q=oe,N=Se,H=Ae,z=ws,L=us,K=Le;return n(),c("div",bs,[t(K,{"content-indented":""},Ne({avatar:a(()=>[t(p,{round:"",size:30,src:_.value.user.avatar},null,8,["src"])]),header:a(()=>[v("span",$s,[t(w,{onClick:e[0]||(e[0]=j(()=>{},["stop"])),class:"username-link",to:{name:"user",query:{s:_.value.user.username}}},{default:a(()=>[x(I(_.value.user.nickname),1)]),_:1},8,["to"])]),v("span",Cs," @"+I(_.value.user.username),1)]),"header-extra":a(()=>[v("div",xs,[v("span",Is,I(_.value.ip_loc),1),l(h).state.userInfo.is_admin||l(h).state.userInfo.id===_.value.user.id?(n(),P(N,{key:0,"negative-text":"取消","positive-text":"确认",onPositiveClick:O},{trigger:a(()=>[t(q,{quaternary:"",circle:"",size:"tiny",class:"del-btn"},{icon:a(()=>[t(S,null,{default:a(()=>[t(l(ze))]),_:1})]),_:1})]),default:a(()=>[x(" 是否确认删除? ")]),_:1})):u("",!0)])]),footer:a(()=>[_.value.imgs.length>0?(n(),P(H,{key:0,imgs:_.value.imgs},null,8,["imgs"])):u("",!0),t(z,{ref_key:"replyComposeRef",ref:U,comment:_.value,"at-userid":y.value,"at-username":k.value,onReload:g,onReset:b},null,8,["comment","at-userid","at-username"]),v("div",Ps,[(n(!0),c(ce,null,re(_.value.replies,F=>(n(),P(L,{key:F.id,reply:F,"tweet-id":_.value.post_id,onFocusReply:T,onReload:g},null,8,["reply","tweet-id"]))),128))])]),_:2},[_.value.texts.length>0?{name:"description",fn:a(()=>[(n(!0),c(ce,null,re(_.value.texts,F=>(n(),c("span",{key:F.id,class:"comment-text",onClick:e[1]||(e[1]=j(J=>R(J,_.value.id),["stop"])),innerHTML:l(we)(F.content).content},null,8,Ts))),128))]),key:"0"}:void 0]),1024)])}}});const Us=se(zs,[["__scopeId","data-v-36dac8c8"]]),Rs=A=>(Te("data-v-634e6bfd"),A=A(),Pe(),A),Ss={key:0,class:"compose-wrap"},Ls={class:"compose-line"},Os={class:"compose-user"},As={class:"compose-line compose-options"},Ds={class:"attachment"},Ms={class:"submit-wrap"},Es={class:"attachment-list-wrap"},qs={key:1,class:"compose-wrap"},Ns=Rs(()=>v("div",{class:"login-wrap"},[v("span",{class:"login-banner"}," 登录后,精彩更多")],-1)),Bs={key:0,class:"login-only-wrap"},js={key:1,class:"login-wrap"},Fs=Z({__name:"compose-comment",props:{lock:{default:0},postId:{default:0}},emits:["post-success"],setup(A,{emit:D}){const i=A,h=te(),f=r([]),y=r(!1),k=r(!1),U=r(!1),_=r(""),R=r(),T=r("public/image"),g=r([]),b=r([]),O=r("true".toLowerCase()==="true"),d=+"300",e="/v1/attachment",p=r(),w=jt.debounce(s=>{Ge({k:s}).then(m=>{let $=[];m.suggest.map(C=>{$.push({label:C,value:C})}),f.value=$,k.value=!1}).catch(m=>{k.value=!1})},200),S=(s,m)=>{k.value||(k.value=!0,m==="@"&&w(s))},q=s=>{s.length>d?_.value=s.substring(0,d):_.value=s},N=s=>{T.value=s},H=s=>{for(let M=0;M30&&(s[M].name=$.substring(0,18)+"..."+$.substring($.length-9)+"."+C)}g.value=s},z=async s=>{var m,$;return T.value==="public/image"&&!["image/png","image/jpg","image/jpeg","image/gif"].includes((m=s.file.file)==null?void 0:m.type)?(window.$message.warning("图片仅允许 png/jpg/gif 格式"),!1):T.value==="image"&&(($=s.file.file)==null?void 0:$.size)>10485760?(window.$message.warning("图片大小不能超过10MB"),!1):!0},L=({file:s,event:m})=>{var $;try{let C=JSON.parse(($=m.target)==null?void 0:$.response);C.code===0&&T.value==="public/image"&&b.value.push({id:s.id,content:C.data.content})}catch{window.$message.error("上传失败")}},K=({file:s,event:m})=>{var $;try{let C=JSON.parse(($=m.target)==null?void 0:$.response);if(C.code!==0){let M=C.msg||"上传失败";C.details&&C.details.length>0&&C.details.map(B=>{M+=":"+B}),window.$message.error(M)}}catch{window.$message.error("上传失败")}},F=({file:s})=>{let m=b.value.findIndex($=>$.id===s.id);m>-1&&b.value.splice(m,1)},J=()=>{y.value=!0},X=()=>{var s;y.value=!1,(s=R.value)==null||s.clear(),g.value=[],_.value="",b.value=[]},G=()=>{if(_.value.trim().length===0){window.$message.warning("请输入内容哦");return}let{users:s}=we(_.value);const m=[];let $=100;m.push({content:_.value,type:2,sort:$}),b.value.map(C=>{$++,m.push({content:C.content,type:3,sort:$})}),U.value=!0,Qe({contents:m,post_id:i.postId,users:Array.from(new Set(s))}).then(C=>{window.$message.success("发布成功"),U.value=!1,D("post-success"),X()}).catch(C=>{U.value=!1})},o=s=>{h.commit("triggerAuth",!0),h.commit("triggerAuthKey",s)};return ye(()=>{p.value="Bearer "+localStorage.getItem("PAOPAO_TOKEN")}),(s,m)=>{const $=ke,C=wt,M=Y,B=oe,V=bt,ne=$t,ve=Ct,he=xt,fe=It;return n(),c("div",null,[l(h).state.userInfo.id>0?(n(),c("div",Ss,[v("div",Ls,[v("div",Os,[t($,{round:"",size:30,src:l(h).state.userInfo.avatar},null,8,["src"])]),t(C,{type:"textarea",size:"large",autosize:"",bordered:!1,options:f.value,prefix:["@"],loading:k.value,value:_.value,disabled:i.lock===1,"onUpdate:value":q,onSearch:S,onFocus:J,placeholder:i.lock===1?"泡泡已被锁定,回复功能已关闭":"快来评论两句吧..."},null,8,["options","loading","value","disabled","placeholder"])]),y.value?(n(),P(fe,{key:0,ref_key:"uploadRef",ref:R,abstract:"","list-type":"image",multiple:!0,max:9,action:e,headers:{Authorization:p.value},data:{type:T.value},"file-list":g.value,onBeforeUpload:z,onFinish:L,onError:K,onRemove:F,"onUpdate:fileList":H},{default:a(()=>[v("div",As,[v("div",Ds,[t(V,{abstract:""},{default:a(({handleClick:Q})=>[t(B,{disabled:g.value.length>0&&T.value==="public/video"||g.value.length===9,onClick:()=>{N("public/image"),Q()},quaternary:"",circle:"",type:"primary"},{icon:a(()=>[t(M,{size:"20",color:"var(--primary-color)"},{default:a(()=>[t(l(it))]),_:1})]),_:2},1032,["disabled","onClick"])]),_:1}),t(ve,{trigger:"hover",placement:"bottom"},{trigger:a(()=>[t(ne,{class:"text-statistic",type:"circle","show-indicator":!1,status:"success","stroke-width":10,percentage:_.value.length/l(d)*100},null,8,["percentage"])]),default:a(()=>[x(" "+I(_.value.length)+" / "+I(l(d)),1)]),_:1})]),v("div",Ms,[t(B,{quaternary:"",round:"",type:"tertiary",class:"cancel-btn",size:"small",onClick:X},{default:a(()=>[x(" 取消 ")]),_:1}),t(B,{loading:U.value,onClick:G,type:"primary",secondary:"",size:"small",round:""},{default:a(()=>[x(" 发布 ")]),_:1},8,["loading"])])]),v("div",Es,[t(he)])]),_:1},8,["headers","data","file-list"])):u("",!0)])):(n(),c("div",qs,[Ns,O.value?u("",!0):(n(),c("div",Bs,[t(B,{strong:"",secondary:"",round:"",type:"primary",onClick:m[0]||(m[0]=Q=>o("signin"))},{default:a(()=>[x(" 登录 ")]),_:1})])),O.value?(n(),c("div",js,[t(B,{strong:"",secondary:"",round:"",type:"primary",onClick:m[1]||(m[1]=Q=>o("signin"))},{default:a(()=>[x(" 登录 ")]),_:1}),t(B,{strong:"",secondary:"",round:"",type:"info",onClick:m[2]||(m[2]=Q=>o("signup"))},{default:a(()=>[x(" 注册 ")]),_:1})])):u("",!0)]))])}}});const Hs=se(Fs,[["__scopeId","data-v-634e6bfd"]]),Vs={class:"username-wrap"},Ys={key:0,class:"options"},Js={key:0},Ks=["innerHTML"],Gs={class:"timestamp"},Qs={key:0},Ws={key:1},Xs={class:"opts-wrap"},Zs=["onClick"],eo={class:"opt-item"},to=["onClick"],so=["onClick"],oo=Z({__name:"post-detail",props:{post:{}},emits:["reload"],setup(A,{emit:D}){const i=A,h="true".toLowerCase()==="true",f=te(),y=De(),k=r(!1),U=r(!1),_=r(!1),R=r(!1),T=r(!1),g=r(!1),b=r(!1),O=r(!1),d=r(W.PUBLIC),e=ue({get:()=>{let o=Object.assign({texts:[],imgs:[],videos:[],links:[],attachments:[],charge_attachments:[]},i.post);return o.contents.map(s=>{(+s.type==1||+s.type==2)&&o.texts.push(s),+s.type==3&&o.imgs.push(s),+s.type==4&&o.videos.push(s),+s.type==6&&o.links.push(s),+s.type==7&&o.attachments.push(s),+s.type==8&&o.charge_attachments.push(s)}),o},set:o=>{i.post.upvote_count=o.upvote_count,i.post.comment_count=o.comment_count,i.post.collection_count=o.collection_count,i.post.is_essence=o.is_essence}}),p=o=>()=>be(Y,null,{default:()=>be(o)}),w=ue(()=>{var m;let o=[{label:"删除",key:"delete",icon:p(vt)}];e.value.is_lock===0?o.push({label:"锁定",key:"lock",icon:p(ht)}):o.push({label:"解锁",key:"unlock",icon:p(ft)}),f.state.userInfo.is_admin&&(e.value.is_top===0?o.push({label:"置顶",key:"stick",icon:p(Ce)}):o.push({label:"取消置顶",key:"unstick",icon:p(Ce)})),e.value.is_essence===0?o.push({label:"设为亮点",key:"highlight",icon:p(xe)}):o.push({label:"取消亮点",key:"unhighlight",icon:p(xe)});let s;return e.value.visibility===W.PUBLIC?s={label:"公开",key:"vpublic",icon:p(ae),children:[{label:"私密",key:"vprivate",icon:p(le)},{label:"关注可见",key:"vfollowing",icon:p(ie)}]}:e.value.visibility===W.PRIVATE?s={label:"私密",key:"vprivate",icon:p(le),children:[{label:"公开",key:"vpublic",icon:p(ae)},{label:"关注可见",key:"vfollowing",icon:p(ie)}]}:h&&e.value.visibility===W.FRIEND?s={label:"好友可见",key:"vfriend",icon:p(Ie),children:[{label:"公开",key:"vpublic",icon:p(ae)},{label:"私密",key:"vprivate",icon:p(le)},{label:"关注可见",key:"vfollowing",icon:p(ie)}]}:s={label:"关注可见",key:"vfollowing",icon:p(ie),children:[{label:"公开",key:"vpublic",icon:p(ae)},{label:"私密",key:"vprivate",icon:p(le)}]},h&&e.value.visibility!==W.FRIEND&&((m=s.children)==null||m.push({label:"好友可见",key:"vfriend",icon:p(Ie)})),o.push(s),o}),S=o=>{y.push({name:"post",query:{id:o}})},q=(o,s)=>{if(o.target.dataset.detail){const m=o.target.dataset.detail.split(":");if(m.length===2){f.commit("refresh"),m[0]==="tag"?y.push({name:"home",query:{q:m[1],t:"tag"}}):y.push({name:"user",query:{s:m[1]}});return}}S(s)},N=o=>{switch(o){case"delete":_.value=!0;break;case"lock":case"unlock":R.value=!0;break;case"stick":case"unstick":T.value=!0;break;case"highlight":case"unhighlight":g.value=!0;break;case"vpublic":d.value=0,b.value=!0;break;case"vprivate":d.value=1,b.value=!0;break;case"vfriend":d.value=2,b.value=!0;break;case"vfollowing":d.value=3,b.value=!0;break}},H=()=>{Ze({id:e.value.id}).then(o=>{window.$message.success("删除成功"),y.replace("/"),setTimeout(()=>{f.commit("refresh")},50)}).catch(o=>{O.value=!1})},z=()=>{et({id:e.value.id}).then(o=>{D("reload"),o.lock_status===1?window.$message.success("锁定成功"):window.$message.success("解锁成功")}).catch(o=>{O.value=!1})},L=()=>{tt({id:e.value.id}).then(o=>{D("reload"),o.top_status===1?window.$message.success("置顶成功"):window.$message.success("取消置顶成功")}).catch(o=>{O.value=!1})},K=()=>{st({id:e.value.id}).then(o=>{e.value={...e.value,is_essence:o.highlight_status},o.highlight_status===1?window.$message.success("设为亮点成功"):window.$message.success("取消亮点成功")}).catch(o=>{O.value=!1})},F=()=>{let o=d.value;o==3&&(o=0),ot({id:e.value.id,visibility:o}).then(s=>{D("reload"),window.$message.success("修改可见性成功")}).catch(s=>{O.value=!1})},J=()=>{nt({id:e.value.id}).then(o=>{k.value=o.status,o.status?e.value={...e.value,upvote_count:e.value.upvote_count+1}:e.value={...e.value,upvote_count:e.value.upvote_count-1}}).catch(o=>{console.log(o)})},X=()=>{at({id:e.value.id}).then(o=>{U.value=o.status,o.status?e.value={...e.value,collection_count:e.value.collection_count+1}:e.value={...e.value,collection_count:e.value.collection_count-1}}).catch(o=>{console.log(o)})},G=()=>{Ft(`${window.location.origin}/#/post?id=${e.value.id}`),window.$message.success("链接已复制到剪贴板")};return ye(()=>{f.state.userInfo.id>0&&(We({id:e.value.id}).then(o=>{k.value=o.status}).catch(o=>{console.log(o)}),Xe({id:e.value.id}).then(o=>{U.value=o.status}).catch(o=>{console.log(o)}))}),(o,s)=>{const m=ke,$=ge("router-link"),C=Tt,M=oe,B=Pt,V=zt,ne=Mt,ve=Ae,he=Et,fe=qt,Q=Ut,Me=Oe,Ee=Le;return n(),c("div",{class:"detail-item",onClick:s[7]||(s[7]=E=>S(e.value.id))},[t(Ee,null,{avatar:a(()=>[t(m,{round:"",size:30,src:e.value.user.avatar},null,8,["src"])]),header:a(()=>[t($,{onClick:s[0]||(s[0]=j(()=>{},["stop"])),class:"username-link",to:{name:"user",query:{s:e.value.user.username}}},{default:a(()=>[x(I(e.value.user.nickname),1)]),_:1},8,["to"]),v("span",Vs," @"+I(e.value.user.username),1),e.value.is_top?(n(),P(C,{key:0,class:"top-tag",type:"warning",size:"small",round:""},{default:a(()=>[x(" 置顶 ")]),_:1})):u("",!0),e.value.visibility==l(W).PRIVATE?(n(),P(C,{key:1,class:"top-tag",type:"error",size:"small",round:""},{default:a(()=>[x(" 私密 ")]),_:1})):u("",!0),e.value.visibility==l(W).FRIEND?(n(),P(C,{key:2,class:"top-tag",type:"info",size:"small",round:""},{default:a(()=>[x(" 好友可见 ")]),_:1})):u("",!0)]),"header-extra":a(()=>[l(f).state.userInfo.is_admin||l(f).state.userInfo.id===e.value.user.id?(n(),c("div",Ys,[t(B,{placement:"bottom-end",trigger:"click",size:"small",options:w.value,onSelect:N},{default:a(()=>[t(M,{quaternary:"",circle:""},{icon:a(()=>[t(l(Y),null,{default:a(()=>[t(l(ut))]),_:1})]),_:1})]),_:1},8,["options"])])):u("",!0),t(V,{show:_.value,"onUpdate:show":s[1]||(s[1]=E=>_.value=E),"mask-closable":!1,preset:"dialog",title:"提示",content:"确定删除该泡泡动态吗?","positive-text":"确认","negative-text":"取消",onPositiveClick:H},null,8,["show"]),t(V,{show:R.value,"onUpdate:show":s[2]||(s[2]=E=>R.value=E),"mask-closable":!1,preset:"dialog",title:"提示",content:"确定"+(e.value.is_lock?"解锁":"锁定")+"该泡泡动态吗?","positive-text":"确认","negative-text":"取消",onPositiveClick:z},null,8,["show","content"]),t(V,{show:T.value,"onUpdate:show":s[3]||(s[3]=E=>T.value=E),"mask-closable":!1,preset:"dialog",title:"提示",content:"确定"+(e.value.is_top?"取消置顶":"置顶")+"该泡泡动态吗?","positive-text":"确认","negative-text":"取消",onPositiveClick:L},null,8,["show","content"]),t(V,{show:g.value,"onUpdate:show":s[4]||(s[4]=E=>g.value=E),"mask-closable":!1,preset:"dialog",title:"提示",content:"确定将该泡泡动态"+(e.value.is_essence?"取消亮点":"设为亮点")+"吗?","positive-text":"确认","negative-text":"取消",onPositiveClick:K},null,8,["show","content"]),t(V,{show:b.value,"onUpdate:show":s[5]||(s[5]=E=>b.value=E),"mask-closable":!1,preset:"dialog",title:"提示",content:"确定将该泡泡动态可见度修改为"+(d.value==0?"公开":d.value==1?"私密":d.value==2?"好友可见":"关注可见")+"吗?","positive-text":"确认","negative-text":"取消",onPositiveClick:F},null,8,["show","content"])]),footer:a(()=>[t(ne,{attachments:e.value.attachments},null,8,["attachments"]),t(ne,{attachments:e.value.charge_attachments,price:e.value.attachment_price},null,8,["attachments","price"]),t(ve,{imgs:e.value.imgs},null,8,["imgs"]),t(he,{videos:e.value.videos,full:!0},null,8,["videos"]),t(fe,{links:e.value.links},null,8,["links"]),v("div",Gs,[x(" 发布于 "+I(l(_e)(e.value.created_on))+" ",1),e.value.ip_loc?(n(),c("span",Qs,[t(Q,{vertical:""}),x(" "+I(e.value.ip_loc),1)])):u("",!0),!l(f).state.collapsedLeft&&e.value.created_on!=e.value.latest_replied_on?(n(),c("span",Ws,[t(Q,{vertical:""}),x(" 最后回复 "+I(l(_e)(e.value.latest_replied_on)),1)])):u("",!0)])]),action:a(()=>[v("div",Xs,[t(Me,{justify:"space-between"},{default:a(()=>[v("div",{class:"opt-item hover",onClick:j(J,["stop"])},[t(l(Y),{size:"20",class:"opt-item-icon"},{default:a(()=>[k.value?u("",!0):(n(),P(l(ct),{key:0})),k.value?(n(),P(l(rt),{key:1,color:"red"})):u("",!0)]),_:1}),x(" "+I(e.value.upvote_count),1)],8,Zs),v("div",eo,[t(l(Y),{size:"20",class:"opt-item-icon"},{default:a(()=>[t(l(_t))]),_:1}),x(" "+I(e.value.comment_count),1)]),v("div",{class:"opt-item hover",onClick:j(X,["stop"])},[t(l(Y),{size:"20",class:"opt-item-icon"},{default:a(()=>[U.value?u("",!0):(n(),P(l(pt),{key:0})),U.value?(n(),P(l(dt),{key:1,color:"#ff7600"})):u("",!0)]),_:1}),x(" "+I(e.value.collection_count),1)],8,to),v("div",{class:"opt-item hover",onClick:j(G,["stop"])},[t(l(Y),{size:"20",class:"opt-item-icon"},{default:a(()=>[t(l(mt))]),_:1}),x(" "+I(e.value.share_count),1)],8,so)]),_:1})])]),default:a(()=>[e.value.texts.length>0?(n(),c("div",Js,[(n(!0),c(ce,null,re(e.value.texts,E=>(n(),c("span",{key:E.id,class:"post-text",onClick:s[6]||(s[6]=j(qe=>q(qe,e.value.id),["stop"])),innerHTML:l(we)(E.content).content},null,8,Ks))),128))])):u("",!0)]),_:1})])}}});const no=A=>(Te("data-v-0d01659f"),A=A(),Pe(),A),ao={key:0,class:"detail-wrap"},lo={key:1,class:"empty-wrap"},io={key:0,class:"comment-opts-wrap"},uo=no(()=>v("span",{class:"comment-title-item"},"评论",-1)),co={key:2},ro={key:0,class:"skeleton-wrap"},_o={key:1},po={key:0,class:"empty-wrap"},mo={key:0,class:"load-more-spinner"},vo={key:1,class:"load-more-spinner"},ho={key:2,class:"load-more-spinner"},fo={key:3,class:"load-more-spinner"},ee=20,go=Z({__name:"Post",setup(A){const D=Nt(),i=r({}),h=r(!1),f=r(!1),y=r([]),k=ue(()=>+D.query.id),U=r("default"),_=r(!0);let R={loading(){},loaded(){},complete(){},error(){}};const T=z=>{U.value=z,z==="default"&&(_.value=!0),N(R)},g=()=>{i.value={id:0},h.value=!0,lt({id:k.value}).then(z=>{h.value=!1,i.value=z,N(R)}).catch(z=>{h.value=!1})};let b=1;const O=r(!1),d=r([]),e=z=>{O.value||$e({id:i.value.id,sort_strategy:"default",page:b,page_size:ee}).then(L=>{z!==null&&(R=z),L.list.length0&&(b===1?d.value=L.list:d.value.push(...L.list),y.value=d.value),R.loaded(),f.value=!1}).catch(L=>{f.value=!1,R.error()})};let p=1,w=r(!1);const S=r([]),q=z=>{w.value||$e({id:i.value.id,sort_strategy:"newest",page:p,page_size:ee}).then(L=>{z!==null&&(R=z),L.list.length0&&(p===1?S.value=L.list:S.value.push(...L.list),y.value=S.value),R.loaded(),f.value=!1}).catch(L=>{f.value=!1,R.error()})},N=z=>{k.value<1||(y.value.length===0&&(f.value=!0),U.value==="default"?(y.value=d.value,e(z)):(y.value=S.value,q(z)),f.value=!1)},H=()=>{b=1,O.value=!1,d.value=[],p=1,w.value=!1,S.value=[],N(R)};return ye(()=>{g()}),Be(k,()=>{k.value>0&&D.name==="post"&&g()}),(z,L)=>{const K=Ht,F=oo,J=St,X=Lt,G=Ot,o=At,s=Dt,m=Hs,$=Bt,C=Us,M=Oe,B=Rt;return n(),c("div",null,[t(K,{title:"泡泡详情",back:!0}),t(B,{class:"main-content-wrap",bordered:""},{default:a(()=>[t(G,null,{default:a(()=>[t(X,{show:h.value},{default:a(()=>[i.value.id>1?(n(),c("div",ao,[t(F,{post:i.value,onReload:g},null,8,["post"])])):(n(),c("div",lo,[t(J,{size:"large",description:"暂无数据"})]))]),_:1},8,["show"])]),_:1}),i.value.id>0?(n(),c("div",io,[t(s,{type:"bar","justify-content":"end",size:"small",animated:"","onUpdate:value":T},{prefix:a(()=>[uo]),default:a(()=>[t(o,{name:"default",tab:"默认"}),t(o,{name:"newest",tab:"最新"})]),_:1})])):u("",!0),i.value.id>0?(n(),P(G,{key:1},{default:a(()=>[t(m,{lock:i.value.is_lock,"post-id":i.value.id,onPostSuccess:H},null,8,["lock","post-id"])]),_:1})):u("",!0),i.value.id>0?(n(),c("div",co,[f.value?(n(),c("div",ro,[t($,{num:5})])):(n(),c("div",_o,[y.value.length===0?(n(),c("div",po,[t(J,{size:"large",description:"暂无评论,快来抢沙发"})])):u("",!0),(n(!0),c(ce,null,re(y.value,V=>(n(),P(G,{key:V.id},{default:a(()=>[t(C,{comment:V,onReload:H},null,8,["comment"])]),_:2},1024))),128))]))])):u("",!0),y.value.length>=ee?(n(),P(M,{key:3,justify:"center"},{default:a(()=>[t(l(Vt),{class:"load-more",slots:{complete:"没有更多数据了",error:"加载出错"},onInfinite:N},{spinner:a(()=>[_.value&&O.value?(n(),c("span",mo)):u("",!0),!_.value&&l(w)?(n(),c("span",vo)):u("",!0),_.value&&!O.value?(n(),c("span",ho,"加载评论")):u("",!0),!_.value&&!l(w)?(n(),c("span",fo,"加载评论")):u("",!0)]),_:1})]),_:1})):u("",!0)]),_:1})])}}});const Xo=se(go,[["__scopeId","data-v-0d01659f"]]);export{Xo as default}; +import{d as Z,H as r,r as ge,e as n,f as c,j as v,k as t,w as a,A as x,x as I,q as P,Y as u,bf as l,y as j,c as ue,al as Ne,F as ce,u as re,b as ye,$ as Te,a0 as Pe,h as be,E as Be}from"./@vue-a481fc63.js";import{u as te}from"./vuex-44de225f.js";import{f as _e}from"./formatTime-4210fcd1.js";import{t as je,f as Fe,h as He,_ as se,i as Ve,j as Ye,k as Je,l as Ke,g as Ge,m as Qe,n as We,o as Xe,p as Ze,q as et,s as tt,r as st,v as ot,u as nt,w as at,x as lt,y as $e}from"./index-757c547c.js";import{Y as pe,V as W}from"./IEnum-5453a777.js";import{T as ze,e as de,f as Ue,g as me,h as Re,I as it,i as ut,j as ct,k as rt,l as _t,m as pt,n as dt,o as mt,p as vt,q as ht,r as ft,s as Ce,F as xe,E as ae,t as le,u as ie,v as Ie}from"./@vicons-1a3558c6.js";import{j as Y,e as oe,J as Se,H as gt,b as yt,K as kt,o as ke,L as Le,v as wt,w as bt,x as $t,y as Ct,z as xt,B as It,M as Tt,O as Pt,i as zt,P as Ut,a as Oe,F as Rt,I as St,k as Lt,G as Ot,f as At,g as Dt}from"./naive-ui-d8de3dda.js";import{p as we,_ as Ae,a as Mt,b as Et,c as qt}from"./content-d5264b98.js";import{u as De,b as Nt}from"./vue-router-e5a2430e.js";import{_ as Bt}from"./post-skeleton-c82f8a59.js";import{l as jt}from"./lodash-e0b37ac3.js";import{c as Ft}from"./copy-to-clipboard-4ef7d3eb.js";import{_ as Ht}from"./main-nav.vue_vue_type_style_index_0_lang-048bd56b.js";import{W as Vt}from"./v3-infinite-loading-2c58ec2f.js";import"./moment-2ab8298d.js";import"./axios-4a70c6fc.js";/* empty css */import"./seemly-76b7b838.js";import"./vueuc-39372edb.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";import"./paopao-video-player-2fe58954.js";import"./@babel-725317a4.js";import"./toggle-selection-93f4ad84.js";const Yt={class:"reply-item"},Jt={class:"header-wrap"},Kt={class:"username"},Gt={class:"reply-name"},Qt={class:"timestamp"},Wt={class:"base-wrap"},Xt={class:"content"},Zt={class:"reply-switch"},es={class:"time-item"},ts={class:"actions"},ss={class:"upvote-count"},os=["onClick"],ns={class:"upvote-count"},as={key:2,class:"action-item"},ls=["onClick"],is=Z({__name:"reply-item",props:{tweetId:{},reply:{}},emits:["focusReply","reload"],setup(A,{emit:D}){const i=A,h=te(),f=r(i.reply.is_thumbs_up==pe.YES),y=r(i.reply.is_thumbs_down==pe.YES),k=r(i.reply.thumbs_up_count),U=()=>{je({tweet_id:i.tweetId,comment_id:i.reply.comment_id,reply_id:i.reply.id}).then(g=>{f.value=!f.value,f.value?(k.value++,y.value=!1):k.value--}).catch(g=>{console.log(g)})},_=()=>{Fe({tweet_id:i.tweetId,comment_id:i.reply.comment_id,reply_id:i.reply.id}).then(g=>{y.value=!y.value,y.value&&f.value&&(k.value--,f.value=!1)}).catch(g=>{console.log(g)})},R=()=>{D("focusReply",i.reply)},T=()=>{He({id:i.reply.id}).then(g=>{window.$message.success("删除成功"),setTimeout(()=>{D("reload")},50)}).catch(g=>{console.log(g)})};return(g,b)=>{const O=ge("router-link"),d=Y,e=oe,p=Se,w=gt;return n(),c("div",Yt,[v("div",Jt,[v("div",Kt,[t(O,{class:"user-link",to:{name:"user",query:{s:i.reply.user.username}}},{default:a(()=>[x(I(i.reply.user.username),1)]),_:1},8,["to"]),v("span",Gt,I(i.reply.at_user_id>0?"回复":":"),1),i.reply.at_user_id>0?(n(),P(O,{key:0,class:"user-link",to:{name:"user",query:{s:i.reply.at_user.username}}},{default:a(()=>[x(I(i.reply.at_user.username),1)]),_:1},8,["to"])):u("",!0)]),v("div",Qt,[x(I(i.reply.ip_loc)+" ",1),l(h).state.userInfo.is_admin||l(h).state.userInfo.id===i.reply.user.id?(n(),P(p,{key:0,"negative-text":"取消","positive-text":"确认",onPositiveClick:T},{trigger:a(()=>[t(e,{quaternary:"",circle:"",size:"tiny",class:"del-btn"},{icon:a(()=>[t(d,null,{default:a(()=>[t(l(ze))]),_:1})]),_:1})]),default:a(()=>[x(" 是否确认删除? ")]),_:1})):u("",!0)])]),v("div",Wt,[v("div",Xt,[t(w,{"expand-trigger":"click","line-clamp":"5",tooltip:!1},{default:a(()=>[x(I(i.reply.content),1)]),_:1})]),v("div",Zt,[v("span",es,I(l(_e)(i.reply.created_on)),1),v("div",ts,[l(h).state.userLogined?u("",!0):(n(),c("div",{key:0,class:"action-item",onClick:b[0]||(b[0]=j(()=>{},["stop"]))},[t(d,{size:"medium"},{default:a(()=>[t(l(de))]),_:1}),v("span",ss,I(k.value),1)])),l(h).state.userLogined?(n(),c("div",{key:1,class:"action-item hover",onClick:j(U,["stop"])},[t(d,{size:"medium"},{default:a(()=>[f.value?u("",!0):(n(),P(l(de),{key:0})),f.value?(n(),P(l(Ue),{key:1,class:"show"})):u("",!0)]),_:1}),v("span",ns,I(k.value>0?k.value:"赞"),1)],8,os)):u("",!0),l(h).state.userLogined?u("",!0):(n(),c("div",as,[t(d,{size:"medium"},{default:a(()=>[t(l(me))]),_:1})])),l(h).state.userLogined?(n(),c("div",{key:3,class:"action-item hover",onClick:j(_,["stop"])},[t(d,{size:"medium"},{default:a(()=>[y.value?u("",!0):(n(),P(l(me),{key:0})),y.value?(n(),P(l(Re),{key:1,class:"show"})):u("",!0)]),_:1})],8,ls)):u("",!0),l(h).state.userLogined?(n(),c("span",{key:4,class:"show opacity-item reply-btn",onClick:R}," 回复 ")):u("",!0)])])])])}}});const us=se(is,[["__scopeId","data-v-187a4ed3"]]),cs={class:"reply-compose-wrap"},rs={class:"reply-switch"},_s={class:"time-item"},ps={class:"actions"},ds={key:0,class:"action-item"},ms={class:"upvote-count"},vs=["onClick"],hs={class:"upvote-count"},fs={key:2,class:"action-item"},gs=["onClick"],ys={key:0,class:"reply-input-wrap"},ks=Z({__name:"compose-reply",props:{comment:{},atUserid:{default:0},atUsername:{default:""}},emits:["reload","reset"],setup(A,{expose:D,emit:i}){const h=A,f=te(),y=r(),k=r(!1),U=r(""),_=r(!1),R=+"300",T=r(h.comment.is_thumbs_up==pe.YES),g=r(h.comment.is_thumbs_down==pe.YES),b=r(h.comment.thumbs_up_count),O=()=>{Ve({tweet_id:h.comment.post_id,comment_id:h.comment.id}).then(w=>{T.value=!T.value,T.value?(b.value++,g.value=!1):b.value--}).catch(w=>{console.log(w)})},d=()=>{Ye({tweet_id:h.comment.post_id,comment_id:h.comment.id}).then(w=>{g.value=!g.value,g.value&&T.value&&(b.value--,T.value=!1)}).catch(w=>{console.log(w)})},e=w=>{k.value=w,w?setTimeout(()=>{var S;(S=y.value)==null||S.focus()},10):(_.value=!1,U.value="",i("reset"))},p=()=>{_.value=!0,Je({comment_id:h.comment.id,at_user_id:h.atUserid,content:U.value}).then(w=>{e(!1),window.$message.success("评论成功"),i("reload")}).catch(w=>{_.value=!1})};return D({switchReply:e}),(w,S)=>{const q=Y,N=yt,H=oe,z=kt;return n(),c("div",cs,[v("div",rs,[v("span",_s,I(l(_e)(w.comment.created_on)),1),v("div",ps,[l(f).state.userLogined?u("",!0):(n(),c("div",ds,[t(q,{size:"medium"},{default:a(()=>[t(l(de))]),_:1}),v("span",ms,I(b.value),1)])),l(f).state.userLogined?(n(),c("div",{key:1,class:"action-item hover",onClick:j(O,["stop"])},[t(q,{size:"medium"},{default:a(()=>[T.value?u("",!0):(n(),P(l(de),{key:0})),T.value?(n(),P(l(Ue),{key:1,class:"show"})):u("",!0)]),_:1}),v("span",hs,I(b.value>0?b.value:"赞"),1)],8,vs)):u("",!0),l(f).state.userLogined?u("",!0):(n(),c("div",fs,[t(q,{size:"medium"},{default:a(()=>[t(l(me))]),_:1})])),l(f).state.userLogined?(n(),c("div",{key:3,class:"action-item hover",onClick:j(d,["stop"])},[t(q,{size:"medium"},{default:a(()=>[g.value?u("",!0):(n(),P(l(me),{key:0})),g.value?(n(),P(l(Re),{key:1,class:"show"})):u("",!0)]),_:1})],8,gs)):u("",!0),l(f).state.userLogined&&!k.value?(n(),c("span",{key:4,class:"show reply-btn",onClick:S[0]||(S[0]=L=>e(!0))}," 回复 ")):u("",!0),l(f).state.userLogined&&k.value?(n(),c("span",{key:5,class:"hide reply-btn",onClick:S[1]||(S[1]=L=>e(!1))}," 取消 ")):u("",!0)])]),k.value?(n(),c("div",ys,[t(z,null,{default:a(()=>[t(N,{ref_key:"inputInstRef",ref:y,size:"small",placeholder:h.atUsername?"@"+h.atUsername:"请输入回复内容..",maxlength:l(R),value:U.value,"onUpdate:value":S[2]||(S[2]=L=>U.value=L),"show-count":"",clearable:""},null,8,["placeholder","maxlength","value"]),t(H,{type:"primary",size:"small",ghost:"",loading:_.value,onClick:p},{default:a(()=>[x(" 回复 ")]),_:1},8,["loading"])]),_:1})])):u("",!0)])}}});const ws=se(ks,[["__scopeId","data-v-f9af7a93"]]),bs={class:"comment-item"},$s={class:"nickname-wrap"},Cs={class:"username-wrap"},xs={class:"opt-wrap"},Is={class:"timestamp"},Ts=["innerHTML"],Ps={class:"reply-wrap"},zs=Z({__name:"comment-item",props:{comment:{}},emits:["reload"],setup(A,{emit:D}){const i=A,h=te(),f=De(),y=r(0),k=r(""),U=r(),_=ue(()=>{let d=Object.assign({texts:[],imgs:[]},i.comment);return d.contents.map(e=>{(+e.type==1||+e.type==2)&&d.texts.push(e),+e.type==3&&d.imgs.push(e)}),d}),R=(d,e)=>{let p=d.target;if(p.dataset.detail){const w=p.dataset.detail.split(":");w.length===2&&(h.commit("refresh"),w[0]==="tag"?window.$message.warning("评论内的无效话题"):f.push({name:"user",query:{s:w[1]}}))}},T=d=>{var e,p;y.value=d.user_id,k.value=((e=d.user)==null?void 0:e.username)||"",(p=U.value)==null||p.switchReply(!0)},g=()=>{D("reload")},b=()=>{y.value=0,k.value=""},O=()=>{Ke({id:_.value.id}).then(d=>{window.$message.success("删除成功"),setTimeout(()=>{g()},50)}).catch(d=>{})};return(d,e)=>{const p=ke,w=ge("router-link"),S=Y,q=oe,N=Se,H=Ae,z=ws,L=us,K=Le;return n(),c("div",bs,[t(K,{"content-indented":""},Ne({avatar:a(()=>[t(p,{round:"",size:30,src:_.value.user.avatar},null,8,["src"])]),header:a(()=>[v("span",$s,[t(w,{onClick:e[0]||(e[0]=j(()=>{},["stop"])),class:"username-link",to:{name:"user",query:{s:_.value.user.username}}},{default:a(()=>[x(I(_.value.user.nickname),1)]),_:1},8,["to"])]),v("span",Cs," @"+I(_.value.user.username),1)]),"header-extra":a(()=>[v("div",xs,[v("span",Is,I(_.value.ip_loc),1),l(h).state.userInfo.is_admin||l(h).state.userInfo.id===_.value.user.id?(n(),P(N,{key:0,"negative-text":"取消","positive-text":"确认",onPositiveClick:O},{trigger:a(()=>[t(q,{quaternary:"",circle:"",size:"tiny",class:"del-btn"},{icon:a(()=>[t(S,null,{default:a(()=>[t(l(ze))]),_:1})]),_:1})]),default:a(()=>[x(" 是否确认删除? ")]),_:1})):u("",!0)])]),footer:a(()=>[_.value.imgs.length>0?(n(),P(H,{key:0,imgs:_.value.imgs},null,8,["imgs"])):u("",!0),t(z,{ref_key:"replyComposeRef",ref:U,comment:_.value,"at-userid":y.value,"at-username":k.value,onReload:g,onReset:b},null,8,["comment","at-userid","at-username"]),v("div",Ps,[(n(!0),c(ce,null,re(_.value.replies,F=>(n(),P(L,{key:F.id,reply:F,"tweet-id":_.value.post_id,onFocusReply:T,onReload:g},null,8,["reply","tweet-id"]))),128))])]),_:2},[_.value.texts.length>0?{name:"description",fn:a(()=>[(n(!0),c(ce,null,re(_.value.texts,F=>(n(),c("span",{key:F.id,class:"comment-text",onClick:e[1]||(e[1]=j(J=>R(J,_.value.id),["stop"])),innerHTML:l(we)(F.content).content},null,8,Ts))),128))]),key:"0"}:void 0]),1024)])}}});const Us=se(zs,[["__scopeId","data-v-36dac8c8"]]),Rs=A=>(Te("data-v-634e6bfd"),A=A(),Pe(),A),Ss={key:0,class:"compose-wrap"},Ls={class:"compose-line"},Os={class:"compose-user"},As={class:"compose-line compose-options"},Ds={class:"attachment"},Ms={class:"submit-wrap"},Es={class:"attachment-list-wrap"},qs={key:1,class:"compose-wrap"},Ns=Rs(()=>v("div",{class:"login-wrap"},[v("span",{class:"login-banner"}," 登录后,精彩更多")],-1)),Bs={key:0,class:"login-only-wrap"},js={key:1,class:"login-wrap"},Fs=Z({__name:"compose-comment",props:{lock:{default:0},postId:{default:0}},emits:["post-success"],setup(A,{emit:D}){const i=A,h=te(),f=r([]),y=r(!1),k=r(!1),U=r(!1),_=r(""),R=r(),T=r("public/image"),g=r([]),b=r([]),O=r("true".toLowerCase()==="true"),d=+"300",e="/v1/attachment",p=r(),w=jt.debounce(s=>{Ge({k:s}).then(m=>{let $=[];m.suggest.map(C=>{$.push({label:C,value:C})}),f.value=$,k.value=!1}).catch(m=>{k.value=!1})},200),S=(s,m)=>{k.value||(k.value=!0,m==="@"&&w(s))},q=s=>{s.length>d?_.value=s.substring(0,d):_.value=s},N=s=>{T.value=s},H=s=>{for(let M=0;M30&&(s[M].name=$.substring(0,18)+"..."+$.substring($.length-9)+"."+C)}g.value=s},z=async s=>{var m,$;return T.value==="public/image"&&!["image/png","image/jpg","image/jpeg","image/gif"].includes((m=s.file.file)==null?void 0:m.type)?(window.$message.warning("图片仅允许 png/jpg/gif 格式"),!1):T.value==="image"&&(($=s.file.file)==null?void 0:$.size)>10485760?(window.$message.warning("图片大小不能超过10MB"),!1):!0},L=({file:s,event:m})=>{var $;try{let C=JSON.parse(($=m.target)==null?void 0:$.response);C.code===0&&T.value==="public/image"&&b.value.push({id:s.id,content:C.data.content})}catch{window.$message.error("上传失败")}},K=({file:s,event:m})=>{var $;try{let C=JSON.parse(($=m.target)==null?void 0:$.response);if(C.code!==0){let M=C.msg||"上传失败";C.details&&C.details.length>0&&C.details.map(B=>{M+=":"+B}),window.$message.error(M)}}catch{window.$message.error("上传失败")}},F=({file:s})=>{let m=b.value.findIndex($=>$.id===s.id);m>-1&&b.value.splice(m,1)},J=()=>{y.value=!0},X=()=>{var s;y.value=!1,(s=R.value)==null||s.clear(),g.value=[],_.value="",b.value=[]},G=()=>{if(_.value.trim().length===0){window.$message.warning("请输入内容哦");return}let{users:s}=we(_.value);const m=[];let $=100;m.push({content:_.value,type:2,sort:$}),b.value.map(C=>{$++,m.push({content:C.content,type:3,sort:$})}),U.value=!0,Qe({contents:m,post_id:i.postId,users:Array.from(new Set(s))}).then(C=>{window.$message.success("发布成功"),U.value=!1,D("post-success"),X()}).catch(C=>{U.value=!1})},o=s=>{h.commit("triggerAuth",!0),h.commit("triggerAuthKey",s)};return ye(()=>{p.value="Bearer "+localStorage.getItem("PAOPAO_TOKEN")}),(s,m)=>{const $=ke,C=wt,M=Y,B=oe,V=bt,ne=$t,ve=Ct,he=xt,fe=It;return n(),c("div",null,[l(h).state.userInfo.id>0?(n(),c("div",Ss,[v("div",Ls,[v("div",Os,[t($,{round:"",size:30,src:l(h).state.userInfo.avatar},null,8,["src"])]),t(C,{type:"textarea",size:"large",autosize:"",bordered:!1,options:f.value,prefix:["@"],loading:k.value,value:_.value,disabled:i.lock===1,"onUpdate:value":q,onSearch:S,onFocus:J,placeholder:i.lock===1?"泡泡已被锁定,回复功能已关闭":"快来评论两句吧..."},null,8,["options","loading","value","disabled","placeholder"])]),y.value?(n(),P(fe,{key:0,ref_key:"uploadRef",ref:R,abstract:"","list-type":"image",multiple:!0,max:9,action:e,headers:{Authorization:p.value},data:{type:T.value},"file-list":g.value,onBeforeUpload:z,onFinish:L,onError:K,onRemove:F,"onUpdate:fileList":H},{default:a(()=>[v("div",As,[v("div",Ds,[t(V,{abstract:""},{default:a(({handleClick:Q})=>[t(B,{disabled:g.value.length>0&&T.value==="public/video"||g.value.length===9,onClick:()=>{N("public/image"),Q()},quaternary:"",circle:"",type:"primary"},{icon:a(()=>[t(M,{size:"20",color:"var(--primary-color)"},{default:a(()=>[t(l(it))]),_:1})]),_:2},1032,["disabled","onClick"])]),_:1}),t(ve,{trigger:"hover",placement:"bottom"},{trigger:a(()=>[t(ne,{class:"text-statistic",type:"circle","show-indicator":!1,status:"success","stroke-width":10,percentage:_.value.length/l(d)*100},null,8,["percentage"])]),default:a(()=>[x(" "+I(_.value.length)+" / "+I(l(d)),1)]),_:1})]),v("div",Ms,[t(B,{quaternary:"",round:"",type:"tertiary",class:"cancel-btn",size:"small",onClick:X},{default:a(()=>[x(" 取消 ")]),_:1}),t(B,{loading:U.value,onClick:G,type:"primary",secondary:"",size:"small",round:""},{default:a(()=>[x(" 发布 ")]),_:1},8,["loading"])])]),v("div",Es,[t(he)])]),_:1},8,["headers","data","file-list"])):u("",!0)])):(n(),c("div",qs,[Ns,O.value?u("",!0):(n(),c("div",Bs,[t(B,{strong:"",secondary:"",round:"",type:"primary",onClick:m[0]||(m[0]=Q=>o("signin"))},{default:a(()=>[x(" 登录 ")]),_:1})])),O.value?(n(),c("div",js,[t(B,{strong:"",secondary:"",round:"",type:"primary",onClick:m[1]||(m[1]=Q=>o("signin"))},{default:a(()=>[x(" 登录 ")]),_:1}),t(B,{strong:"",secondary:"",round:"",type:"info",onClick:m[2]||(m[2]=Q=>o("signup"))},{default:a(()=>[x(" 注册 ")]),_:1})])):u("",!0)]))])}}});const Hs=se(Fs,[["__scopeId","data-v-634e6bfd"]]),Vs={class:"username-wrap"},Ys={key:0,class:"options"},Js={key:0},Ks=["innerHTML"],Gs={class:"timestamp"},Qs={key:0},Ws={key:1},Xs={class:"opts-wrap"},Zs=["onClick"],eo={class:"opt-item"},to=["onClick"],so=["onClick"],oo=Z({__name:"post-detail",props:{post:{}},emits:["reload"],setup(A,{emit:D}){const i=A,h="true".toLowerCase()==="true",f=te(),y=De(),k=r(!1),U=r(!1),_=r(!1),R=r(!1),T=r(!1),g=r(!1),b=r(!1),O=r(!1),d=r(W.PUBLIC),e=ue({get:()=>{let o=Object.assign({texts:[],imgs:[],videos:[],links:[],attachments:[],charge_attachments:[]},i.post);return o.contents.map(s=>{(+s.type==1||+s.type==2)&&o.texts.push(s),+s.type==3&&o.imgs.push(s),+s.type==4&&o.videos.push(s),+s.type==6&&o.links.push(s),+s.type==7&&o.attachments.push(s),+s.type==8&&o.charge_attachments.push(s)}),o},set:o=>{i.post.upvote_count=o.upvote_count,i.post.comment_count=o.comment_count,i.post.collection_count=o.collection_count,i.post.is_essence=o.is_essence}}),p=o=>()=>be(Y,null,{default:()=>be(o)}),w=ue(()=>{var m;let o=[{label:"删除",key:"delete",icon:p(vt)}];e.value.is_lock===0?o.push({label:"锁定",key:"lock",icon:p(ht)}):o.push({label:"解锁",key:"unlock",icon:p(ft)}),f.state.userInfo.is_admin&&(e.value.is_top===0?o.push({label:"置顶",key:"stick",icon:p(Ce)}):o.push({label:"取消置顶",key:"unstick",icon:p(Ce)})),e.value.is_essence===0?o.push({label:"设为亮点",key:"highlight",icon:p(xe)}):o.push({label:"取消亮点",key:"unhighlight",icon:p(xe)});let s;return e.value.visibility===W.PUBLIC?s={label:"公开",key:"vpublic",icon:p(ae),children:[{label:"私密",key:"vprivate",icon:p(le)},{label:"关注可见",key:"vfollowing",icon:p(ie)}]}:e.value.visibility===W.PRIVATE?s={label:"私密",key:"vprivate",icon:p(le),children:[{label:"公开",key:"vpublic",icon:p(ae)},{label:"关注可见",key:"vfollowing",icon:p(ie)}]}:h&&e.value.visibility===W.FRIEND?s={label:"好友可见",key:"vfriend",icon:p(Ie),children:[{label:"公开",key:"vpublic",icon:p(ae)},{label:"私密",key:"vprivate",icon:p(le)},{label:"关注可见",key:"vfollowing",icon:p(ie)}]}:s={label:"关注可见",key:"vfollowing",icon:p(ie),children:[{label:"公开",key:"vpublic",icon:p(ae)},{label:"私密",key:"vprivate",icon:p(le)}]},h&&e.value.visibility!==W.FRIEND&&((m=s.children)==null||m.push({label:"好友可见",key:"vfriend",icon:p(Ie)})),o.push(s),o}),S=o=>{y.push({name:"post",query:{id:o}})},q=(o,s)=>{if(o.target.dataset.detail){const m=o.target.dataset.detail.split(":");if(m.length===2){f.commit("refresh"),m[0]==="tag"?y.push({name:"home",query:{q:m[1],t:"tag"}}):y.push({name:"user",query:{s:m[1]}});return}}S(s)},N=o=>{switch(o){case"delete":_.value=!0;break;case"lock":case"unlock":R.value=!0;break;case"stick":case"unstick":T.value=!0;break;case"highlight":case"unhighlight":g.value=!0;break;case"vpublic":d.value=0,b.value=!0;break;case"vprivate":d.value=1,b.value=!0;break;case"vfriend":d.value=2,b.value=!0;break;case"vfollowing":d.value=3,b.value=!0;break}},H=()=>{Ze({id:e.value.id}).then(o=>{window.$message.success("删除成功"),y.replace("/"),setTimeout(()=>{f.commit("refresh")},50)}).catch(o=>{O.value=!1})},z=()=>{et({id:e.value.id}).then(o=>{D("reload"),o.lock_status===1?window.$message.success("锁定成功"):window.$message.success("解锁成功")}).catch(o=>{O.value=!1})},L=()=>{tt({id:e.value.id}).then(o=>{D("reload"),o.top_status===1?window.$message.success("置顶成功"):window.$message.success("取消置顶成功")}).catch(o=>{O.value=!1})},K=()=>{st({id:e.value.id}).then(o=>{e.value={...e.value,is_essence:o.highlight_status},o.highlight_status===1?window.$message.success("设为亮点成功"):window.$message.success("取消亮点成功")}).catch(o=>{O.value=!1})},F=()=>{let o=d.value;o==3&&(o=0),ot({id:e.value.id,visibility:o}).then(s=>{D("reload"),window.$message.success("修改可见性成功")}).catch(s=>{O.value=!1})},J=()=>{nt({id:e.value.id}).then(o=>{k.value=o.status,o.status?e.value={...e.value,upvote_count:e.value.upvote_count+1}:e.value={...e.value,upvote_count:e.value.upvote_count-1}}).catch(o=>{console.log(o)})},X=()=>{at({id:e.value.id}).then(o=>{U.value=o.status,o.status?e.value={...e.value,collection_count:e.value.collection_count+1}:e.value={...e.value,collection_count:e.value.collection_count-1}}).catch(o=>{console.log(o)})},G=()=>{Ft(`${window.location.origin}/#/post?id=${e.value.id}`),window.$message.success("链接已复制到剪贴板")};return ye(()=>{f.state.userInfo.id>0&&(We({id:e.value.id}).then(o=>{k.value=o.status}).catch(o=>{console.log(o)}),Xe({id:e.value.id}).then(o=>{U.value=o.status}).catch(o=>{console.log(o)}))}),(o,s)=>{const m=ke,$=ge("router-link"),C=Tt,M=oe,B=Pt,V=zt,ne=Mt,ve=Ae,he=Et,fe=qt,Q=Ut,Me=Oe,Ee=Le;return n(),c("div",{class:"detail-item",onClick:s[7]||(s[7]=E=>S(e.value.id))},[t(Ee,null,{avatar:a(()=>[t(m,{round:"",size:30,src:e.value.user.avatar},null,8,["src"])]),header:a(()=>[t($,{onClick:s[0]||(s[0]=j(()=>{},["stop"])),class:"username-link",to:{name:"user",query:{s:e.value.user.username}}},{default:a(()=>[x(I(e.value.user.nickname),1)]),_:1},8,["to"]),v("span",Vs," @"+I(e.value.user.username),1),e.value.is_top?(n(),P(C,{key:0,class:"top-tag",type:"warning",size:"small",round:""},{default:a(()=>[x(" 置顶 ")]),_:1})):u("",!0),e.value.visibility==l(W).PRIVATE?(n(),P(C,{key:1,class:"top-tag",type:"error",size:"small",round:""},{default:a(()=>[x(" 私密 ")]),_:1})):u("",!0),e.value.visibility==l(W).FRIEND?(n(),P(C,{key:2,class:"top-tag",type:"info",size:"small",round:""},{default:a(()=>[x(" 好友可见 ")]),_:1})):u("",!0)]),"header-extra":a(()=>[l(f).state.userInfo.is_admin||l(f).state.userInfo.id===e.value.user.id?(n(),c("div",Ys,[t(B,{placement:"bottom-end",trigger:"click",size:"small",options:w.value,onSelect:N},{default:a(()=>[t(M,{quaternary:"",circle:""},{icon:a(()=>[t(l(Y),null,{default:a(()=>[t(l(ut))]),_:1})]),_:1})]),_:1},8,["options"])])):u("",!0),t(V,{show:_.value,"onUpdate:show":s[1]||(s[1]=E=>_.value=E),"mask-closable":!1,preset:"dialog",title:"提示",content:"确定删除该泡泡动态吗?","positive-text":"确认","negative-text":"取消",onPositiveClick:H},null,8,["show"]),t(V,{show:R.value,"onUpdate:show":s[2]||(s[2]=E=>R.value=E),"mask-closable":!1,preset:"dialog",title:"提示",content:"确定"+(e.value.is_lock?"解锁":"锁定")+"该泡泡动态吗?","positive-text":"确认","negative-text":"取消",onPositiveClick:z},null,8,["show","content"]),t(V,{show:T.value,"onUpdate:show":s[3]||(s[3]=E=>T.value=E),"mask-closable":!1,preset:"dialog",title:"提示",content:"确定"+(e.value.is_top?"取消置顶":"置顶")+"该泡泡动态吗?","positive-text":"确认","negative-text":"取消",onPositiveClick:L},null,8,["show","content"]),t(V,{show:g.value,"onUpdate:show":s[4]||(s[4]=E=>g.value=E),"mask-closable":!1,preset:"dialog",title:"提示",content:"确定将该泡泡动态"+(e.value.is_essence?"取消亮点":"设为亮点")+"吗?","positive-text":"确认","negative-text":"取消",onPositiveClick:K},null,8,["show","content"]),t(V,{show:b.value,"onUpdate:show":s[5]||(s[5]=E=>b.value=E),"mask-closable":!1,preset:"dialog",title:"提示",content:"确定将该泡泡动态可见度修改为"+(d.value==0?"公开":d.value==1?"私密":d.value==2?"好友可见":"关注可见")+"吗?","positive-text":"确认","negative-text":"取消",onPositiveClick:F},null,8,["show","content"])]),footer:a(()=>[t(ne,{attachments:e.value.attachments},null,8,["attachments"]),t(ne,{attachments:e.value.charge_attachments,price:e.value.attachment_price},null,8,["attachments","price"]),t(ve,{imgs:e.value.imgs},null,8,["imgs"]),t(he,{videos:e.value.videos,full:!0},null,8,["videos"]),t(fe,{links:e.value.links},null,8,["links"]),v("div",Gs,[x(" 发布于 "+I(l(_e)(e.value.created_on))+" ",1),e.value.ip_loc?(n(),c("span",Qs,[t(Q,{vertical:""}),x(" "+I(e.value.ip_loc),1)])):u("",!0),!l(f).state.collapsedLeft&&e.value.created_on!=e.value.latest_replied_on?(n(),c("span",Ws,[t(Q,{vertical:""}),x(" 最后回复 "+I(l(_e)(e.value.latest_replied_on)),1)])):u("",!0)])]),action:a(()=>[v("div",Xs,[t(Me,{justify:"space-between"},{default:a(()=>[v("div",{class:"opt-item hover",onClick:j(J,["stop"])},[t(l(Y),{size:"20",class:"opt-item-icon"},{default:a(()=>[k.value?u("",!0):(n(),P(l(ct),{key:0})),k.value?(n(),P(l(rt),{key:1,color:"red"})):u("",!0)]),_:1}),x(" "+I(e.value.upvote_count),1)],8,Zs),v("div",eo,[t(l(Y),{size:"20",class:"opt-item-icon"},{default:a(()=>[t(l(_t))]),_:1}),x(" "+I(e.value.comment_count),1)]),v("div",{class:"opt-item hover",onClick:j(X,["stop"])},[t(l(Y),{size:"20",class:"opt-item-icon"},{default:a(()=>[U.value?u("",!0):(n(),P(l(pt),{key:0})),U.value?(n(),P(l(dt),{key:1,color:"#ff7600"})):u("",!0)]),_:1}),x(" "+I(e.value.collection_count),1)],8,to),v("div",{class:"opt-item hover",onClick:j(G,["stop"])},[t(l(Y),{size:"20",class:"opt-item-icon"},{default:a(()=>[t(l(mt))]),_:1}),x(" "+I(e.value.share_count),1)],8,so)]),_:1})])]),default:a(()=>[e.value.texts.length>0?(n(),c("div",Js,[(n(!0),c(ce,null,re(e.value.texts,E=>(n(),c("span",{key:E.id,class:"post-text",onClick:s[6]||(s[6]=j(qe=>q(qe,e.value.id),["stop"])),innerHTML:l(we)(E.content).content},null,8,Ks))),128))])):u("",!0)]),_:1})])}}});const no=A=>(Te("data-v-0d01659f"),A=A(),Pe(),A),ao={key:0,class:"detail-wrap"},lo={key:1,class:"empty-wrap"},io={key:0,class:"comment-opts-wrap"},uo=no(()=>v("span",{class:"comment-title-item"},"评论",-1)),co={key:2},ro={key:0,class:"skeleton-wrap"},_o={key:1},po={key:0,class:"empty-wrap"},mo={key:0,class:"load-more-spinner"},vo={key:1,class:"load-more-spinner"},ho={key:2,class:"load-more-spinner"},fo={key:3,class:"load-more-spinner"},ee=20,go=Z({__name:"Post",setup(A){const D=Nt(),i=r({}),h=r(!1),f=r(!1),y=r([]),k=ue(()=>+D.query.id),U=r("default"),_=r(!0);let R={loading(){},loaded(){},complete(){},error(){}};const T=z=>{U.value=z,z==="default"&&(_.value=!0),N(R)},g=()=>{i.value={id:0},h.value=!0,lt({id:k.value}).then(z=>{h.value=!1,i.value=z,N(R)}).catch(z=>{h.value=!1})};let b=1;const O=r(!1),d=r([]),e=z=>{O.value||$e({id:i.value.id,sort_strategy:"default",page:b,page_size:ee}).then(L=>{z!==null&&(R=z),L.list.length0&&(b===1?d.value=L.list:d.value.push(...L.list),y.value=d.value),R.loaded(),f.value=!1}).catch(L=>{f.value=!1,R.error()})};let p=1,w=r(!1);const S=r([]),q=z=>{w.value||$e({id:i.value.id,sort_strategy:"newest",page:p,page_size:ee}).then(L=>{z!==null&&(R=z),L.list.length0&&(p===1?S.value=L.list:S.value.push(...L.list),y.value=S.value),R.loaded(),f.value=!1}).catch(L=>{f.value=!1,R.error()})},N=z=>{k.value<1||(y.value.length===0&&(f.value=!0),U.value==="default"?(y.value=d.value,e(z)):(y.value=S.value,q(z)),f.value=!1)},H=()=>{b=1,O.value=!1,d.value=[],p=1,w.value=!1,S.value=[],N(R)};return ye(()=>{g()}),Be(k,()=>{k.value>0&&D.name==="post"&&g()}),(z,L)=>{const K=Ht,F=oo,J=St,X=Lt,G=Ot,o=At,s=Dt,m=Hs,$=Bt,C=Us,M=Oe,B=Rt;return n(),c("div",null,[t(K,{title:"泡泡详情",back:!0}),t(B,{class:"main-content-wrap",bordered:""},{default:a(()=>[t(G,null,{default:a(()=>[t(X,{show:h.value},{default:a(()=>[i.value.id>1?(n(),c("div",ao,[t(F,{post:i.value,onReload:g},null,8,["post"])])):(n(),c("div",lo,[t(J,{size:"large",description:"暂无数据"})]))]),_:1},8,["show"])]),_:1}),i.value.id>0?(n(),c("div",io,[t(s,{type:"bar","justify-content":"end",size:"small",animated:"","onUpdate:value":T},{prefix:a(()=>[uo]),default:a(()=>[t(o,{name:"default",tab:"默认"}),t(o,{name:"newest",tab:"最新"})]),_:1})])):u("",!0),i.value.id>0?(n(),P(G,{key:1},{default:a(()=>[t(m,{lock:i.value.is_lock,"post-id":i.value.id,onPostSuccess:H},null,8,["lock","post-id"])]),_:1})):u("",!0),i.value.id>0?(n(),c("div",co,[f.value?(n(),c("div",ro,[t($,{num:5})])):(n(),c("div",_o,[y.value.length===0?(n(),c("div",po,[t(J,{size:"large",description:"暂无评论,快来抢沙发"})])):u("",!0),(n(!0),c(ce,null,re(y.value,V=>(n(),P(G,{key:V.id},{default:a(()=>[t(C,{comment:V,onReload:H},null,8,["comment"])]),_:2},1024))),128))]))])):u("",!0),y.value.length>=ee?(n(),P(M,{key:3,justify:"center"},{default:a(()=>[t(l(Vt),{class:"load-more",slots:{complete:"没有更多数据了",error:"加载出错"},onInfinite:N},{spinner:a(()=>[_.value&&O.value?(n(),c("span",mo)):u("",!0),!_.value&&l(w)?(n(),c("span",vo)):u("",!0),_.value&&!O.value?(n(),c("span",ho,"加载评论")):u("",!0),!_.value&&!l(w)?(n(),c("span",fo,"加载评论")):u("",!0)]),_:1})]),_:1})):u("",!0)]),_:1})])}}});const Xo=se(go,[["__scopeId","data-v-0d01659f"]]);export{Xo as default}; diff --git a/web/dist/assets/Profile-39c7e09b.js b/web/dist/assets/Profile-389382b2.js similarity index 95% rename from web/dist/assets/Profile-39c7e09b.js rename to web/dist/assets/Profile-389382b2.js index 6029c4c5..15e72217 100644 --- a/web/dist/assets/Profile-39c7e09b.js +++ b/web/dist/assets/Profile-389382b2.js @@ -1 +1 @@ -import{_ as ve,a as _e}from"./post-item.vue_vue_type_style_index_0_lang-3755d97f.js";import{_ as me}from"./post-skeleton-bae19eed.js";import{_ as pe}from"./main-nav.vue_vue_type_style_index_0_lang-3b4e457a.js";import{d as fe,H as s,b as de,E as ge,r as he,f,k as i,bf as u,q as k,w as p,Y as y,e as r,j as c,x as d,A as C,y as J,F as K,u as O}from"./@vue-a481fc63.js";import{u as ke}from"./vuex-44de225f.js";import{b as we}from"./vue-router-e5a2430e.js";import{e as b,_ as ye}from"./index-7ab58e72.js";import{b as be}from"./formatTime-4210fcd1.js";import{W as Pe}from"./v3-infinite-loading-2c58ec2f.js";import{F as Ie,a as Te,o as Me,M as ze,f as qe,g as xe,I as Ce,k as $e,G as Le}from"./naive-ui-d8de3dda.js";import"./content-77341dc8.js";import"./@vicons-33f992ab.js";import"./paopao-video-player-2fe58954.js";import"./copy-to-clipboard-4ef7d3eb.js";import"./@babel-725317a4.js";import"./toggle-selection-93f4ad84.js";import"./vooks-6d99783e.js";import"./evtd-b614532e.js";import"./axios-4a70c6fc.js";/* empty css */import"./seemly-76b7b838.js";import"./vueuc-39372edb.js";import"./@css-render-7124a1a5.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";import"./moment-2ab8298d.js";const Se={class:"profile-baseinfo"},Be={class:"avatar"},Ne={class:"base-info"},Ve={class:"username"},De={class:"userinfo"},Fe={class:"info-item"},Ue={class:"info-item"},je={class:"userinfo"},Ee={class:"info-item"},He={class:"info-item"},Ae={key:0,class:"skeleton-wrap"},Ge={key:1},Re={key:0,class:"empty-wrap"},We={key:1},Ye={key:2},Je={class:"load-more-wrap"},Ke={class:"load-more-spinner"},Oe=fe({__name:"Profile",setup(Qe){const o=ke(),g=we(),n=s(!1),_=s(!1),a=s([]),$=s([]),L=s([]),S=s([]),B=s([]),N=s([]),P=s("post"),V=s(+g.query.p||1),D=s(1),F=s(1),U=s(1),j=s(1),t=s(+g.query.p||1),v=s(20),l=s(0),E=s(0),H=s(0),A=s(0),G=s(0),R=s(0),I=()=>{switch(P.value){case"post":T();break;case"comment":M();break;case"highlight":z();break;case"media":q();break;case"star":x();break}},T=()=>{n.value=!0,b({username:o.state.userInfo.username,style:"post",page:t.value,page_size:v.value}).then(e=>{n.value=!1,e.list.length===0&&(_.value=!0),t.value>1?a.value=a.value.concat(e.list):(a.value=e.list||[],window.scrollTo(0,0)),l.value=Math.ceil(e.pager.total_rows/v.value),$.value=a.value,E.value=l.value}).catch(e=>{a.value=[],t.value>1&&t.value--,n.value=!1})},M=()=>{n.value=!0,b({username:o.state.userInfo.username,style:"comment",page:t.value,page_size:v.value}).then(e=>{n.value=!1,e.list.length===0&&(_.value=!0),t.value>1?a.value=a.value.concat(e.list):(a.value=e.list||[],window.scrollTo(0,0)),l.value=Math.ceil(e.pager.total_rows/v.value),L.value=a.value,H.value=l.value}).catch(e=>{a.value=[],t.value>1&&t.value--,n.value=!1})},z=()=>{n.value=!0,b({username:o.state.userInfo.username,style:"highlight",page:t.value,page_size:v.value}).then(e=>{n.value=!1,e.list.length===0&&(_.value=!0),t.value>1?a.value=a.value.concat(e.list):(a.value=e.list||[],window.scrollTo(0,0)),l.value=Math.ceil(e.pager.total_rows/v.value),S.value=a.value,A.value=l.value}).catch(e=>{a.value=[],t.value>1&&t.value--,n.value=!1})},q=()=>{n.value=!0,b({username:o.state.userInfo.username,style:"media",page:t.value,page_size:v.value}).then(e=>{n.value=!1,e.list.length===0&&(_.value=!0),t.value>1?a.value=a.value.concat(e.list):(a.value=e.list||[],window.scrollTo(0,0)),l.value=Math.ceil(e.pager.total_rows/v.value),B.value=a.value,G.value=l.value}).catch(e=>{a.value=[],t.value>1&&t.value--,n.value=!1})},x=()=>{n.value=!0,b({username:o.state.userInfo.username,style:"star",page:t.value,page_size:v.value}).then(e=>{n.value=!1,e.list.length===0&&(_.value=!0),t.value>1?a.value=a.value.concat(e.list):(a.value=e.list||[],window.scrollTo(0,0)),l.value=Math.ceil(e.pager.total_rows/v.value),N.value=a.value,R.value=l.value}).catch(e=>{a.value=[],t.value>1&&t.value--,n.value=!1})},Q=e=>{switch(P.value=e,P.value){case"post":a.value=$.value,t.value=V.value,l.value=E.value,T();break;case"comment":a.value=L.value,t.value=D.value,l.value=H.value,M();break;case"highlight":a.value=S.value,t.value=F.value,l.value=A.value,z();break;case"media":a.value=B.value,t.value=U.value,l.value=G.value,q();break;case"star":a.value=N.value,t.value=j.value,l.value=R.value,x();break}},X=()=>{switch(P.value){case"post":V.value=t.value,T();break;case"comment":D.value=t.value,M();break;case"highlight":F.value=t.value,z();break;case"media":U.value=t.value,q();break;case"star":j.value=t.value,x();break}},Z=()=>{t.value{I()}),ge(()=>({path:g.path,query:g.query,refresh:o.state.refresh}),(e,m)=>{if(e.refresh!==m.refresh){t.value=+g.query.p||1,setTimeout(()=>{I()},0);return}m.path!=="/post"&&e.path==="/profile"&&(t.value=+g.query.p||1,setTimeout(()=>{I()},0))}),(e,m)=>{const ee=pe,ae=Me,te=ze,W=he("router-link"),w=qe,se=xe,oe=me,le=Ce,ne=ve,Y=Le,ue=_e,ie=Ie,re=$e,ce=Te;return r(),f("div",null,[i(ee,{title:"主页"}),u(o).state.userInfo.id>0?(r(),k(ie,{key:0,class:"main-content-wrap profile-wrap",bordered:""},{default:p(()=>[c("div",Se,[c("div",Be,[i(ae,{size:72,src:u(o).state.userInfo.avatar},null,8,["src"])]),c("div",Ne,[c("div",Ve,[c("strong",null,d(u(o).state.userInfo.nickname),1),c("span",null," @"+d(u(o).state.userInfo.username),1),u(o).state.userInfo.is_admin?(r(),k(te,{key:0,class:"top-tag",type:"error",size:"small",round:""},{default:p(()=>[C(" 管理员 ")]),_:1})):y("",!0)]),c("div",De,[c("span",Fe,"UID. "+d(u(o).state.userInfo.id),1),c("span",Ue,d(u(be)(u(o).state.userInfo.created_on))+" 加入",1)]),c("div",je,[c("span",Ee,[i(W,{onClick:m[0]||(m[0]=J(()=>{},["stop"])),class:"following-link",to:{name:"following",query:{s:u(o).state.userInfo.username,n:u(o).state.userInfo.nickname,t:"follows"}}},{default:p(()=>[C(" 关注 "+d(u(o).state.userInfo.follows),1)]),_:1},8,["to"])]),c("span",He,[i(W,{onClick:m[1]||(m[1]=J(()=>{},["stop"])),class:"following-link",to:{name:"following",query:{s:u(o).state.userInfo.username,n:u(o).state.userInfo.nickname,t:"followings"}}},{default:p(()=>[C(" 粉丝 "+d(u(o).state.userInfo.followings),1)]),_:1},8,["to"])])])])]),i(se,{class:"profile-tabs-wrap",type:"line",animated:"","onUpdate:value":Q},{default:p(()=>[i(w,{name:"post",tab:"泡泡"}),i(w,{name:"comment",tab:"评论"}),i(w,{name:"highlight",tab:"亮点"}),i(w,{name:"media",tab:"图文"}),i(w,{name:"star",tab:"喜欢"})]),_:1}),n.value&&a.value.length===0?(r(),f("div",Ae,[i(oe,{num:v.value},null,8,["num"])])):(r(),f("div",Ge,[a.value.length===0?(r(),f("div",Re,[i(le,{size:"large",description:"暂无数据"})])):y("",!0),u(o).state.desktopModelShow?(r(),f("div",We,[(r(!0),f(K,null,O(a.value,h=>(r(),k(Y,{key:h.id},{default:p(()=>[i(ne,{post:h},null,8,["post"])]),_:2},1024))),128))])):(r(),f("div",Ye,[(r(!0),f(K,null,O(a.value,h=>(r(),k(Y,{key:h.id},{default:p(()=>[i(ue,{post:h},null,8,["post"])]),_:2},1024))),128))]))]))]),_:1})):y("",!0),l.value>0?(r(),k(ce,{key:1,justify:"center"},{default:p(()=>[i(u(Pe),{class:"load-more",slots:{complete:"没有更多泡泡了",error:"加载出错"},onInfinite:m[2]||(m[2]=h=>Z())},{spinner:p(()=>[c("div",Je,[_.value?y("",!0):(r(),k(re,{key:0,size:14})),c("span",Ke,d(_.value?"没有更多泡泡了":"加载更多"),1)])]),_:1})]),_:1})):y("",!0)])}}});const Ca=ye(Oe,[["__scopeId","data-v-0542f078"]]);export{Ca as default}; +import{_ as ve,a as _e}from"./post-item.vue_vue_type_style_index_0_lang-cf11e2c5.js";import{_ as me}from"./post-skeleton-c82f8a59.js";import{_ as pe}from"./main-nav.vue_vue_type_style_index_0_lang-048bd56b.js";import{d as fe,H as s,b as de,E as ge,r as he,f,k as i,bf as u,q as k,w as p,Y as y,e as r,j as c,x as d,A as C,y as J,F as K,u as O}from"./@vue-a481fc63.js";import{u as ke}from"./vuex-44de225f.js";import{b as we}from"./vue-router-e5a2430e.js";import{e as b,_ as ye}from"./index-757c547c.js";import{b as be}from"./formatTime-4210fcd1.js";import{W as Pe}from"./v3-infinite-loading-2c58ec2f.js";import{F as Ie,a as Te,o as Me,M as ze,f as qe,g as xe,I as Ce,k as $e,G as Le}from"./naive-ui-d8de3dda.js";import"./content-d5264b98.js";import"./@vicons-1a3558c6.js";import"./paopao-video-player-2fe58954.js";import"./copy-to-clipboard-4ef7d3eb.js";import"./@babel-725317a4.js";import"./toggle-selection-93f4ad84.js";import"./vooks-6d99783e.js";import"./evtd-b614532e.js";import"./axios-4a70c6fc.js";/* empty css */import"./seemly-76b7b838.js";import"./vueuc-39372edb.js";import"./@css-render-7124a1a5.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";import"./moment-2ab8298d.js";const Se={class:"profile-baseinfo"},Be={class:"avatar"},Ne={class:"base-info"},Ve={class:"username"},De={class:"userinfo"},Fe={class:"info-item"},Ue={class:"info-item"},je={class:"userinfo"},Ee={class:"info-item"},He={class:"info-item"},Ae={key:0,class:"skeleton-wrap"},Ge={key:1},Re={key:0,class:"empty-wrap"},We={key:1},Ye={key:2},Je={class:"load-more-wrap"},Ke={class:"load-more-spinner"},Oe=fe({__name:"Profile",setup(Qe){const o=ke(),g=we(),n=s(!1),_=s(!1),a=s([]),$=s([]),L=s([]),S=s([]),B=s([]),N=s([]),P=s("post"),V=s(+g.query.p||1),D=s(1),F=s(1),U=s(1),j=s(1),t=s(+g.query.p||1),v=s(20),l=s(0),E=s(0),H=s(0),A=s(0),G=s(0),R=s(0),I=()=>{switch(P.value){case"post":T();break;case"comment":M();break;case"highlight":z();break;case"media":q();break;case"star":x();break}},T=()=>{n.value=!0,b({username:o.state.userInfo.username,style:"post",page:t.value,page_size:v.value}).then(e=>{n.value=!1,e.list.length===0&&(_.value=!0),t.value>1?a.value=a.value.concat(e.list):(a.value=e.list||[],window.scrollTo(0,0)),l.value=Math.ceil(e.pager.total_rows/v.value),$.value=a.value,E.value=l.value}).catch(e=>{a.value=[],t.value>1&&t.value--,n.value=!1})},M=()=>{n.value=!0,b({username:o.state.userInfo.username,style:"comment",page:t.value,page_size:v.value}).then(e=>{n.value=!1,e.list.length===0&&(_.value=!0),t.value>1?a.value=a.value.concat(e.list):(a.value=e.list||[],window.scrollTo(0,0)),l.value=Math.ceil(e.pager.total_rows/v.value),L.value=a.value,H.value=l.value}).catch(e=>{a.value=[],t.value>1&&t.value--,n.value=!1})},z=()=>{n.value=!0,b({username:o.state.userInfo.username,style:"highlight",page:t.value,page_size:v.value}).then(e=>{n.value=!1,e.list.length===0&&(_.value=!0),t.value>1?a.value=a.value.concat(e.list):(a.value=e.list||[],window.scrollTo(0,0)),l.value=Math.ceil(e.pager.total_rows/v.value),S.value=a.value,A.value=l.value}).catch(e=>{a.value=[],t.value>1&&t.value--,n.value=!1})},q=()=>{n.value=!0,b({username:o.state.userInfo.username,style:"media",page:t.value,page_size:v.value}).then(e=>{n.value=!1,e.list.length===0&&(_.value=!0),t.value>1?a.value=a.value.concat(e.list):(a.value=e.list||[],window.scrollTo(0,0)),l.value=Math.ceil(e.pager.total_rows/v.value),B.value=a.value,G.value=l.value}).catch(e=>{a.value=[],t.value>1&&t.value--,n.value=!1})},x=()=>{n.value=!0,b({username:o.state.userInfo.username,style:"star",page:t.value,page_size:v.value}).then(e=>{n.value=!1,e.list.length===0&&(_.value=!0),t.value>1?a.value=a.value.concat(e.list):(a.value=e.list||[],window.scrollTo(0,0)),l.value=Math.ceil(e.pager.total_rows/v.value),N.value=a.value,R.value=l.value}).catch(e=>{a.value=[],t.value>1&&t.value--,n.value=!1})},Q=e=>{switch(P.value=e,P.value){case"post":a.value=$.value,t.value=V.value,l.value=E.value,T();break;case"comment":a.value=L.value,t.value=D.value,l.value=H.value,M();break;case"highlight":a.value=S.value,t.value=F.value,l.value=A.value,z();break;case"media":a.value=B.value,t.value=U.value,l.value=G.value,q();break;case"star":a.value=N.value,t.value=j.value,l.value=R.value,x();break}},X=()=>{switch(P.value){case"post":V.value=t.value,T();break;case"comment":D.value=t.value,M();break;case"highlight":F.value=t.value,z();break;case"media":U.value=t.value,q();break;case"star":j.value=t.value,x();break}},Z=()=>{t.value{I()}),ge(()=>({path:g.path,query:g.query,refresh:o.state.refresh}),(e,m)=>{if(e.refresh!==m.refresh){t.value=+g.query.p||1,setTimeout(()=>{I()},0);return}m.path!=="/post"&&e.path==="/profile"&&(t.value=+g.query.p||1,setTimeout(()=>{I()},0))}),(e,m)=>{const ee=pe,ae=Me,te=ze,W=he("router-link"),w=qe,se=xe,oe=me,le=Ce,ne=ve,Y=Le,ue=_e,ie=Ie,re=$e,ce=Te;return r(),f("div",null,[i(ee,{title:"主页"}),u(o).state.userInfo.id>0?(r(),k(ie,{key:0,class:"main-content-wrap profile-wrap",bordered:""},{default:p(()=>[c("div",Se,[c("div",Be,[i(ae,{size:72,src:u(o).state.userInfo.avatar},null,8,["src"])]),c("div",Ne,[c("div",Ve,[c("strong",null,d(u(o).state.userInfo.nickname),1),c("span",null," @"+d(u(o).state.userInfo.username),1),u(o).state.userInfo.is_admin?(r(),k(te,{key:0,class:"top-tag",type:"error",size:"small",round:""},{default:p(()=>[C(" 管理员 ")]),_:1})):y("",!0)]),c("div",De,[c("span",Fe,"UID. "+d(u(o).state.userInfo.id),1),c("span",Ue,d(u(be)(u(o).state.userInfo.created_on))+" 加入",1)]),c("div",je,[c("span",Ee,[i(W,{onClick:m[0]||(m[0]=J(()=>{},["stop"])),class:"following-link",to:{name:"following",query:{s:u(o).state.userInfo.username,n:u(o).state.userInfo.nickname,t:"follows"}}},{default:p(()=>[C(" 关注 "+d(u(o).state.userInfo.follows),1)]),_:1},8,["to"])]),c("span",He,[i(W,{onClick:m[1]||(m[1]=J(()=>{},["stop"])),class:"following-link",to:{name:"following",query:{s:u(o).state.userInfo.username,n:u(o).state.userInfo.nickname,t:"followings"}}},{default:p(()=>[C(" 粉丝 "+d(u(o).state.userInfo.followings),1)]),_:1},8,["to"])])])])]),i(se,{class:"profile-tabs-wrap",type:"line",animated:"","onUpdate:value":Q},{default:p(()=>[i(w,{name:"post",tab:"泡泡"}),i(w,{name:"comment",tab:"评论"}),i(w,{name:"highlight",tab:"亮点"}),i(w,{name:"media",tab:"图文"}),i(w,{name:"star",tab:"喜欢"})]),_:1}),n.value&&a.value.length===0?(r(),f("div",Ae,[i(oe,{num:v.value},null,8,["num"])])):(r(),f("div",Ge,[a.value.length===0?(r(),f("div",Re,[i(le,{size:"large",description:"暂无数据"})])):y("",!0),u(o).state.desktopModelShow?(r(),f("div",We,[(r(!0),f(K,null,O(a.value,h=>(r(),k(Y,{key:h.id},{default:p(()=>[i(ne,{post:h},null,8,["post"])]),_:2},1024))),128))])):(r(),f("div",Ye,[(r(!0),f(K,null,O(a.value,h=>(r(),k(Y,{key:h.id},{default:p(()=>[i(ue,{post:h},null,8,["post"])]),_:2},1024))),128))]))]))]),_:1})):y("",!0),l.value>0?(r(),k(ce,{key:1,justify:"center"},{default:p(()=>[i(u(Pe),{class:"load-more",slots:{complete:"没有更多泡泡了",error:"加载出错"},onInfinite:m[2]||(m[2]=h=>Z())},{spinner:p(()=>[c("div",Je,[_.value?y("",!0):(r(),k(re,{key:0,size:14})),c("span",Ke,d(_.value?"没有更多泡泡了":"加载更多"),1)])]),_:1})]),_:1})):y("",!0)])}}});const Ca=ye(Oe,[["__scopeId","data-v-0542f078"]]);export{Ca as default}; diff --git a/web/dist/assets/Setting-63aa581f.js b/web/dist/assets/Setting-07adc927.js similarity index 84% rename from web/dist/assets/Setting-63aa581f.js rename to web/dist/assets/Setting-07adc927.js index 852cd5e5..03950ac8 100644 --- a/web/dist/assets/Setting-63aa581f.js +++ b/web/dist/assets/Setting-07adc927.js @@ -1 +1 @@ -import{_ as we}from"./main-nav.vue_vue_type_style_index_0_lang-3b4e457a.js";import{d as ye,H as d,R as J,b as ke,f as g,k as t,w as s,q as b,Y as _,e as r,j as m,bf as u,A as c,x as R,O as be,D as Ce,Z as q,y as A,$ as Ie,a0 as $e}from"./@vue-a481fc63.js";import{u as Pe}from"./vuex-44de225f.js";import{X as Q,Y as Se,Z as Ue,$ as Re,a0 as qe,a1 as Ae,a2 as Be,_ as Ne}from"./index-7ab58e72.js";import{X as ze}from"./@vicons-33f992ab.js";import{h as Ke,o as xe,e as De,B as Fe,b as je,j as Oe,S as Te,$ as Ve,K as Ee,a0 as Le,a1 as Me,d as We}from"./naive-ui-d8de3dda.js";import"./vue-router-e5a2430e.js";import"./vooks-6d99783e.js";import"./evtd-b614532e.js";import"./axios-4a70c6fc.js";/* empty css */import"./seemly-76b7b838.js";import"./vueuc-39372edb.js";import"./@css-render-7124a1a5.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 j=B=>(Ie("data-v-a681720e"),B=B(),$e(),B),Xe={class:"base-line avatar"},Ye={class:"base-line"},Ze=j(()=>m("span",{class:"base-label"},"昵称",-1)),Ge={key:0},He={class:"base-line"},Je=j(()=>m("span",{class:"base-label"},"用户名",-1)),Qe={key:0},et={key:1},tt=j(()=>m("br",null,null,-1)),at={key:2,class:"phone-bind-wrap"},st={class:"captcha-img-wrap"},nt={class:"captcha-img"},ot=["src"],lt={class:"form-submit-wrap"},rt={key:0},it={key:1},ut=j(()=>m("br",null,null,-1)),dt={key:2,class:"phone-bind-wrap"},ct={class:"captcha-img-wrap"},pt={class:"captcha-img"},_t=["src"],mt={class:"form-submit-wrap"},vt={key:1,class:"phone-bind-wrap"},ft={class:"form-submit-wrap"},gt=ye({__name:"Setting",setup(B){const ee="/v1/attachment",te="Bearer "+localStorage.getItem("PAOPAO_TOKEN"),N=d("public/avatar"),$="true".toLowerCase()==="true",ae="false".toLowerCase()==="true",o=Pe(),P=d(!1),z=d(!1),K=d(!1),M=d(),W=d(),C=d(!1),x=d(!1),S=d(!1),U=d(!1),I=d(60),y=d(!1),k=d(!1),X=d(),Y=d(),Z=d(),G=d(),a=J({id:"",b64s:"",imgCaptcha:"",phone:"",phone_captcha:"",password:"",old_password:"",reenteredPassword:""}),i=J({id:"",b64s:"",imgCaptcha:"",activate_code:""}),se=async n=>{var e,v;return N.value==="public/avatar"&&!["image/png","image/jpg","image/jpeg"].includes((e=n.file.file)==null?void 0:e.type)?(window.$message.warning("头像仅允许 png/jpg 格式"),!1):N.value==="image"&&((v=n.file.file)==null?void 0:v.size)>1048576?(window.$message.warning("头像大小不能超过1MB"),!1):!0},ne=({file:n,event:e})=>{var v;try{let f=JSON.parse((v=e.target)==null?void 0:v.response);f.code===0&&N.value==="public/avatar"&&Se({avatar:f.data.content}).then(p=>{var D;window.$message.success("头像更新成功"),(D=M.value)==null||D.clear(),o.commit("updateUserinfo",{...o.state.userInfo,avatar:f.data.content})}).catch(p=>{console.log(p)})}catch{window.$message.error("上传失败")}},oe=(n,e)=>!!a.password&&a.password.startsWith(e)&&a.password.length>=e.length,le=(n,e)=>e===a.password,re=()=>{var n;a.reenteredPassword&&((n=G.value)==null||n.validate({trigger:"password-input"}))},ie=n=>{var e;n.preventDefault(),(e=Z.value)==null||e.validate(v=>{v||(x.value=!0,Ue({password:a.password,old_password:a.old_password}).then(f=>{x.value=!1,S.value=!1,window.$message.success("密码重置成功"),o.commit("userLogout"),o.commit("triggerAuth",!0),o.commit("triggerAuthKey","signin")}).catch(f=>{x.value=!1}))})},ue=n=>{var e;n.preventDefault(),(e=X.value)==null||e.validate(v=>{v||(z.value=!0,Re({phone:a.phone,captcha:a.phone_captcha}).then(f=>{z.value=!1,y.value=!1,window.$message.success("绑定成功"),o.commit("updateUserinfo",{...o.state.userInfo,phone:a.phone}),a.id="",a.b64s="",a.imgCaptcha="",a.phone="",a.phone_captcha=""}).catch(f=>{z.value=!1}))})},de=n=>{var e;n.preventDefault(),(e=Y.value)==null||e.validate(v=>{if(i.imgCaptcha===""){window.$message.warning("请输入图片验证码");return}P.value=!0,v||(K.value=!0,qe({activate_code:i.activate_code,captcha_id:i.id,imgCaptcha:i.imgCaptcha}).then(f=>{K.value=!1,k.value=!1,window.$message.success("激活成功"),o.commit("updateUserinfo",{...o.state.userInfo,activation:i.activate_code}),i.id="",i.b64s="",i.imgCaptcha="",i.activate_code=""}).catch(f=>{K.value=!1,f.code===20012&&T()}))})},O=()=>{Q().then(n=>{a.id=n.id,a.b64s=n.b64s}).catch(n=>{console.log(n)})},T=()=>{Q().then(n=>{i.id=n.id,i.b64s=n.b64s}).catch(n=>{console.log(n)})},ce=()=>{Ae({nickname:o.state.userInfo.nickname||""}).then(n=>{C.value=!1,window.$message.success("昵称修改成功")}).catch(n=>{C.value=!0})},pe=()=>{if(!(I.value>0&&U.value)){if(a.imgCaptcha===""){window.$message.warning("请输入图片验证码");return}P.value=!0,Be({phone:a.phone,img_captcha:a.imgCaptcha,img_captcha_id:a.id}).then(n=>{U.value=!0,P.value=!1,window.$message.success("发送成功");let e=setInterval(()=>{I.value--,I.value===0&&(clearInterval(e),I.value=60,U.value=!1)},1e3)}).catch(n=>{P.value=!1,n.code===20012&&O(),console.log(n)})}},_e={phone:[{required:!0,message:"请输入手机号",trigger:["input"],validator:(n,e)=>/^[1]+[3-9]{1}\d{9}$/.test(e)}],phone_captcha:[{required:!0,message:"请输入手机验证码"}]},me={activate_code:[{required:!0,message:"请输入激活码",trigger:["input"],validator:(n,e)=>/\d{6}$/.test(e)}]},ve={password:[{required:!0,message:"请输入新密码"}],old_password:[{required:!0,message:"请输入旧密码"}],reenteredPassword:[{required:!0,message:"请再次输入密码",trigger:["input","blur"]},{validator:oe,message:"两次密码输入不一致",trigger:"input"},{validator:le,message:"两次密码输入不一致",trigger:["blur","password-input"]}]},fe=()=>{C.value=!0,setTimeout(()=>{var n;(n=W.value)==null||n.focus()},30)};return ke(()=>{o.state.userInfo.id===0&&(o.commit("triggerAuth",!0),o.commit("triggerAuthKey","signin")),O(),T()}),(n,e)=>{const v=we,f=xe,p=De,D=Fe,h=je,ge=Oe,F=Ke,H=Te,w=Ve,he=Ee,V=Le,E=Me,L=We;return r(),g("div",null,[t(v,{title:"设置",theme:""}),t(F,{title:"基本信息",size:"small",class:"setting-card"},{default:s(()=>[m("div",Xe,[t(f,{class:"avatar-img",size:80,src:u(o).state.userInfo.avatar},null,8,["src"]),!$||$&&u(o).state.userInfo.phone&&u(o).state.userInfo.phone.length>0?(r(),b(D,{key:0,ref_key:"avatarRef",ref:M,action:ee,headers:{Authorization:te},data:{type:N.value},onBeforeUpload:se,onFinish:ne},{default:s(()=>[t(p,{size:"small"},{default:s(()=>[c("更改头像")]),_:1})]),_:1},8,["headers","data"])):_("",!0)]),m("div",Ye,[Ze,C.value?_("",!0):(r(),g("div",Ge,R(u(o).state.userInfo.nickname),1)),be(t(h,{ref_key:"inputInstRef",ref:W,class:"nickname-input",value:u(o).state.userInfo.nickname,"onUpdate:value":e[0]||(e[0]=l=>u(o).state.userInfo.nickname=l),type:"text",size:"small",placeholder:"请输入昵称",onBlur:ce,maxlength:16},null,8,["value"]),[[Ce,C.value]]),!C.value&&(!$||$&&u(o).state.userInfo.phone&&u(o).state.userInfo.phone.length>0&&u(o).state.userInfo.status==1)?(r(),b(p,{key:1,quaternary:"",round:"",type:"success",size:"small",onClick:fe},{icon:s(()=>[t(ge,null,{default:s(()=>[t(u(ze))]),_:1})]),_:1})):_("",!0)]),m("div",He,[Je,c(" @"+R(u(o).state.userInfo.username),1)])]),_:1}),$?(r(),b(F,{key:0,title:"手机号",size:"small",class:"setting-card"},{default:s(()=>[u(o).state.userInfo.phone&&u(o).state.userInfo.phone.length>0?(r(),g("div",Qe,[c(R(u(o).state.userInfo.phone)+" ",1),!y.value&&u(o).state.userInfo.status==1?(r(),b(p,{key:0,quaternary:"",round:"",type:"success",onClick:e[1]||(e[1]=l=>y.value=!0)},{default:s(()=>[c(" 换绑手机 ")]),_:1})):_("",!0)])):(r(),g("div",et,[t(H,{title:"手机绑定提示",type:"warning"},{default:s(()=>[c(" 成功绑定手机后,才能进行换头像、发动态、回复等交互~"),tt,y.value?_("",!0):(r(),g("a",{key:0,class:"hash-link",onClick:e[2]||(e[2]=l=>y.value=!0)}," 立即绑定 "))]),_:1})])),y.value?(r(),g("div",at,[t(L,{ref_key:"phoneFormRef",ref:X,model:a,rules:_e},{default:s(()=>[t(w,{path:"phone",label:"手机号"},{default:s(()=>[t(h,{value:a.phone,"onUpdate:value":e[3]||(e[3]=l=>a.phone=l.trim()),placeholder:"请输入中国大陆手机号",onKeydown:e[4]||(e[4]=q(A(()=>{},["prevent"]),["enter"]))},null,8,["value"])]),_:1}),t(w,{path:"img_captcha",label:"图形验证码"},{default:s(()=>[m("div",st,[t(h,{value:a.imgCaptcha,"onUpdate:value":e[5]||(e[5]=l=>a.imgCaptcha=l),placeholder:"请输入图形验证码后获取验证码"},null,8,["value"]),m("div",nt,[a.b64s?(r(),g("img",{key:0,src:a.b64s,onClick:O},null,8,ot)):_("",!0)])])]),_:1}),t(w,{path:"phone_captcha",label:"短信验证码"},{default:s(()=>[t(he,null,{default:s(()=>[t(h,{value:a.phone_captcha,"onUpdate:value":e[6]||(e[6]=l=>a.phone_captcha=l),placeholder:"请输入收到的短信验证码"},null,8,["value"]),t(p,{type:"primary",ghost:"",disabled:U.value,loading:P.value,onClick:pe},{default:s(()=>[c(R(I.value>0&&U.value?I.value+"s后重新发送":"发送验证码"),1)]),_:1},8,["disabled","loading"])]),_:1})]),_:1}),t(E,{gutter:[0,24]},{default:s(()=>[t(V,{span:24},{default:s(()=>[m("div",lt,[t(p,{quaternary:"",round:"",onClick:e[7]||(e[7]=l=>y.value=!1)},{default:s(()=>[c(" 取消 ")]),_:1}),t(p,{secondary:"",round:"",type:"primary",loading:z.value,onClick:ue},{default:s(()=>[c(" 绑定 ")]),_:1},8,["loading"])])]),_:1})]),_:1})]),_:1},8,["model"])])):_("",!0)]),_:1})):_("",!0),ae?(r(),b(F,{key:1,title:"激活码",size:"small",class:"setting-card"},{default:s(()=>[u(o).state.userInfo.activation&&u(o).state.userInfo.activation.length>0?(r(),g("div",rt,[c(R(u(o).state.userInfo.activation)+" ",1),k.value?_("",!0):(r(),b(p,{key:0,quaternary:"",round:"",type:"success",onClick:e[8]||(e[8]=l=>k.value=!0)},{default:s(()=>[c(" 重新激活 ")]),_:1}))])):(r(),g("div",it,[t(H,{title:"激活码激活提示",type:"warning"},{default:s(()=>[c(" 成功激活后后,才能发(公开/好友可见)动态、回复~"),ut,k.value?_("",!0):(r(),g("a",{key:0,class:"hash-link",onClick:e[9]||(e[9]=l=>k.value=!0)}," 立即激活 "))]),_:1})])),k.value?(r(),g("div",dt,[t(L,{ref_key:"activateFormRef",ref:Y,model:i,rules:me},{default:s(()=>[t(w,{path:"activate_code",label:"激活码"},{default:s(()=>[t(h,{value:i.activate_code,"onUpdate:value":e[10]||(e[10]=l=>i.activate_code=l.trim()),placeholder:"请输入激活码",onKeydown:e[11]||(e[11]=q(A(()=>{},["prevent"]),["enter"]))},null,8,["value"])]),_:1}),t(w,{path:"img_captcha",label:"图形验证码"},{default:s(()=>[m("div",ct,[t(h,{value:i.imgCaptcha,"onUpdate:value":e[12]||(e[12]=l=>i.imgCaptcha=l),placeholder:"请输入图形验证码后获取验证码"},null,8,["value"]),m("div",pt,[i.b64s?(r(),g("img",{key:0,src:i.b64s,onClick:T},null,8,_t)):_("",!0)])])]),_:1}),t(E,{gutter:[0,24]},{default:s(()=>[t(V,{span:24},{default:s(()=>[m("div",mt,[t(p,{quaternary:"",round:"",onClick:e[13]||(e[13]=l=>k.value=!1)},{default:s(()=>[c(" 取消 ")]),_:1}),t(p,{secondary:"",round:"",type:"primary",loading:K.value,onClick:de},{default:s(()=>[c(" 激活 ")]),_:1},8,["loading"])])]),_:1})]),_:1})]),_:1},8,["model"])])):_("",!0)]),_:1})):_("",!0),t(F,{title:"账户安全",size:"small",class:"setting-card"},{default:s(()=>[c(" 您已设置密码 "),S.value?_("",!0):(r(),b(p,{key:0,quaternary:"",round:"",type:"success",onClick:e[14]||(e[14]=l=>S.value=!0)},{default:s(()=>[c(" 重置密码 ")]),_:1})),S.value?(r(),g("div",vt,[t(L,{ref_key:"formRef",ref:Z,model:a,rules:ve},{default:s(()=>[t(w,{path:"old_password",label:"旧密码"},{default:s(()=>[t(h,{value:a.old_password,"onUpdate:value":e[15]||(e[15]=l=>a.old_password=l),type:"password",placeholder:"请输入当前密码",onKeydown:e[16]||(e[16]=q(A(()=>{},["prevent"]),["enter"]))},null,8,["value"])]),_:1}),t(w,{path:"password",label:"新密码"},{default:s(()=>[t(h,{value:a.password,"onUpdate:value":e[17]||(e[17]=l=>a.password=l),type:"password",placeholder:"请输入新密码",onInput:re,onKeydown:e[18]||(e[18]=q(A(()=>{},["prevent"]),["enter"]))},null,8,["value"])]),_:1}),t(w,{ref_key:"rPasswordFormItemRef",ref:G,first:"",path:"reenteredPassword",label:"重复密码"},{default:s(()=>[t(h,{value:a.reenteredPassword,"onUpdate:value":e[19]||(e[19]=l=>a.reenteredPassword=l),disabled:!a.password,type:"password",placeholder:"请再次输入密码",onKeydown:e[20]||(e[20]=q(A(()=>{},["prevent"]),["enter"]))},null,8,["value","disabled"])]),_:1},512),t(E,{gutter:[0,24]},{default:s(()=>[t(V,{span:24},{default:s(()=>[m("div",ft,[t(p,{quaternary:"",round:"",onClick:e[21]||(e[21]=l=>S.value=!1)},{default:s(()=>[c(" 取消 ")]),_:1}),t(p,{secondary:"",round:"",type:"primary",loading:x.value,onClick:ie},{default:s(()=>[c(" 更新 ")]),_:1},8,["loading"])])]),_:1})]),_:1})]),_:1},8,["model"])])):_("",!0)]),_:1})])}}});const Ot=Ne(gt,[["__scopeId","data-v-a681720e"]]);export{Ot as default}; +import{_ as we}from"./main-nav.vue_vue_type_style_index_0_lang-048bd56b.js";import{d as ye,H as d,R as X,b as ke,f as g,k as t,w as s,q as b,Y as _,e as r,j as m,bf as u,A as c,x as R,O as be,D as Ce,Z as q,y as A,$ as Ie,a0 as $e}from"./@vue-a481fc63.js";import{u as Pe}from"./vuex-44de225f.js";import{X as Q,Y as Se,Z as Ue,$ as Re,a0 as qe,a1 as Ae,a2 as Be,_ as Ne}from"./index-757c547c.js";import{Y as ze}from"./@vicons-1a3558c6.js";import{h as Ke,o as xe,e as De,B as Fe,b as je,j as Oe,S as Te,$ as Ve,K as Ee,a0 as Le,a1 as Me,d as Ye}from"./naive-ui-d8de3dda.js";import"./vue-router-e5a2430e.js";import"./vooks-6d99783e.js";import"./evtd-b614532e.js";import"./axios-4a70c6fc.js";/* empty css */import"./seemly-76b7b838.js";import"./vueuc-39372edb.js";import"./@css-render-7124a1a5.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 j=B=>(Ie("data-v-a681720e"),B=B(),$e(),B),We={class:"base-line avatar"},Ze={class:"base-line"},Ge=j(()=>m("span",{class:"base-label"},"昵称",-1)),He={key:0},Je={class:"base-line"},Xe=j(()=>m("span",{class:"base-label"},"用户名",-1)),Qe={key:0},et={key:1},tt=j(()=>m("br",null,null,-1)),at={key:2,class:"phone-bind-wrap"},st={class:"captcha-img-wrap"},nt={class:"captcha-img"},ot=["src"],lt={class:"form-submit-wrap"},rt={key:0},it={key:1},ut=j(()=>m("br",null,null,-1)),dt={key:2,class:"phone-bind-wrap"},ct={class:"captcha-img-wrap"},pt={class:"captcha-img"},_t=["src"],mt={class:"form-submit-wrap"},vt={key:1,class:"phone-bind-wrap"},ft={class:"form-submit-wrap"},gt=ye({__name:"Setting",setup(B){const ee="/v1/attachment",te="Bearer "+localStorage.getItem("PAOPAO_TOKEN"),N=d("public/avatar"),$="true".toLowerCase()==="true",ae="false".toLowerCase()==="true",o=Pe(),P=d(!1),z=d(!1),K=d(!1),M=d(),Y=d(),C=d(!1),x=d(!1),S=d(!1),U=d(!1),I=d(60),y=d(!1),k=d(!1),W=d(),Z=d(),G=d(),H=d(),a=X({id:"",b64s:"",imgCaptcha:"",phone:"",phone_captcha:"",password:"",old_password:"",reenteredPassword:""}),i=X({id:"",b64s:"",imgCaptcha:"",activate_code:""}),se=async n=>{var e,v;return N.value==="public/avatar"&&!["image/png","image/jpg","image/jpeg"].includes((e=n.file.file)==null?void 0:e.type)?(window.$message.warning("头像仅允许 png/jpg 格式"),!1):N.value==="image"&&((v=n.file.file)==null?void 0:v.size)>1048576?(window.$message.warning("头像大小不能超过1MB"),!1):!0},ne=({file:n,event:e})=>{var v;try{let f=JSON.parse((v=e.target)==null?void 0:v.response);f.code===0&&N.value==="public/avatar"&&Se({avatar:f.data.content}).then(p=>{var D;window.$message.success("头像更新成功"),(D=M.value)==null||D.clear(),o.commit("updateUserinfo",{...o.state.userInfo,avatar:f.data.content})}).catch(p=>{console.log(p)})}catch{window.$message.error("上传失败")}},oe=(n,e)=>!!a.password&&a.password.startsWith(e)&&a.password.length>=e.length,le=(n,e)=>e===a.password,re=()=>{var n;a.reenteredPassword&&((n=H.value)==null||n.validate({trigger:"password-input"}))},ie=n=>{var e;n.preventDefault(),(e=G.value)==null||e.validate(v=>{v||(x.value=!0,Ue({password:a.password,old_password:a.old_password}).then(f=>{x.value=!1,S.value=!1,window.$message.success("密码重置成功"),o.commit("userLogout"),o.commit("triggerAuth",!0),o.commit("triggerAuthKey","signin")}).catch(f=>{x.value=!1}))})},ue=n=>{var e;n.preventDefault(),(e=W.value)==null||e.validate(v=>{v||(z.value=!0,Re({phone:a.phone,captcha:a.phone_captcha}).then(f=>{z.value=!1,y.value=!1,window.$message.success("绑定成功"),o.commit("updateUserinfo",{...o.state.userInfo,phone:a.phone}),a.id="",a.b64s="",a.imgCaptcha="",a.phone="",a.phone_captcha=""}).catch(f=>{z.value=!1}))})},de=n=>{var e;n.preventDefault(),(e=Z.value)==null||e.validate(v=>{if(i.imgCaptcha===""){window.$message.warning("请输入图片验证码");return}P.value=!0,v||(K.value=!0,qe({activate_code:i.activate_code,captcha_id:i.id,imgCaptcha:i.imgCaptcha}).then(f=>{K.value=!1,k.value=!1,window.$message.success("激活成功"),o.commit("updateUserinfo",{...o.state.userInfo,activation:i.activate_code}),i.id="",i.b64s="",i.imgCaptcha="",i.activate_code=""}).catch(f=>{K.value=!1,f.code===20012&&T()}))})},O=()=>{Q().then(n=>{a.id=n.id,a.b64s=n.b64s}).catch(n=>{console.log(n)})},T=()=>{Q().then(n=>{i.id=n.id,i.b64s=n.b64s}).catch(n=>{console.log(n)})},ce=()=>{Ae({nickname:o.state.userInfo.nickname||""}).then(n=>{C.value=!1,window.$message.success("昵称修改成功")}).catch(n=>{C.value=!0})},pe=()=>{if(!(I.value>0&&U.value)){if(a.imgCaptcha===""){window.$message.warning("请输入图片验证码");return}P.value=!0,Be({phone:a.phone,img_captcha:a.imgCaptcha,img_captcha_id:a.id}).then(n=>{U.value=!0,P.value=!1,window.$message.success("发送成功");let e=setInterval(()=>{I.value--,I.value===0&&(clearInterval(e),I.value=60,U.value=!1)},1e3)}).catch(n=>{P.value=!1,n.code===20012&&O(),console.log(n)})}},_e={phone:[{required:!0,message:"请输入手机号",trigger:["input"],validator:(n,e)=>/^[1]+[3-9]{1}\d{9}$/.test(e)}],phone_captcha:[{required:!0,message:"请输入手机验证码"}]},me={activate_code:[{required:!0,message:"请输入激活码",trigger:["input"],validator:(n,e)=>/\d{6}$/.test(e)}]},ve={password:[{required:!0,message:"请输入新密码"}],old_password:[{required:!0,message:"请输入旧密码"}],reenteredPassword:[{required:!0,message:"请再次输入密码",trigger:["input","blur"]},{validator:oe,message:"两次密码输入不一致",trigger:"input"},{validator:le,message:"两次密码输入不一致",trigger:["blur","password-input"]}]},fe=()=>{C.value=!0,setTimeout(()=>{var n;(n=Y.value)==null||n.focus()},30)};return ke(()=>{o.state.userInfo.id===0&&(o.commit("triggerAuth",!0),o.commit("triggerAuthKey","signin")),O(),T()}),(n,e)=>{const v=we,f=xe,p=De,D=Fe,h=je,ge=Oe,F=Ke,J=Te,w=Ve,he=Ee,V=Le,E=Me,L=Ye;return r(),g("div",null,[t(v,{title:"设置",theme:""}),t(F,{title:"基本信息",size:"small",class:"setting-card"},{default:s(()=>[m("div",We,[t(f,{class:"avatar-img",size:80,src:u(o).state.userInfo.avatar},null,8,["src"]),!$||$&&u(o).state.userInfo.phone&&u(o).state.userInfo.phone.length>0?(r(),b(D,{key:0,ref_key:"avatarRef",ref:M,action:ee,headers:{Authorization:te},data:{type:N.value},onBeforeUpload:se,onFinish:ne},{default:s(()=>[t(p,{size:"small"},{default:s(()=>[c("更改头像")]),_:1})]),_:1},8,["headers","data"])):_("",!0)]),m("div",Ze,[Ge,C.value?_("",!0):(r(),g("div",He,R(u(o).state.userInfo.nickname),1)),be(t(h,{ref_key:"inputInstRef",ref:Y,class:"nickname-input",value:u(o).state.userInfo.nickname,"onUpdate:value":e[0]||(e[0]=l=>u(o).state.userInfo.nickname=l),type:"text",size:"small",placeholder:"请输入昵称",onBlur:ce,maxlength:16},null,8,["value"]),[[Ce,C.value]]),!C.value&&(!$||$&&u(o).state.userInfo.phone&&u(o).state.userInfo.phone.length>0&&u(o).state.userInfo.status==1)?(r(),b(p,{key:1,quaternary:"",round:"",type:"success",size:"small",onClick:fe},{icon:s(()=>[t(ge,null,{default:s(()=>[t(u(ze))]),_:1})]),_:1})):_("",!0)]),m("div",Je,[Xe,c(" @"+R(u(o).state.userInfo.username),1)])]),_:1}),$?(r(),b(F,{key:0,title:"手机号",size:"small",class:"setting-card"},{default:s(()=>[u(o).state.userInfo.phone&&u(o).state.userInfo.phone.length>0?(r(),g("div",Qe,[c(R(u(o).state.userInfo.phone)+" ",1),!y.value&&u(o).state.userInfo.status==1?(r(),b(p,{key:0,quaternary:"",round:"",type:"success",onClick:e[1]||(e[1]=l=>y.value=!0)},{default:s(()=>[c(" 换绑手机 ")]),_:1})):_("",!0)])):(r(),g("div",et,[t(J,{title:"手机绑定提示",type:"warning"},{default:s(()=>[c(" 成功绑定手机后,才能进行换头像、发动态、回复等交互~"),tt,y.value?_("",!0):(r(),g("a",{key:0,class:"hash-link",onClick:e[2]||(e[2]=l=>y.value=!0)}," 立即绑定 "))]),_:1})])),y.value?(r(),g("div",at,[t(L,{ref_key:"phoneFormRef",ref:W,model:a,rules:_e},{default:s(()=>[t(w,{path:"phone",label:"手机号"},{default:s(()=>[t(h,{value:a.phone,"onUpdate:value":e[3]||(e[3]=l=>a.phone=l.trim()),placeholder:"请输入中国大陆手机号",onKeydown:e[4]||(e[4]=q(A(()=>{},["prevent"]),["enter"]))},null,8,["value"])]),_:1}),t(w,{path:"img_captcha",label:"图形验证码"},{default:s(()=>[m("div",st,[t(h,{value:a.imgCaptcha,"onUpdate:value":e[5]||(e[5]=l=>a.imgCaptcha=l),placeholder:"请输入图形验证码后获取验证码"},null,8,["value"]),m("div",nt,[a.b64s?(r(),g("img",{key:0,src:a.b64s,onClick:O},null,8,ot)):_("",!0)])])]),_:1}),t(w,{path:"phone_captcha",label:"短信验证码"},{default:s(()=>[t(he,null,{default:s(()=>[t(h,{value:a.phone_captcha,"onUpdate:value":e[6]||(e[6]=l=>a.phone_captcha=l),placeholder:"请输入收到的短信验证码"},null,8,["value"]),t(p,{type:"primary",ghost:"",disabled:U.value,loading:P.value,onClick:pe},{default:s(()=>[c(R(I.value>0&&U.value?I.value+"s后重新发送":"发送验证码"),1)]),_:1},8,["disabled","loading"])]),_:1})]),_:1}),t(E,{gutter:[0,24]},{default:s(()=>[t(V,{span:24},{default:s(()=>[m("div",lt,[t(p,{quaternary:"",round:"",onClick:e[7]||(e[7]=l=>y.value=!1)},{default:s(()=>[c(" 取消 ")]),_:1}),t(p,{secondary:"",round:"",type:"primary",loading:z.value,onClick:ue},{default:s(()=>[c(" 绑定 ")]),_:1},8,["loading"])])]),_:1})]),_:1})]),_:1},8,["model"])])):_("",!0)]),_:1})):_("",!0),ae?(r(),b(F,{key:1,title:"激活码",size:"small",class:"setting-card"},{default:s(()=>[u(o).state.userInfo.activation&&u(o).state.userInfo.activation.length>0?(r(),g("div",rt,[c(R(u(o).state.userInfo.activation)+" ",1),k.value?_("",!0):(r(),b(p,{key:0,quaternary:"",round:"",type:"success",onClick:e[8]||(e[8]=l=>k.value=!0)},{default:s(()=>[c(" 重新激活 ")]),_:1}))])):(r(),g("div",it,[t(J,{title:"激活码激活提示",type:"warning"},{default:s(()=>[c(" 成功激活后后,才能发(公开/好友可见)动态、回复~"),ut,k.value?_("",!0):(r(),g("a",{key:0,class:"hash-link",onClick:e[9]||(e[9]=l=>k.value=!0)}," 立即激活 "))]),_:1})])),k.value?(r(),g("div",dt,[t(L,{ref_key:"activateFormRef",ref:Z,model:i,rules:me},{default:s(()=>[t(w,{path:"activate_code",label:"激活码"},{default:s(()=>[t(h,{value:i.activate_code,"onUpdate:value":e[10]||(e[10]=l=>i.activate_code=l.trim()),placeholder:"请输入激活码",onKeydown:e[11]||(e[11]=q(A(()=>{},["prevent"]),["enter"]))},null,8,["value"])]),_:1}),t(w,{path:"img_captcha",label:"图形验证码"},{default:s(()=>[m("div",ct,[t(h,{value:i.imgCaptcha,"onUpdate:value":e[12]||(e[12]=l=>i.imgCaptcha=l),placeholder:"请输入图形验证码后获取验证码"},null,8,["value"]),m("div",pt,[i.b64s?(r(),g("img",{key:0,src:i.b64s,onClick:T},null,8,_t)):_("",!0)])])]),_:1}),t(E,{gutter:[0,24]},{default:s(()=>[t(V,{span:24},{default:s(()=>[m("div",mt,[t(p,{quaternary:"",round:"",onClick:e[13]||(e[13]=l=>k.value=!1)},{default:s(()=>[c(" 取消 ")]),_:1}),t(p,{secondary:"",round:"",type:"primary",loading:K.value,onClick:de},{default:s(()=>[c(" 激活 ")]),_:1},8,["loading"])])]),_:1})]),_:1})]),_:1},8,["model"])])):_("",!0)]),_:1})):_("",!0),t(F,{title:"账户安全",size:"small",class:"setting-card"},{default:s(()=>[c(" 您已设置密码 "),S.value?_("",!0):(r(),b(p,{key:0,quaternary:"",round:"",type:"success",onClick:e[14]||(e[14]=l=>S.value=!0)},{default:s(()=>[c(" 重置密码 ")]),_:1})),S.value?(r(),g("div",vt,[t(L,{ref_key:"formRef",ref:G,model:a,rules:ve},{default:s(()=>[t(w,{path:"old_password",label:"旧密码"},{default:s(()=>[t(h,{value:a.old_password,"onUpdate:value":e[15]||(e[15]=l=>a.old_password=l),type:"password",placeholder:"请输入当前密码",onKeydown:e[16]||(e[16]=q(A(()=>{},["prevent"]),["enter"]))},null,8,["value"])]),_:1}),t(w,{path:"password",label:"新密码"},{default:s(()=>[t(h,{value:a.password,"onUpdate:value":e[17]||(e[17]=l=>a.password=l),type:"password",placeholder:"请输入新密码",onInput:re,onKeydown:e[18]||(e[18]=q(A(()=>{},["prevent"]),["enter"]))},null,8,["value"])]),_:1}),t(w,{ref_key:"rPasswordFormItemRef",ref:H,first:"",path:"reenteredPassword",label:"重复密码"},{default:s(()=>[t(h,{value:a.reenteredPassword,"onUpdate:value":e[19]||(e[19]=l=>a.reenteredPassword=l),disabled:!a.password,type:"password",placeholder:"请再次输入密码",onKeydown:e[20]||(e[20]=q(A(()=>{},["prevent"]),["enter"]))},null,8,["value","disabled"])]),_:1},512),t(E,{gutter:[0,24]},{default:s(()=>[t(V,{span:24},{default:s(()=>[m("div",ft,[t(p,{quaternary:"",round:"",onClick:e[21]||(e[21]=l=>S.value=!1)},{default:s(()=>[c(" 取消 ")]),_:1}),t(p,{secondary:"",round:"",type:"primary",loading:x.value,onClick:ie},{default:s(()=>[c(" 更新 ")]),_:1},8,["loading"])])]),_:1})]),_:1})]),_:1},8,["model"])])):_("",!0)]),_:1})])}}});const Ot=Ne(gt,[["__scopeId","data-v-a681720e"]]);export{Ot as default}; diff --git a/web/dist/assets/Topic-47abbf45.js b/web/dist/assets/Topic-60f034a7.js similarity index 95% rename from web/dist/assets/Topic-47abbf45.js rename to web/dist/assets/Topic-60f034a7.js index debcb835..63569bb3 100644 --- a/web/dist/assets/Topic-47abbf45.js +++ b/web/dist/assets/Topic-60f034a7.js @@ -1 +1 @@ -import{z as $,A as I,B as M,C as O,_ as U}from"./index-7ab58e72.js";import{w as j}from"./@vicons-33f992ab.js";import{d as F,H as i,c as A,b as q,r as x,e as c,f as _,k as n,w as s,q as b,A as B,x as f,Y as p,bf as h,E as D,al as H,F as Y,u as G}from"./@vue-a481fc63.js";import{o as J,M as C,j as K,e as P,O as Q,L as R,F as W,f as X,g as Z,a as ee,k as oe}from"./naive-ui-d8de3dda.js";import{_ as te}from"./main-nav.vue_vue_type_style_index_0_lang-3b4e457a.js";import{u as ne}from"./vuex-44de225f.js";import"./vue-router-e5a2430e.js";import"./axios-4a70c6fc.js";/* empty css */import"./seemly-76b7b838.js";import"./vueuc-39372edb.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 se={key:0,class:"tag-item"},ae={key:0,class:"tag-quote"},ce={key:1,class:"tag-quote tag-follow"},le={key:0,class:"options"},ie=F({__name:"tag-item",props:{tag:{},showAction:{type:Boolean},checkFollowing:{type:Boolean}},setup(T){const t=T,r=i(!1),m=A(()=>{let e=[];return t.tag.is_following===0?e.push({label:"关注",key:"follow"}):(t.tag.is_top===0?e.push({label:"置顶",key:"stick"}):e.push({label:"取消置顶",key:"unstick"}),e.push({label:"取消关注",key:"unfollow"})),e}),l=e=>{switch(e){case"follow":M({topic_id:t.tag.id}).then(o=>{t.tag.is_following=1,window.$message.success("关注成功")}).catch(o=>{console.log(o)});break;case"unfollow":I({topic_id:t.tag.id}).then(o=>{t.tag.is_following=0,window.$message.success("取消关注")}).catch(o=>{console.log(o)});break;case"stick":$({topic_id:t.tag.id}).then(o=>{t.tag.is_top=o.top_status,window.$message.success("置顶成功")}).catch(o=>{console.log(o)});break;case"unstick":$({topic_id:t.tag.id}).then(o=>{t.tag.is_top=o.top_status,window.$message.success("取消置顶")}).catch(o=>{console.log(o)});break}};return q(()=>{r.value=!1}),(e,o)=>{const w=x("router-link"),g=J,k=C,a=K,d=P,v=Q,u=R;return!e.checkFollowing||e.checkFollowing&&e.tag.is_following===1?(c(),_("div",se,[n(u,null,{header:s(()=>[(c(),b(k,{type:"success",size:"large",round:"",key:e.tag.id},{avatar:s(()=>[n(g,{src:e.tag.user.avatar},null,8,["src"])]),default:s(()=>[n(w,{class:"hash-link",to:{name:"home",query:{q:e.tag.tag,t:"tag"}}},{default:s(()=>[B(" #"+f(e.tag.tag),1)]),_:1},8,["to"]),e.showAction?p("",!0):(c(),_("span",ae,"("+f(e.tag.quote_num)+")",1)),e.showAction?(c(),_("span",ce,"("+f(e.tag.quote_num)+")",1)):p("",!0)]),_:1}))]),"header-extra":s(()=>[e.showAction?(c(),_("div",le,[n(v,{placement:"bottom-end",trigger:"click",size:"small",options:m.value,onSelect:l},{default:s(()=>[n(d,{type:"success",quaternary:"",circle:"",block:""},{icon:s(()=>[n(a,null,{default:s(()=>[n(h(j))]),_:1})]),_:1})]),_:1},8,["options"])])):p("",!0)]),_:1})])):p("",!0)}}});const _e=F({__name:"Topic",setup(T){const t=ne(),r=i([]),m=i("hot"),l=i(!1),e=i(!1),o=i(!1);D(e,()=>{e.value||(window.$message.success("保存成功"),t.commit("refreshTopicFollow"))});const w=A({get:()=>{let a="编辑";return e.value&&(a="保存"),a},set:a=>{}}),g=()=>{l.value=!0,O({type:m.value,num:50}).then(a=>{r.value=a.topics,l.value=!1}).catch(a=>{console.log(a),l.value=!1})},k=a=>{m.value=a,a=="follow"?o.value=!0:o.value=!1,g()};return q(()=>{g()}),(a,d)=>{const v=te,u=X,L=C,V=Z,N=ie,S=ee,z=oe,E=W;return c(),_("div",null,[n(v,{title:"话题"}),n(E,{class:"main-content-wrap tags-wrap",bordered:""},{default:s(()=>[n(V,{type:"line",animated:"","onUpdate:value":k},H({default:s(()=>[n(u,{name:"hot",tab:"热门"}),n(u,{name:"new",tab:"最新"}),h(t).state.userLogined?(c(),b(u,{key:0,name:"follow",tab:"关注"})):p("",!0)]),_:2},[h(t).state.userLogined?{name:"suffix",fn:s(()=>[n(L,{checked:e.value,"onUpdate:checked":d[0]||(d[0]=y=>e.value=y),checkable:""},{default:s(()=>[B(f(w.value),1)]),_:1},8,["checked"])]),key:"0"}:void 0]),1024),n(z,{show:l.value},{default:s(()=>[n(S,null,{default:s(()=>[(c(!0),_(Y,null,G(r.value,y=>(c(),b(N,{tag:y,showAction:h(t).state.userLogined&&e.value,checkFollowing:o.value},null,8,["tag","showAction","checkFollowing"]))),256))]),_:1})]),_:1},8,["show"])]),_:1})])}}});const Ne=U(_e,[["__scopeId","data-v-1fb31ecf"]]);export{Ne as default}; +import{z as $,A as I,B as M,C as O,_ as U}from"./index-757c547c.js";import{w as j}from"./@vicons-1a3558c6.js";import{d as F,H as i,c as A,b as q,r as x,e as c,f as _,k as n,w as s,q as b,A as B,x as f,Y as p,bf as h,E as D,al as H,F as Y,u as G}from"./@vue-a481fc63.js";import{o as J,M as C,j as K,e as P,O as Q,L as R,F as W,f as X,g as Z,a as ee,k as oe}from"./naive-ui-d8de3dda.js";import{_ as te}from"./main-nav.vue_vue_type_style_index_0_lang-048bd56b.js";import{u as ne}from"./vuex-44de225f.js";import"./vue-router-e5a2430e.js";import"./axios-4a70c6fc.js";/* empty css */import"./seemly-76b7b838.js";import"./vueuc-39372edb.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 se={key:0,class:"tag-item"},ae={key:0,class:"tag-quote"},ce={key:1,class:"tag-quote tag-follow"},le={key:0,class:"options"},ie=F({__name:"tag-item",props:{tag:{},showAction:{type:Boolean},checkFollowing:{type:Boolean}},setup(T){const t=T,r=i(!1),m=A(()=>{let e=[];return t.tag.is_following===0?e.push({label:"关注",key:"follow"}):(t.tag.is_top===0?e.push({label:"置顶",key:"stick"}):e.push({label:"取消置顶",key:"unstick"}),e.push({label:"取消关注",key:"unfollow"})),e}),l=e=>{switch(e){case"follow":M({topic_id:t.tag.id}).then(o=>{t.tag.is_following=1,window.$message.success("关注成功")}).catch(o=>{console.log(o)});break;case"unfollow":I({topic_id:t.tag.id}).then(o=>{t.tag.is_following=0,window.$message.success("取消关注")}).catch(o=>{console.log(o)});break;case"stick":$({topic_id:t.tag.id}).then(o=>{t.tag.is_top=o.top_status,window.$message.success("置顶成功")}).catch(o=>{console.log(o)});break;case"unstick":$({topic_id:t.tag.id}).then(o=>{t.tag.is_top=o.top_status,window.$message.success("取消置顶")}).catch(o=>{console.log(o)});break}};return q(()=>{r.value=!1}),(e,o)=>{const w=x("router-link"),g=J,k=C,a=K,d=P,v=Q,u=R;return!e.checkFollowing||e.checkFollowing&&e.tag.is_following===1?(c(),_("div",se,[n(u,null,{header:s(()=>[(c(),b(k,{type:"success",size:"large",round:"",key:e.tag.id},{avatar:s(()=>[n(g,{src:e.tag.user.avatar},null,8,["src"])]),default:s(()=>[n(w,{class:"hash-link",to:{name:"home",query:{q:e.tag.tag,t:"tag"}}},{default:s(()=>[B(" #"+f(e.tag.tag),1)]),_:1},8,["to"]),e.showAction?p("",!0):(c(),_("span",ae,"("+f(e.tag.quote_num)+")",1)),e.showAction?(c(),_("span",ce,"("+f(e.tag.quote_num)+")",1)):p("",!0)]),_:1}))]),"header-extra":s(()=>[e.showAction?(c(),_("div",le,[n(v,{placement:"bottom-end",trigger:"click",size:"small",options:m.value,onSelect:l},{default:s(()=>[n(d,{type:"success",quaternary:"",circle:"",block:""},{icon:s(()=>[n(a,null,{default:s(()=>[n(h(j))]),_:1})]),_:1})]),_:1},8,["options"])])):p("",!0)]),_:1})])):p("",!0)}}});const _e=F({__name:"Topic",setup(T){const t=ne(),r=i([]),m=i("hot"),l=i(!1),e=i(!1),o=i(!1);D(e,()=>{e.value||(window.$message.success("保存成功"),t.commit("refreshTopicFollow"))});const w=A({get:()=>{let a="编辑";return e.value&&(a="保存"),a},set:a=>{}}),g=()=>{l.value=!0,O({type:m.value,num:50}).then(a=>{r.value=a.topics,l.value=!1}).catch(a=>{console.log(a),l.value=!1})},k=a=>{m.value=a,a=="follow"?o.value=!0:o.value=!1,g()};return q(()=>{g()}),(a,d)=>{const v=te,u=X,L=C,V=Z,N=ie,S=ee,z=oe,E=W;return c(),_("div",null,[n(v,{title:"话题"}),n(E,{class:"main-content-wrap tags-wrap",bordered:""},{default:s(()=>[n(V,{type:"line",animated:"","onUpdate:value":k},H({default:s(()=>[n(u,{name:"hot",tab:"热门"}),n(u,{name:"new",tab:"最新"}),h(t).state.userLogined?(c(),b(u,{key:0,name:"follow",tab:"关注"})):p("",!0)]),_:2},[h(t).state.userLogined?{name:"suffix",fn:s(()=>[n(L,{checked:e.value,"onUpdate:checked":d[0]||(d[0]=y=>e.value=y),checkable:""},{default:s(()=>[B(f(w.value),1)]),_:1},8,["checked"])]),key:"0"}:void 0]),1024),n(z,{show:l.value},{default:s(()=>[n(S,null,{default:s(()=>[(c(!0),_(Y,null,G(r.value,y=>(c(),b(N,{tag:y,showAction:h(t).state.userLogined&&e.value,checkFollowing:o.value},null,8,["tag","showAction","checkFollowing"]))),256))]),_:1})]),_:1},8,["show"])]),_:1})])}}});const Ne=U(_e,[["__scopeId","data-v-1fb31ecf"]]);export{Ne as default}; diff --git a/web/dist/assets/User-1173c46a.js b/web/dist/assets/User-faa58349.js similarity index 97% rename from web/dist/assets/User-1173c46a.js rename to web/dist/assets/User-faa58349.js index 4d4e2382..375ca110 100644 --- a/web/dist/assets/User-1173c46a.js +++ b/web/dist/assets/User-faa58349.js @@ -1 +1 @@ -import{_ as je,a as Ee}from"./post-item.vue_vue_type_style_index_0_lang-3755d97f.js";import{_ as Ge}from"./post-skeleton-bae19eed.js";import{D as Je,_ as ae,E as Ye,F as Ke,e as O,G as Qe,H as Xe,I as Ze,J as es}from"./index-7ab58e72.js";import{R as de,H as me,S as fe,b as he,e as te,i as ge,T as ss,F as as,a as ts,j as ie,o as ls,M as os,O as ns,k as us,f as is,g as cs,I as rs,G as _s}from"./naive-ui-d8de3dda.js";import{d as le,H as o,e as r,q as y,w as n,j as _,k as l,A as w,x as g,R as vs,c as ps,b as ds,E as ms,r as fs,f as k,Y as P,bf as h,y as ce,F as re,u as _e,h as ve}from"./@vue-a481fc63.js";import{_ as hs}from"./main-nav.vue_vue_type_style_index_0_lang-3b4e457a.js";import{u as gs}from"./vuex-44de225f.js";import{b as ws}from"./vue-router-e5a2430e.js";import{b as ks}from"./formatTime-4210fcd1.js";import{W as ys}from"./v3-infinite-loading-2c58ec2f.js";import{i as bs,x as Ps,y as pe,z as $s,u as xs,D as Ts,G as zs}from"./@vicons-33f992ab.js";import"./content-77341dc8.js";import"./paopao-video-player-2fe58954.js";import"./copy-to-clipboard-4ef7d3eb.js";import"./@babel-725317a4.js";import"./toggle-selection-93f4ad84.js";import"./axios-4a70c6fc.js";/* empty css */import"./seemly-76b7b838.js";import"./vueuc-39372edb.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";import"./moment-2ab8298d.js";const Us={class:"whisper-wrap"},Is={class:"whisper-line"},Fs={class:"whisper-line send-wrap"},Cs=le({__name:"whisper",props:{show:{type:Boolean,default:!1},user:{}},emits:["success"],setup(R,{emit:$}){const d=R,v=o(""),m=o(!1),u=()=>{$("success")},p=()=>{m.value=!0,Je({user_id:d.user.id,content:v.value}).then(s=>{window.$message.success("发送成功"),m.value=!1,v.value="",u()}).catch(s=>{m.value=!1})};return(s,i)=>{const x=de,T=me,a=fe,z=he,U=te,I=ge;return r(),y(I,{show:s.show,"onUpdate:show":u,class:"whisper-card",preset:"card",size:"small",title:"私信","mask-closable":!1,bordered:!1,style:{width:"360px"}},{default:n(()=>[_("div",Us,[l(a,{"show-icon":!1},{default:n(()=>[w(" 即将发送私信给: "),l(T,{style:{"max-width":"100%"}},{default:n(()=>[l(x,{type:"success"},{default:n(()=>[w(g(s.user.nickname)+"@"+g(s.user.username),1)]),_:1})]),_:1})]),_:1}),_("div",Is,[l(z,{type:"textarea",placeholder:"请输入私信内容(请勿发送不和谐内容,否则将会被封号)",autosize:{minRows:5,maxRows:10},value:v.value,"onUpdate:value":i[0]||(i[0]=F=>v.value=F),maxlength:"200","show-count":""},null,8,["value"])]),_("div",Fs,[l(U,{strong:"",secondary:"",type:"primary",loading:m.value,onClick:p},{default:n(()=>[w(" 发送 ")]),_:1},8,["loading"])])])]),_:1},8,["show"])}}});const Ms=ae(Cs,[["__scopeId","data-v-0cbfe47c"]]),qs={class:"whisper-wrap"},Ss={class:"whisper-line"},Ws={class:"whisper-line send-wrap"},Ls=le({__name:"whisper-add-friend",props:{show:{type:Boolean,default:!1},user:{}},emits:["success"],setup(R,{emit:$}){const d=R,v=o(""),m=o(!1),u=()=>{$("success")},p=()=>{m.value=!0,Ye({user_id:d.user.id,greetings:v.value}).then(s=>{window.$message.success("发送成功"),m.value=!1,v.value="",u()}).catch(s=>{m.value=!1})};return(s,i)=>{const x=de,T=me,a=fe,z=he,U=te,I=ge;return r(),y(I,{show:s.show,"onUpdate:show":u,class:"whisper-card",preset:"card",size:"small",title:"申请添加朋友","mask-closable":!1,bordered:!1,style:{width:"360px"}},{default:n(()=>[_("div",qs,[l(a,{"show-icon":!1},{default:n(()=>[w(" 发送添加朋友申请给: "),l(T,{style:{"max-width":"100%"}},{default:n(()=>[l(x,{type:"success"},{default:n(()=>[w(g(s.user.nickname)+"@"+g(s.user.username),1)]),_:1})]),_:1})]),_:1}),_("div",Ss,[l(z,{type:"textarea",placeholder:"请输入真挚的问候语",autosize:{minRows:5,maxRows:10},value:v.value,"onUpdate:value":i[0]||(i[0]=F=>v.value=F),maxlength:"120","show-count":""},null,8,["value"])]),_("div",Ws,[l(U,{strong:"",secondary:"",type:"primary",loading:m.value,onClick:p},{default:n(()=>[w(" 发送 ")]),_:1},8,["loading"])])])]),_:1},8,["show"])}}});const Os=ae(Ls,[["__scopeId","data-v-60be56a2"]]),Rs={key:0,class:"profile-baseinfo"},As={class:"avatar"},Bs={class:"base-info"},Ds={class:"username"},Hs={class:"userinfo"},Ns={class:"info-item"},Vs={class:"info-item"},js={class:"userinfo"},Es={class:"info-item"},Gs={class:"info-item"},Js={key:0,class:"user-opts"},Ys={key:0,class:"skeleton-wrap"},Ks={key:1},Qs={key:0,class:"empty-wrap"},Xs={key:1},Zs={key:2},ea={class:"load-more-wrap"},sa={class:"load-more-spinner"},aa=le({__name:"User",setup(R){const $=ss(),d=gs(),v=ws(),m="true".toLowerCase()==="true",u=o(!1),p=o(!1),s=vs({id:0,avatar:"",username:"",nickname:"",is_admin:!1,is_friend:!0,is_following:!1,created_on:0,follows:0,followings:0,status:1}),i=o(!1),x=o(!1),T=o(!1),a=o([]),z=o([]),U=o([]),I=o([]),F=o([]),B=o([]),C=o(v.query.s||""),t=o(+v.query.p||1),q=o("post"),D=o(+v.query.p||1),H=o(1),N=o(1),V=o(1),j=o(1),f=o(20),c=o(0),E=o(0),G=o(0),J=o(0),Y=o(0),K=o(0),we=()=>{p.value=!1,a.value=[],z.value=[],U.value=[],I.value=[],F.value=[],B.value=[],q.value="post",t.value=1,D.value=1,H.value=1,N.value=1,V.value=1,j.value=1,c.value=0,E.value=0,G.value=0,J.value=0,Y.value=0,K.value=0},ke=()=>{switch(q.value){case"post":A();break;case"comment":Q();break;case"highlight":X();break;case"media":Z();break;case"star":ee();break}},A=()=>{u.value=!0,O({username:C.value,style:"post",page:t.value,page_size:f.value}).then(e=>{u.value=!1,e.list.length===0&&(p.value=!0),t.value>1?a.value=a.value.concat(e.list):(a.value=e.list||[],window.scrollTo(0,0)),c.value=Math.ceil(e.pager.total_rows/f.value),z.value=a.value,E.value=c.value}).catch(e=>{a.value=[],t.value>1&&t.value--,u.value=!1})},Q=()=>{u.value=!0,O({username:C.value,style:"comment",page:t.value,page_size:f.value}).then(e=>{u.value=!1,e.list.length===0&&(p.value=!0),t.value>1?a.value=a.value.concat(e.list):(a.value=e.list||[],window.scrollTo(0,0)),c.value=Math.ceil(e.pager.total_rows/f.value),U.value=a.value,G.value=c.value}).catch(e=>{a.value=[],t.value>1&&t.value--,u.value=!1})},X=()=>{u.value=!0,O({username:C.value,style:"highlight",page:t.value,page_size:f.value}).then(e=>{u.value=!1,e.list.length===0&&(p.value=!0),t.value>1?a.value=a.value.concat(e.list):(a.value=e.list||[],window.scrollTo(0,0)),c.value=Math.ceil(e.pager.total_rows/f.value),I.value=a.value,J.value=c.value}).catch(e=>{a.value=[],t.value>1&&t.value--,u.value=!1})},Z=()=>{u.value=!0,O({username:C.value,style:"media",page:t.value,page_size:f.value}).then(e=>{u.value=!1,e.list.length===0&&(p.value=!0),t.value>1?a.value=a.value.concat(e.list):(a.value=e.list||[],window.scrollTo(0,0)),c.value=Math.ceil(e.pager.total_rows/f.value),F.value=a.value,Y.value=c.value}).catch(e=>{a.value=[],t.value>1&&t.value--,u.value=!1})},ee=()=>{u.value=!0,O({username:C.value,style:"star",page:t.value,page_size:f.value}).then(e=>{u.value=!1,e.list.length===0&&(p.value=!0),t.value>1?a.value=a.value.concat(e.list):(a.value=e.list||[],window.scrollTo(0,0)),c.value=Math.ceil(e.pager.total_rows/f.value),B.value=a.value,K.value=c.value}).catch(e=>{a.value=[],t.value>1&&t.value--,u.value=!1})},ye=e=>{switch(q.value=e,q.value){case"post":a.value=z.value,t.value=D.value,c.value=E.value,A();break;case"comment":a.value=U.value,t.value=H.value,c.value=G.value,Q();break;case"highlight":a.value=I.value,t.value=N.value,c.value=J.value,X();break;case"media":a.value=F.value,t.value=V.value,c.value=Y.value,Z();break;case"star":a.value=B.value,t.value=j.value,c.value=K.value,ee();break}},W=()=>{i.value=!0,Ke({username:C.value}).then(e=>{i.value=!1,s.id=e.id,s.avatar=e.avatar,s.username=e.username,s.nickname=e.nickname,s.is_admin=e.is_admin,s.is_friend=e.is_friend,s.created_on=e.created_on,s.is_following=e.is_following,s.follows=e.follows,s.followings=e.followings,s.status=e.status,ke()}).catch(e=>{i.value=!1,console.log(e)})},be=()=>{switch(q.value){case"post":D.value=t.value,A();break;case"comment":H.value=t.value,Q();break;case"highlight":N.value=t.value,X();break;case"media":V.value=t.value,Z();break;case"star":j.value=t.value,ee();break}},Pe=()=>{x.value=!0},$e=()=>{T.value=!0},xe=()=>{x.value=!1},Te=()=>{T.value=!1},M=e=>()=>ve(ie,null,{default:()=>ve(e)}),ze=ps(()=>{let e=[{label:"私信",key:"whisper",icon:M(Ps)}];return d.state.userInfo.is_admin&&(s.status===1?e.push({label:"禁言",key:"banned",icon:M(pe)}):e.push({label:"解封",key:"deblocking",icon:M(pe)})),s.is_following?e.push({label:"取消关注",key:"unfollow",icon:M($s)}):e.push({label:"关注",key:"follow",icon:M(xs)}),m&&(s.is_friend?e.push({label:"删除好友",key:"delete",icon:M(Ts)}):e.push({label:"添加朋友",key:"requesting",icon:M(zs)})),e}),Ue=e=>{switch(e){case"whisper":Pe();break;case"delete":Ie();break;case"requesting":$e();break;case"follow":case"unfollow":Fe();break;case"banned":case"deblocking":Ce();break}},Ie=()=>{$.warning({title:"删除好友",content:"将好友 “"+s.nickname+"” 删除,将同时删除 点赞/收藏 列表中关于该朋友的 “好友可见” 推文",positiveText:"确定",negativeText:"取消",onPositiveClick:()=>{i.value=!0,Qe({user_id:s.id}).then(e=>{i.value=!1,s.is_friend=!1,A()}).catch(e=>{i.value=!1,console.log(e)})}})},Fe=()=>{$.success({title:"提示",content:"确定"+(s.is_following?"取消关注":"关注")+"该用户吗?",positiveText:"确定",negativeText:"取消",onPositiveClick:()=>{i.value=!0,s.is_following?Xe({user_id:s.id}).then(e=>{i.value=!1,window.$message.success("取消关注成功"),W()}).catch(e=>{i.value=!1,console.log(e)}):Ze({user_id:s.id}).then(e=>{i.value=!1,window.$message.success("关注成功"),W()}).catch(e=>{i.value=!1,console.log(e)})}})},Ce=()=>{$.warning({title:"警告",content:"确定对该用户进行"+(s.status===1?"禁言":"解封")+"处理吗?",positiveText:"确定",negativeText:"取消",onPositiveClick:()=>{i.value=!0,es({id:s.id,status:s.status===1?2:1}).then(e=>{i.value=!1,s.status===1?window.$message.success("禁言成功"):window.$message.success("解封成功"),W()}).catch(e=>{i.value=!1,console.log(e)})}})},Me=()=>{t.value{W()}),ms(()=>({path:v.path,query:v.query}),(e,b)=>{b.path==="/u"&&e.path==="/u"&&(C.value=v.query.s||"",we(),W())}),(e,b)=>{const qe=hs,Se=ls,se=os,oe=fs("router-link"),We=te,Le=ns,Oe=Ms,ne=us,L=is,Re=cs,Ae=Ge,Be=rs,De=je,ue=_s,He=Ee,Ne=as,Ve=ts;return r(),k("div",null,[l(qe,{title:"用户详情"}),l(Ne,{class:"main-content-wrap profile-wrap",bordered:""},{default:n(()=>[l(ne,{show:i.value},{default:n(()=>[s.id>0?(r(),k("div",Rs,[_("div",As,[l(Se,{size:72,src:s.avatar},null,8,["src"])]),_("div",Bs,[_("div",Ds,[_("strong",null,g(s.nickname),1),_("span",null," @"+g(s.username),1),m&&h(d).state.userInfo.id>0&&h(d).state.userInfo.username!=s.username&&s.is_friend?(r(),y(se,{key:0,class:"top-tag",type:"info",size:"small",round:""},{default:n(()=>[w(" 好友 ")]),_:1})):P("",!0),h(d).state.userInfo.id>0&&h(d).state.userInfo.username!=s.username&&s.is_following?(r(),y(se,{key:1,class:"top-tag",type:"success",size:"small",round:""},{default:n(()=>[w(" 已关注 ")]),_:1})):P("",!0),s.is_admin?(r(),y(se,{key:2,class:"top-tag",type:"error",size:"small",round:""},{default:n(()=>[w(" 管理员 ")]),_:1})):P("",!0)]),_("div",Hs,[_("span",Ns,"UID. "+g(s.id),1),_("span",Vs,g(h(ks)(s.created_on))+" 加入",1)]),_("div",js,[_("span",Es,[l(oe,{onClick:b[0]||(b[0]=ce(()=>{},["stop"])),class:"following-link",to:{name:"following",query:{s:s.username,n:s.nickname,t:"follows"}}},{default:n(()=>[w(" 关注 "+g(s.follows),1)]),_:1},8,["to"])]),_("span",Gs,[l(oe,{onClick:b[1]||(b[1]=ce(()=>{},["stop"])),class:"following-link",to:{name:"following",query:{s:s.username,n:s.nickname,t:"followings"}}},{default:n(()=>[w(" 粉丝 "+g(s.followings),1)]),_:1},8,["to"])])])]),h(d).state.userInfo.id>0&&h(d).state.userInfo.username!=s.username?(r(),k("div",Js,[l(Le,{placement:"bottom-end",trigger:"click",size:"small",options:ze.value,onSelect:Ue},{default:n(()=>[l(We,{quaternary:"",circle:""},{icon:n(()=>[l(h(ie),null,{default:n(()=>[l(h(bs))]),_:1})]),_:1})]),_:1},8,["options"])])):P("",!0)])):P("",!0),l(Oe,{show:x.value,user:s,onSuccess:xe},null,8,["show","user"]),l(Os,{show:T.value,user:s,onSuccess:Te},null,8,["show","user"])]),_:1},8,["show"]),l(Re,{class:"profile-tabs-wrap",type:"line",animated:"",value:q.value,"onUpdate:value":ye},{default:n(()=>[l(L,{name:"post",tab:"泡泡"}),l(L,{name:"comment",tab:"评论"}),l(L,{name:"highlight",tab:"亮点"}),l(L,{name:"media",tab:"图文"}),l(L,{name:"star",tab:"喜欢"})]),_:1},8,["value"]),u.value&&a.value.length===0?(r(),k("div",Ys,[l(Ae,{num:f.value},null,8,["num"])])):(r(),k("div",Ks,[a.value.length===0?(r(),k("div",Qs,[l(Be,{size:"large",description:"暂无数据"})])):P("",!0),h(d).state.desktopModelShow?(r(),k("div",Xs,[(r(!0),k(re,null,_e(a.value,S=>(r(),y(ue,{key:S.id},{default:n(()=>[l(De,{post:S},null,8,["post"])]),_:2},1024))),128))])):(r(),k("div",Zs,[(r(!0),k(re,null,_e(a.value,S=>(r(),y(ue,{key:S.id},{default:n(()=>[l(He,{post:S},null,8,["post"])]),_:2},1024))),128))]))]))]),_:1}),c.value>0?(r(),y(Ve,{key:0,justify:"center"},{default:n(()=>[l(h(ys),{class:"load-more",slots:{complete:"没有更多泡泡了",error:"加载出错"},onInfinite:b[2]||(b[2]=S=>Me())},{spinner:n(()=>[_("div",ea,[p.value?P("",!0):(r(),y(ne,{key:0,size:14})),_("span",sa,g(p.value?"没有更多泡泡了":"加载更多"),1)])]),_:1})]),_:1})):P("",!0)])}}});const Wa=ae(aa,[["__scopeId","data-v-0436abd3"]]);export{Wa as default}; +import{_ as je,a as Ee}from"./post-item.vue_vue_type_style_index_0_lang-cf11e2c5.js";import{_ as Ge}from"./post-skeleton-c82f8a59.js";import{D as Je,_ as ae,E as Ye,F as Ke,e as O,G as Qe,H as Xe,I as Ze,J as es}from"./index-757c547c.js";import{R as de,H as me,S as fe,b as he,e as te,i as ge,T as ss,F as as,a as ts,j as ie,o as ls,M as os,O as ns,k as us,f as is,g as cs,I as rs,G as _s}from"./naive-ui-d8de3dda.js";import{d as le,H as o,e as r,q as y,w as n,j as _,k as l,A as w,x as g,R as vs,c as ps,b as ds,E as ms,r as fs,f as k,Y as P,bf as h,y as ce,F as re,u as _e,h as ve}from"./@vue-a481fc63.js";import{_ as hs}from"./main-nav.vue_vue_type_style_index_0_lang-048bd56b.js";import{u as gs}from"./vuex-44de225f.js";import{b as ws}from"./vue-router-e5a2430e.js";import{b as ks}from"./formatTime-4210fcd1.js";import{W as ys}from"./v3-infinite-loading-2c58ec2f.js";import{i as bs,x as Ps,y as pe,z as $s,u as xs,D as Ts,G as zs}from"./@vicons-1a3558c6.js";import"./content-d5264b98.js";import"./paopao-video-player-2fe58954.js";import"./copy-to-clipboard-4ef7d3eb.js";import"./@babel-725317a4.js";import"./toggle-selection-93f4ad84.js";import"./axios-4a70c6fc.js";/* empty css */import"./seemly-76b7b838.js";import"./vueuc-39372edb.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";import"./moment-2ab8298d.js";const Us={class:"whisper-wrap"},Is={class:"whisper-line"},Fs={class:"whisper-line send-wrap"},Cs=le({__name:"whisper",props:{show:{type:Boolean,default:!1},user:{}},emits:["success"],setup(R,{emit:$}){const d=R,v=o(""),m=o(!1),u=()=>{$("success")},p=()=>{m.value=!0,Je({user_id:d.user.id,content:v.value}).then(s=>{window.$message.success("发送成功"),m.value=!1,v.value="",u()}).catch(s=>{m.value=!1})};return(s,i)=>{const x=de,T=me,a=fe,z=he,U=te,I=ge;return r(),y(I,{show:s.show,"onUpdate:show":u,class:"whisper-card",preset:"card",size:"small",title:"私信","mask-closable":!1,bordered:!1,style:{width:"360px"}},{default:n(()=>[_("div",Us,[l(a,{"show-icon":!1},{default:n(()=>[w(" 即将发送私信给: "),l(T,{style:{"max-width":"100%"}},{default:n(()=>[l(x,{type:"success"},{default:n(()=>[w(g(s.user.nickname)+"@"+g(s.user.username),1)]),_:1})]),_:1})]),_:1}),_("div",Is,[l(z,{type:"textarea",placeholder:"请输入私信内容(请勿发送不和谐内容,否则将会被封号)",autosize:{minRows:5,maxRows:10},value:v.value,"onUpdate:value":i[0]||(i[0]=F=>v.value=F),maxlength:"200","show-count":""},null,8,["value"])]),_("div",Fs,[l(U,{strong:"",secondary:"",type:"primary",loading:m.value,onClick:p},{default:n(()=>[w(" 发送 ")]),_:1},8,["loading"])])])]),_:1},8,["show"])}}});const Ms=ae(Cs,[["__scopeId","data-v-0cbfe47c"]]),qs={class:"whisper-wrap"},Ss={class:"whisper-line"},Ws={class:"whisper-line send-wrap"},Ls=le({__name:"whisper-add-friend",props:{show:{type:Boolean,default:!1},user:{}},emits:["success"],setup(R,{emit:$}){const d=R,v=o(""),m=o(!1),u=()=>{$("success")},p=()=>{m.value=!0,Ye({user_id:d.user.id,greetings:v.value}).then(s=>{window.$message.success("发送成功"),m.value=!1,v.value="",u()}).catch(s=>{m.value=!1})};return(s,i)=>{const x=de,T=me,a=fe,z=he,U=te,I=ge;return r(),y(I,{show:s.show,"onUpdate:show":u,class:"whisper-card",preset:"card",size:"small",title:"申请添加朋友","mask-closable":!1,bordered:!1,style:{width:"360px"}},{default:n(()=>[_("div",qs,[l(a,{"show-icon":!1},{default:n(()=>[w(" 发送添加朋友申请给: "),l(T,{style:{"max-width":"100%"}},{default:n(()=>[l(x,{type:"success"},{default:n(()=>[w(g(s.user.nickname)+"@"+g(s.user.username),1)]),_:1})]),_:1})]),_:1}),_("div",Ss,[l(z,{type:"textarea",placeholder:"请输入真挚的问候语",autosize:{minRows:5,maxRows:10},value:v.value,"onUpdate:value":i[0]||(i[0]=F=>v.value=F),maxlength:"120","show-count":""},null,8,["value"])]),_("div",Ws,[l(U,{strong:"",secondary:"",type:"primary",loading:m.value,onClick:p},{default:n(()=>[w(" 发送 ")]),_:1},8,["loading"])])])]),_:1},8,["show"])}}});const Os=ae(Ls,[["__scopeId","data-v-60be56a2"]]),Rs={key:0,class:"profile-baseinfo"},As={class:"avatar"},Bs={class:"base-info"},Ds={class:"username"},Hs={class:"userinfo"},Ns={class:"info-item"},Vs={class:"info-item"},js={class:"userinfo"},Es={class:"info-item"},Gs={class:"info-item"},Js={key:0,class:"user-opts"},Ys={key:0,class:"skeleton-wrap"},Ks={key:1},Qs={key:0,class:"empty-wrap"},Xs={key:1},Zs={key:2},ea={class:"load-more-wrap"},sa={class:"load-more-spinner"},aa=le({__name:"User",setup(R){const $=ss(),d=gs(),v=ws(),m="true".toLowerCase()==="true",u=o(!1),p=o(!1),s=vs({id:0,avatar:"",username:"",nickname:"",is_admin:!1,is_friend:!0,is_following:!1,created_on:0,follows:0,followings:0,status:1}),i=o(!1),x=o(!1),T=o(!1),a=o([]),z=o([]),U=o([]),I=o([]),F=o([]),B=o([]),C=o(v.query.s||""),t=o(+v.query.p||1),q=o("post"),D=o(+v.query.p||1),H=o(1),N=o(1),V=o(1),j=o(1),f=o(20),c=o(0),E=o(0),G=o(0),J=o(0),Y=o(0),K=o(0),we=()=>{p.value=!1,a.value=[],z.value=[],U.value=[],I.value=[],F.value=[],B.value=[],q.value="post",t.value=1,D.value=1,H.value=1,N.value=1,V.value=1,j.value=1,c.value=0,E.value=0,G.value=0,J.value=0,Y.value=0,K.value=0},ke=()=>{switch(q.value){case"post":A();break;case"comment":Q();break;case"highlight":X();break;case"media":Z();break;case"star":ee();break}},A=()=>{u.value=!0,O({username:C.value,style:"post",page:t.value,page_size:f.value}).then(e=>{u.value=!1,e.list.length===0&&(p.value=!0),t.value>1?a.value=a.value.concat(e.list):(a.value=e.list||[],window.scrollTo(0,0)),c.value=Math.ceil(e.pager.total_rows/f.value),z.value=a.value,E.value=c.value}).catch(e=>{a.value=[],t.value>1&&t.value--,u.value=!1})},Q=()=>{u.value=!0,O({username:C.value,style:"comment",page:t.value,page_size:f.value}).then(e=>{u.value=!1,e.list.length===0&&(p.value=!0),t.value>1?a.value=a.value.concat(e.list):(a.value=e.list||[],window.scrollTo(0,0)),c.value=Math.ceil(e.pager.total_rows/f.value),U.value=a.value,G.value=c.value}).catch(e=>{a.value=[],t.value>1&&t.value--,u.value=!1})},X=()=>{u.value=!0,O({username:C.value,style:"highlight",page:t.value,page_size:f.value}).then(e=>{u.value=!1,e.list.length===0&&(p.value=!0),t.value>1?a.value=a.value.concat(e.list):(a.value=e.list||[],window.scrollTo(0,0)),c.value=Math.ceil(e.pager.total_rows/f.value),I.value=a.value,J.value=c.value}).catch(e=>{a.value=[],t.value>1&&t.value--,u.value=!1})},Z=()=>{u.value=!0,O({username:C.value,style:"media",page:t.value,page_size:f.value}).then(e=>{u.value=!1,e.list.length===0&&(p.value=!0),t.value>1?a.value=a.value.concat(e.list):(a.value=e.list||[],window.scrollTo(0,0)),c.value=Math.ceil(e.pager.total_rows/f.value),F.value=a.value,Y.value=c.value}).catch(e=>{a.value=[],t.value>1&&t.value--,u.value=!1})},ee=()=>{u.value=!0,O({username:C.value,style:"star",page:t.value,page_size:f.value}).then(e=>{u.value=!1,e.list.length===0&&(p.value=!0),t.value>1?a.value=a.value.concat(e.list):(a.value=e.list||[],window.scrollTo(0,0)),c.value=Math.ceil(e.pager.total_rows/f.value),B.value=a.value,K.value=c.value}).catch(e=>{a.value=[],t.value>1&&t.value--,u.value=!1})},ye=e=>{switch(q.value=e,q.value){case"post":a.value=z.value,t.value=D.value,c.value=E.value,A();break;case"comment":a.value=U.value,t.value=H.value,c.value=G.value,Q();break;case"highlight":a.value=I.value,t.value=N.value,c.value=J.value,X();break;case"media":a.value=F.value,t.value=V.value,c.value=Y.value,Z();break;case"star":a.value=B.value,t.value=j.value,c.value=K.value,ee();break}},W=()=>{i.value=!0,Ke({username:C.value}).then(e=>{i.value=!1,s.id=e.id,s.avatar=e.avatar,s.username=e.username,s.nickname=e.nickname,s.is_admin=e.is_admin,s.is_friend=e.is_friend,s.created_on=e.created_on,s.is_following=e.is_following,s.follows=e.follows,s.followings=e.followings,s.status=e.status,ke()}).catch(e=>{i.value=!1,console.log(e)})},be=()=>{switch(q.value){case"post":D.value=t.value,A();break;case"comment":H.value=t.value,Q();break;case"highlight":N.value=t.value,X();break;case"media":V.value=t.value,Z();break;case"star":j.value=t.value,ee();break}},Pe=()=>{x.value=!0},$e=()=>{T.value=!0},xe=()=>{x.value=!1},Te=()=>{T.value=!1},M=e=>()=>ve(ie,null,{default:()=>ve(e)}),ze=ps(()=>{let e=[{label:"私信",key:"whisper",icon:M(Ps)}];return d.state.userInfo.is_admin&&(s.status===1?e.push({label:"禁言",key:"banned",icon:M(pe)}):e.push({label:"解封",key:"deblocking",icon:M(pe)})),s.is_following?e.push({label:"取消关注",key:"unfollow",icon:M($s)}):e.push({label:"关注",key:"follow",icon:M(xs)}),m&&(s.is_friend?e.push({label:"删除好友",key:"delete",icon:M(Ts)}):e.push({label:"添加朋友",key:"requesting",icon:M(zs)})),e}),Ue=e=>{switch(e){case"whisper":Pe();break;case"delete":Ie();break;case"requesting":$e();break;case"follow":case"unfollow":Fe();break;case"banned":case"deblocking":Ce();break}},Ie=()=>{$.warning({title:"删除好友",content:"将好友 “"+s.nickname+"” 删除,将同时删除 点赞/收藏 列表中关于该朋友的 “好友可见” 推文",positiveText:"确定",negativeText:"取消",onPositiveClick:()=>{i.value=!0,Qe({user_id:s.id}).then(e=>{i.value=!1,s.is_friend=!1,A()}).catch(e=>{i.value=!1,console.log(e)})}})},Fe=()=>{$.success({title:"提示",content:"确定"+(s.is_following?"取消关注":"关注")+"该用户吗?",positiveText:"确定",negativeText:"取消",onPositiveClick:()=>{i.value=!0,s.is_following?Xe({user_id:s.id}).then(e=>{i.value=!1,window.$message.success("取消关注成功"),W()}).catch(e=>{i.value=!1,console.log(e)}):Ze({user_id:s.id}).then(e=>{i.value=!1,window.$message.success("关注成功"),W()}).catch(e=>{i.value=!1,console.log(e)})}})},Ce=()=>{$.warning({title:"警告",content:"确定对该用户进行"+(s.status===1?"禁言":"解封")+"处理吗?",positiveText:"确定",negativeText:"取消",onPositiveClick:()=>{i.value=!0,es({id:s.id,status:s.status===1?2:1}).then(e=>{i.value=!1,s.status===1?window.$message.success("禁言成功"):window.$message.success("解封成功"),W()}).catch(e=>{i.value=!1,console.log(e)})}})},Me=()=>{t.value{W()}),ms(()=>({path:v.path,query:v.query}),(e,b)=>{b.path==="/u"&&e.path==="/u"&&(C.value=v.query.s||"",we(),W())}),(e,b)=>{const qe=hs,Se=ls,se=os,oe=fs("router-link"),We=te,Le=ns,Oe=Ms,ne=us,L=is,Re=cs,Ae=Ge,Be=rs,De=je,ue=_s,He=Ee,Ne=as,Ve=ts;return r(),k("div",null,[l(qe,{title:"用户详情"}),l(Ne,{class:"main-content-wrap profile-wrap",bordered:""},{default:n(()=>[l(ne,{show:i.value},{default:n(()=>[s.id>0?(r(),k("div",Rs,[_("div",As,[l(Se,{size:72,src:s.avatar},null,8,["src"])]),_("div",Bs,[_("div",Ds,[_("strong",null,g(s.nickname),1),_("span",null," @"+g(s.username),1),m&&h(d).state.userInfo.id>0&&h(d).state.userInfo.username!=s.username&&s.is_friend?(r(),y(se,{key:0,class:"top-tag",type:"info",size:"small",round:""},{default:n(()=>[w(" 好友 ")]),_:1})):P("",!0),h(d).state.userInfo.id>0&&h(d).state.userInfo.username!=s.username&&s.is_following?(r(),y(se,{key:1,class:"top-tag",type:"success",size:"small",round:""},{default:n(()=>[w(" 已关注 ")]),_:1})):P("",!0),s.is_admin?(r(),y(se,{key:2,class:"top-tag",type:"error",size:"small",round:""},{default:n(()=>[w(" 管理员 ")]),_:1})):P("",!0)]),_("div",Hs,[_("span",Ns,"UID. "+g(s.id),1),_("span",Vs,g(h(ks)(s.created_on))+" 加入",1)]),_("div",js,[_("span",Es,[l(oe,{onClick:b[0]||(b[0]=ce(()=>{},["stop"])),class:"following-link",to:{name:"following",query:{s:s.username,n:s.nickname,t:"follows"}}},{default:n(()=>[w(" 关注 "+g(s.follows),1)]),_:1},8,["to"])]),_("span",Gs,[l(oe,{onClick:b[1]||(b[1]=ce(()=>{},["stop"])),class:"following-link",to:{name:"following",query:{s:s.username,n:s.nickname,t:"followings"}}},{default:n(()=>[w(" 粉丝 "+g(s.followings),1)]),_:1},8,["to"])])])]),h(d).state.userInfo.id>0&&h(d).state.userInfo.username!=s.username?(r(),k("div",Js,[l(Le,{placement:"bottom-end",trigger:"click",size:"small",options:ze.value,onSelect:Ue},{default:n(()=>[l(We,{quaternary:"",circle:""},{icon:n(()=>[l(h(ie),null,{default:n(()=>[l(h(bs))]),_:1})]),_:1})]),_:1},8,["options"])])):P("",!0)])):P("",!0),l(Oe,{show:x.value,user:s,onSuccess:xe},null,8,["show","user"]),l(Os,{show:T.value,user:s,onSuccess:Te},null,8,["show","user"])]),_:1},8,["show"]),l(Re,{class:"profile-tabs-wrap",type:"line",animated:"",value:q.value,"onUpdate:value":ye},{default:n(()=>[l(L,{name:"post",tab:"泡泡"}),l(L,{name:"comment",tab:"评论"}),l(L,{name:"highlight",tab:"亮点"}),l(L,{name:"media",tab:"图文"}),l(L,{name:"star",tab:"喜欢"})]),_:1},8,["value"]),u.value&&a.value.length===0?(r(),k("div",Ys,[l(Ae,{num:f.value},null,8,["num"])])):(r(),k("div",Ks,[a.value.length===0?(r(),k("div",Qs,[l(Be,{size:"large",description:"暂无数据"})])):P("",!0),h(d).state.desktopModelShow?(r(),k("div",Xs,[(r(!0),k(re,null,_e(a.value,S=>(r(),y(ue,{key:S.id},{default:n(()=>[l(De,{post:S},null,8,["post"])]),_:2},1024))),128))])):(r(),k("div",Zs,[(r(!0),k(re,null,_e(a.value,S=>(r(),y(ue,{key:S.id},{default:n(()=>[l(He,{post:S},null,8,["post"])]),_:2},1024))),128))]))]))]),_:1}),c.value>0?(r(),y(Ve,{key:0,justify:"center"},{default:n(()=>[l(h(ys),{class:"load-more",slots:{complete:"没有更多泡泡了",error:"加载出错"},onInfinite:b[2]||(b[2]=S=>Me())},{spinner:n(()=>[_("div",ea,[p.value?P("",!0):(r(),y(ne,{key:0,size:14})),_("span",sa,g(p.value?"没有更多泡泡了":"加载更多"),1)])]),_:1})]),_:1})):P("",!0)])}}});const Wa=ae(aa,[["__scopeId","data-v-0436abd3"]]);export{Wa as default}; diff --git a/web/dist/assets/Wallet-7bd16035.js b/web/dist/assets/Wallet-41e3f3be.js similarity index 68% rename from web/dist/assets/Wallet-7bd16035.js rename to web/dist/assets/Wallet-41e3f3be.js index 5126e69e..83b21338 100644 --- a/web/dist/assets/Wallet-7bd16035.js +++ b/web/dist/assets/Wallet-41e3f3be.js @@ -1 +1 @@ -import{_ as K}from"./post-skeleton-bae19eed.js";import{_ as Z}from"./main-nav.vue_vue_type_style_index_0_lang-3b4e457a.js";import{d as J,H as c,b as X,f as _,k as e,w as o,e as a,bf as y,Y as w,j as n,A as k,F as q,u as z,O as ee,D as te,x as r,q as N,l as oe,y as ne,$ as ae,a0 as se}from"./@vue-a481fc63.js";import{u as le}from"./vuex-44de225f.js";import{b as ce}from"./vue-router-e5a2430e.js";import{b as ie}from"./qrcode-9719fc56.js";import{T as _e,U as re,V as ue,W as pe,_ as de}from"./index-7ab58e72.js";import{a as me}from"./formatTime-4210fcd1.js";import{U as ge}from"./@vicons-33f992ab.js";import{F as ve,i as he,Y as fe,Z as ye,e as we,a as ke,Q as be,I as xe,j as Ce,l as Ie,h as Se,G as Ae}from"./naive-ui-d8de3dda.js";import"./vooks-6d99783e.js";import"./evtd-b614532e.js";import"./encode-utf8-f813de00.js";import"./dijkstrajs-f906a09e.js";import"./axios-4a70c6fc.js";/* empty css */import"./seemly-76b7b838.js";import"./vueuc-39372edb.js";import"./@css-render-7124a1a5.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";import"./moment-2ab8298d.js";const T=m=>(ae("data-v-870bd246"),m=m(),se(),m),Re={class:"balance-wrap"},$e={class:"balance-line"},qe={class:"balance-opts"},ze={key:0,class:"pagination-wrap"},Ne={key:0,class:"skeleton-wrap"},Te={key:1},Ue={key:0,class:"empty-wrap"},We={class:"bill-line"},Be={key:0,class:"amount-options"},Fe={key:1,style:{"margin-top":"10px"}},Oe={class:"qrcode-wrap"},Pe=T(()=>n("canvas",{id:"qrcode-container"},null,-1)),Ve={class:"pay-tips"},De={class:"pay-sub-tips"},Ee=T(()=>n("span",{style:{"margin-left":"6px"}}," 支付结果实时同步中... ",-1)),Le=J({__name:"Wallet",setup(m){const i=le(),U=ce(),g=c(!1),u=c(100),v=c(!1),p=c(""),h=c(!1),b=c([]),x=c(+U.query.p||1),C=c(20),I=c(0),W=c([100,200,300,500,1e3,3e3,5e3,1e4,5e4]),A=()=>{h.value=!0,re({page:x.value,page_size:C.value}).then(s=>{h.value=!1,b.value=s.list,I.value=Math.ceil(s.pager.total_rows/C.value),window.scrollTo(0,0)}).catch(s=>{h.value=!1})},B=s=>{x.value=s,A()},R=()=>{const s=localStorage.getItem("PAOPAO_TOKEN")||"";s?_e(s).then(l=>{i.commit("updateUserinfo",l),i.commit("triggerAuth",!1),A()}).catch(l=>{i.commit("triggerAuth",!0),i.commit("userLogout")}):(i.commit("triggerAuth",!0),i.commit("userLogout"))},F=()=>{g.value=!0},O=s=>{v.value=!0,ue({amount:u.value}).then(l=>{v.value=!1,p.value=l.pay,ie.toCanvas(document.querySelector("#qrcode-container"),l.pay,{width:150,margin:2});const S=setInterval(()=>{pe({id:l.id}).then(d=>{d.status==="TRADE_SUCCESS"&&(clearInterval(S),window.$message.success("充值成功"),g.value=!1,p.value="",R())}).catch(d=>{console.log(d)})},2e3)}).catch(l=>{v.value=!1})},P=()=>{i.state.userInfo.balance==0?window.$message.warning("您暂无可提现资金"):window.$message.warning("该功能即将开放")};return X(()=>{R()}),(s,l)=>{const S=Z,d=fe,V=ye,f=we,$=ke,D=be,E=K,L=xe,M=Ae,j=ve,Q=Ce,Y=Ie,G=Se,H=he;return a(),_("div",null,[e(S,{title:"钱包"}),e(j,{class:"main-content-wrap",bordered:""},{footer:o(()=>[I.value>1?(a(),_("div",ze,[e(D,{page:x.value,"onUpdate:page":B,"page-slot":y(i).state.collapsedRight?5:8,"page-count":I.value},null,8,["page","page-slot","page-count"])])):w("",!0)]),default:o(()=>[n("div",Re,[n("div",$e,[e(V,{label:"账户余额 (元)"},{default:o(()=>[e(d,{from:0,to:(y(i).state.userInfo.balance||0)/100,duration:500,precision:2},null,8,["to"])]),_:1}),n("div",qe,[e($,{vertical:""},{default:o(()=>[e(f,{size:"small",secondary:"",type:"primary",onClick:F},{default:o(()=>[k(" 充值 ")]),_:1}),e(f,{size:"small",secondary:"",type:"tertiary",onClick:P},{default:o(()=>[k(" 提现 ")]),_:1})]),_:1})])])]),h.value?(a(),_("div",Ne,[e(E,{num:C.value},null,8,["num"])])):(a(),_("div",Te,[b.value.length===0?(a(),_("div",Ue,[e(L,{size:"large",description:"暂无数据"})])):w("",!0),(a(!0),_(q,null,z(b.value,t=>(a(),N(M,{key:t.id},{default:o(()=>[n("div",We,[n("div",null,"NO."+r(t.id),1),n("div",null,r(t.reason),1),n("div",{class:oe({income:t.change_amount>=0,out:t.change_amount<0})},r((t.change_amount>0?"+":"")+(t.change_amount/100).toFixed(2)),3),n("div",null,r(y(me)(t.created_on)),1)])]),_:2},1024))),128))]))]),_:1}),e(H,{show:g.value,"onUpdate:show":l[0]||(l[0]=t=>g.value=t)},{default:o(()=>[e(G,{bordered:!1,title:"请选择充值金额",role:"dialog","aria-modal":"true",style:{width:"100%","max-width":"330px"}},{default:o(()=>[p.value.length===0?(a(),_("div",Be,[e($,{align:"baseline"},{default:o(()=>[(a(!0),_(q,null,z(W.value,t=>(a(),N(f,{key:t,size:"small",secondary:"",type:u.value===t?"info":"default",onClick:ne(Me=>u.value=t,["stop"])},{default:o(()=>[k(r(t/100)+"元 ",1)]),_:2},1032,["type","onClick"]))),128))]),_:1})])):w("",!0),u.value>0&&p.value.length===0?(a(),_("div",Fe,[e(f,{loading:v.value,strong:"",secondary:"",type:"info",style:{width:"100%"},onClick:O},{icon:o(()=>[e(Q,null,{default:o(()=>[e(y(ge))]),_:1})]),default:o(()=>[k(" 前往支付 ")]),_:1},8,["loading"])])):w("",!0),ee(n("div",Oe,[Pe,n("div",Ve," 请使用支付宝扫码支付"+r((u.value/100).toFixed(2))+"元 ",1),n("div",De,[e(Y,{value:100,type:"info",dot:"",processing:""}),Ee])],512),[[te,p.value.length>0]])]),_:1})]),_:1},8,["show"])])}}});const yt=de(Le,[["__scopeId","data-v-870bd246"]]);export{yt as default}; +import{_ as K}from"./post-skeleton-c82f8a59.js";import{_ as X}from"./main-nav.vue_vue_type_style_index_0_lang-048bd56b.js";import{d as Z,H as c,b as J,f as _,k as e,w as o,e as a,bf as y,Y as w,j as n,A as k,F as q,u as z,O as ee,D as te,x as r,q as N,l as oe,y as ne,$ as ae,a0 as se}from"./@vue-a481fc63.js";import{u as le}from"./vuex-44de225f.js";import{b as ce}from"./vue-router-e5a2430e.js";import{b as ie}from"./qrcode-9719fc56.js";import{T as _e,U as re,V as ue,W as pe,_ as de}from"./index-757c547c.js";import{a as me}from"./formatTime-4210fcd1.js";import{X as ge}from"./@vicons-1a3558c6.js";import{F as ve,i as he,Y as fe,Z as ye,e as we,a as ke,Q as be,I as xe,j as Ce,l as Ie,h as Se,G as Ae}from"./naive-ui-d8de3dda.js";import"./vooks-6d99783e.js";import"./evtd-b614532e.js";import"./encode-utf8-f813de00.js";import"./dijkstrajs-f906a09e.js";import"./axios-4a70c6fc.js";/* empty css */import"./seemly-76b7b838.js";import"./vueuc-39372edb.js";import"./@css-render-7124a1a5.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";import"./moment-2ab8298d.js";const T=m=>(ae("data-v-870bd246"),m=m(),se(),m),Re={class:"balance-wrap"},$e={class:"balance-line"},qe={class:"balance-opts"},ze={key:0,class:"pagination-wrap"},Ne={key:0,class:"skeleton-wrap"},Te={key:1},We={key:0,class:"empty-wrap"},Be={class:"bill-line"},Fe={key:0,class:"amount-options"},Oe={key:1,style:{"margin-top":"10px"}},Pe={class:"qrcode-wrap"},Ue=T(()=>n("canvas",{id:"qrcode-container"},null,-1)),Ve={class:"pay-tips"},De={class:"pay-sub-tips"},Ee=T(()=>n("span",{style:{"margin-left":"6px"}}," 支付结果实时同步中... ",-1)),Le=Z({__name:"Wallet",setup(m){const i=le(),W=ce(),g=c(!1),u=c(100),v=c(!1),p=c(""),h=c(!1),b=c([]),x=c(+W.query.p||1),C=c(20),I=c(0),B=c([100,200,300,500,1e3,3e3,5e3,1e4,5e4]),A=()=>{h.value=!0,re({page:x.value,page_size:C.value}).then(s=>{h.value=!1,b.value=s.list,I.value=Math.ceil(s.pager.total_rows/C.value),window.scrollTo(0,0)}).catch(s=>{h.value=!1})},F=s=>{x.value=s,A()},R=()=>{const s=localStorage.getItem("PAOPAO_TOKEN")||"";s?_e(s).then(l=>{i.commit("updateUserinfo",l),i.commit("triggerAuth",!1),A()}).catch(l=>{i.commit("triggerAuth",!0),i.commit("userLogout")}):(i.commit("triggerAuth",!0),i.commit("userLogout"))},O=()=>{g.value=!0},P=s=>{v.value=!0,ue({amount:u.value}).then(l=>{v.value=!1,p.value=l.pay,ie.toCanvas(document.querySelector("#qrcode-container"),l.pay,{width:150,margin:2});const S=setInterval(()=>{pe({id:l.id}).then(d=>{d.status==="TRADE_SUCCESS"&&(clearInterval(S),window.$message.success("充值成功"),g.value=!1,p.value="",R())}).catch(d=>{console.log(d)})},2e3)}).catch(l=>{v.value=!1})},U=()=>{i.state.userInfo.balance==0?window.$message.warning("您暂无可提现资金"):window.$message.warning("该功能即将开放")};return J(()=>{R()}),(s,l)=>{const S=X,d=fe,V=ye,f=we,$=ke,D=be,E=K,L=xe,M=Ae,j=ve,Q=Ce,Y=Ie,G=Se,H=he;return a(),_("div",null,[e(S,{title:"钱包"}),e(j,{class:"main-content-wrap",bordered:""},{footer:o(()=>[I.value>1?(a(),_("div",ze,[e(D,{page:x.value,"onUpdate:page":F,"page-slot":y(i).state.collapsedRight?5:8,"page-count":I.value},null,8,["page","page-slot","page-count"])])):w("",!0)]),default:o(()=>[n("div",Re,[n("div",$e,[e(V,{label:"账户余额 (元)"},{default:o(()=>[e(d,{from:0,to:(y(i).state.userInfo.balance||0)/100,duration:500,precision:2},null,8,["to"])]),_:1}),n("div",qe,[e($,{vertical:""},{default:o(()=>[e(f,{size:"small",secondary:"",type:"primary",onClick:O},{default:o(()=>[k(" 充值 ")]),_:1}),e(f,{size:"small",secondary:"",type:"tertiary",onClick:U},{default:o(()=>[k(" 提现 ")]),_:1})]),_:1})])])]),h.value?(a(),_("div",Ne,[e(E,{num:C.value},null,8,["num"])])):(a(),_("div",Te,[b.value.length===0?(a(),_("div",We,[e(L,{size:"large",description:"暂无数据"})])):w("",!0),(a(!0),_(q,null,z(b.value,t=>(a(),N(M,{key:t.id},{default:o(()=>[n("div",Be,[n("div",null,"NO."+r(t.id),1),n("div",null,r(t.reason),1),n("div",{class:oe({income:t.change_amount>=0,out:t.change_amount<0})},r((t.change_amount>0?"+":"")+(t.change_amount/100).toFixed(2)),3),n("div",null,r(y(me)(t.created_on)),1)])]),_:2},1024))),128))]))]),_:1}),e(H,{show:g.value,"onUpdate:show":l[0]||(l[0]=t=>g.value=t)},{default:o(()=>[e(G,{bordered:!1,title:"请选择充值金额",role:"dialog","aria-modal":"true",style:{width:"100%","max-width":"330px"}},{default:o(()=>[p.value.length===0?(a(),_("div",Fe,[e($,{align:"baseline"},{default:o(()=>[(a(!0),_(q,null,z(B.value,t=>(a(),N(f,{key:t,size:"small",secondary:"",type:u.value===t?"info":"default",onClick:ne(Me=>u.value=t,["stop"])},{default:o(()=>[k(r(t/100)+"元 ",1)]),_:2},1032,["type","onClick"]))),128))]),_:1})])):w("",!0),u.value>0&&p.value.length===0?(a(),_("div",Oe,[e(f,{loading:v.value,strong:"",secondary:"",type:"info",style:{width:"100%"},onClick:P},{icon:o(()=>[e(Q,null,{default:o(()=>[e(y(ge))]),_:1})]),default:o(()=>[k(" 前往支付 ")]),_:1},8,["loading"])])):w("",!0),ee(n("div",Pe,[Ue,n("div",Ve," 请使用支付宝扫码支付"+r((u.value/100).toFixed(2))+"元 ",1),n("div",De,[e(Y,{value:100,type:"info",dot:"",processing:""}),Ee])],512),[[te,p.value.length>0]])]),_:1})]),_:1},8,["show"])])}}});const yt=de(Le,[["__scopeId","data-v-870bd246"]]);export{yt as default}; diff --git a/web/dist/assets/content-77341dc8.js b/web/dist/assets/content-77341dc8.js deleted file mode 100644 index 5b302ca5..00000000 --- a/web/dist/assets/content-77341dc8.js +++ /dev/null @@ -1 +0,0 @@ -import{d as h,e,f as r,F as a,u as m,k as s,w as o,bf as c,j as C,y as k,x as I,q as d,Y as g,H as j,A as N,h as b}from"./@vue-a481fc63.js";import{Q as V,R as z}from"./@vicons-33f992ab.js";import{j as $,V as A,W as B,m as F,X as L,e as P,i as R}from"./naive-ui-d8de3dda.js";import{_ as D,P as T,Q as U}from"./index-7ab58e72.js";import{e as M}from"./paopao-video-player-2fe58954.js";const O={class:"link-wrap"},Q={class:"link-txt-wrap"},q=["href"],H={class:"link-txt"},S=h({__name:"post-link",props:{links:{default:()=>[]}},setup(y){const l=y;return(p,u)=>{const x=$;return e(),r("div",O,[(e(!0),r(a,null,m(l.links,n=>(e(),r("div",{class:"link-item",key:n.id},[s(x,{class:"hash-link"},{default:o(()=>[s(c(V))]),_:1}),C("div",Q,[C("a",{href:n.content,class:"hash-link",target:"_blank",onClick:u[0]||(u[0]=k(()=>{},["stop"]))},[C("span",H,I(n.content),1)],8,q)])]))),128))])}}});const ot=D(S,[["__scopeId","data-v-36eef76b"]]),W={key:0},st=h({__name:"post-video",props:{videos:{default:()=>[]},full:{type:Boolean,default:!1}},setup(y){const l=y;return(p,u)=>{const x=A,n=B;return l.videos.length>0?(e(),r("div",W,[s(n,{"x-gap":4,"y-gap":4,cols:p.full?1:5},{default:o(()=>[s(x,{span:p.full?1:3},{default:o(()=>[(e(!0),r(a,null,m(l.videos,v=>(e(),d(c(M),{onClick:u[0]||(u[0]=k(()=>{},["stop"])),key:v.id,src:v.content,colors:["#18a058","#2aca75"],hoverable:!0,theme:"gradient"},null,8,["src"]))),128))]),_:1},8,["span"])]),_:1},8,["cols"])])):g("",!0)}}}),X={class:"images-wrap"},rt=h({__name:"post-image",props:{imgs:{default:()=>[]}},setup(y){const l=y,p="https://paopao-assets.oss-cn-shanghai.aliyuncs.com/public/404.png",u="?x-oss-process=image/resize,m_fill,w_300,h_300,limit_0/auto-orient,1/format,png";return(x,n)=>{const v=F,_=A,f=B,w=L;return e(),r("div",X,[[1].includes(l.imgs.length)?(e(),d(w,{key:0},{default:o(()=>[s(f,{"x-gap":4,"y-gap":4,cols:2},{default:o(()=>[(e(!0),r(a,null,m(l.imgs,t=>(e(),d(_,{key:t.id},{default:o(()=>[s(v,{onError:()=>t.content=c(p),onClick:n[0]||(n[0]=k(()=>{},["stop"])),class:"post-img x1","object-fit":"cover",src:t.content+c(u),"preview-src":t.content},null,8,["onError","src","preview-src"])]),_:2},1024))),128))]),_:1})]),_:1})):g("",!0),[2,3].includes(l.imgs.length)?(e(),d(w,{key:1},{default:o(()=>[s(f,{"x-gap":4,"y-gap":4,cols:3},{default:o(()=>[(e(!0),r(a,null,m(l.imgs,t=>(e(),d(_,{key:t.id},{default:o(()=>[s(v,{onError:()=>t.content=c(p),onClick:n[1]||(n[1]=k(()=>{},["stop"])),class:"post-img x2","object-fit":"cover",src:t.content+c(u),"preview-src":t.content},null,8,["onError","src","preview-src"])]),_:2},1024))),128))]),_:1})]),_:1})):g("",!0),[4].includes(l.imgs.length)?(e(),d(w,{key:2},{default:o(()=>[s(f,{"x-gap":4,"y-gap":4,cols:4},{default:o(()=>[(e(!0),r(a,null,m(l.imgs,t=>(e(),d(_,{key:t.id},{default:o(()=>[s(v,{onError:()=>t.content=c(p),onClick:n[2]||(n[2]=k(()=>{},["stop"])),class:"post-img x3","object-fit":"cover",src:t.content+c(u),"preview-src":t.content},null,8,["onError","src","preview-src"])]),_:2},1024))),128))]),_:1})]),_:1})):g("",!0),[5].includes(l.imgs.length)?(e(),d(w,{key:3},{default:o(()=>[s(f,{"x-gap":4,"y-gap":4,cols:3},{default:o(()=>[(e(!0),r(a,null,m(l.imgs,(t,i)=>(e(),r(a,{key:t.id},[i<3?(e(),d(_,{key:0},{default:o(()=>[s(v,{onError:()=>t.content=c(p),onClick:n[3]||(n[3]=k(()=>{},["stop"])),class:"post-img x2","object-fit":"cover",src:t.content+c(u),"preview-src":t.content},null,8,["onError","src","preview-src"])]),_:2},1024)):g("",!0)],64))),128))]),_:1}),s(f,{"x-gap":4,"y-gap":4,cols:2,style:{"margin-top":"4px"}},{default:o(()=>[(e(!0),r(a,null,m(l.imgs,(t,i)=>(e(),r(a,{key:t.id},[i>=3?(e(),d(_,{key:0},{default:o(()=>[s(v,{onError:()=>t.content=c(p),onClick:n[4]||(n[4]=k(()=>{},["stop"])),class:"post-img x1","object-fit":"cover",src:t.content+c(u),"preview-src":t.content},null,8,["onError","src","preview-src"])]),_:2},1024)):g("",!0)],64))),128))]),_:1})]),_:1})):g("",!0),[6].includes(l.imgs.length)?(e(),d(w,{key:4},{default:o(()=>[s(f,{"x-gap":4,"y-gap":4,cols:3},{default:o(()=>[(e(!0),r(a,null,m(l.imgs,(t,i)=>(e(),r(a,{key:t.id},[i<3?(e(),d(_,{key:0},{default:o(()=>[s(v,{onError:()=>t.content=c(p),onClick:n[5]||(n[5]=k(()=>{},["stop"])),class:"post-img x2","object-fit":"cover",src:t.content+c(u),"preview-src":t.content},null,8,["onError","src","preview-src"])]),_:2},1024)):g("",!0)],64))),128))]),_:1}),s(f,{"x-gap":4,"y-gap":4,cols:3,style:{"margin-top":"4px"}},{default:o(()=>[(e(!0),r(a,null,m(l.imgs,(t,i)=>(e(),r(a,{key:t.id},[i>=3?(e(),d(_,{key:0},{default:o(()=>[s(v,{onError:()=>t.content=c(p),onClick:n[6]||(n[6]=k(()=>{},["stop"])),class:"post-img x2","object-fit":"cover",src:t.content+c(u),"preview-src":t.content},null,8,["onError","src","preview-src"])]),_:2},1024)):g("",!0)],64))),128))]),_:1})]),_:1})):g("",!0),l.imgs.length===7?(e(),d(w,{key:5},{default:o(()=>[s(f,{"x-gap":4,"y-gap":4,cols:4},{default:o(()=>[(e(!0),r(a,null,m(l.imgs,(t,i)=>(e(),r(a,null,[i<4?(e(),d(_,{key:t.id},{default:o(()=>[s(v,{onError:()=>t.content=c(p),onClick:n[7]||(n[7]=k(()=>{},["stop"])),class:"post-img x3","object-fit":"cover",src:t.content+c(u),"preview-src":t.content},null,8,["onError","src","preview-src"])]),_:2},1024)):g("",!0)],64))),256))]),_:1}),s(f,{"x-gap":4,"y-gap":4,cols:3,style:{"margin-top":"4px"}},{default:o(()=>[(e(!0),r(a,null,m(l.imgs,(t,i)=>(e(),r(a,null,[i>=4?(e(),d(_,{key:t.id},{default:o(()=>[s(v,{onError:()=>t.content=c(p),onClick:n[8]||(n[8]=k(()=>{},["stop"])),class:"post-img x2","object-fit":"cover",src:t.content+c(u),"preview-src":t.content},null,8,["onError","src","preview-src"])]),_:2},1024)):g("",!0)],64))),256))]),_:1})]),_:1})):g("",!0),l.imgs.length===8?(e(),d(w,{key:6},{default:o(()=>[s(f,{"x-gap":4,"y-gap":4,cols:4},{default:o(()=>[(e(!0),r(a,null,m(l.imgs,(t,i)=>(e(),r(a,null,[i<4?(e(),d(_,{key:t.id},{default:o(()=>[s(v,{onError:()=>t.content=c(p),onClick:n[9]||(n[9]=k(()=>{},["stop"])),class:"post-img x3","object-fit":"cover",src:t.content+c(u),"preview-src":t.content},null,8,["onError","src","preview-src"])]),_:2},1024)):g("",!0)],64))),256))]),_:1}),s(f,{"x-gap":4,"y-gap":4,cols:4,style:{"margin-top":"4px"}},{default:o(()=>[(e(!0),r(a,null,m(l.imgs,(t,i)=>(e(),r(a,null,[i>=4?(e(),d(_,{key:t.id},{default:o(()=>[s(v,{onError:()=>t.content=c(p),onClick:n[10]||(n[10]=k(()=>{},["stop"])),class:"post-img x3","object-fit":"cover",src:t.content+c(u),"preview-src":t.content},null,8,["onError","src","preview-src"])]),_:2},1024)):g("",!0)],64))),256))]),_:1})]),_:1})):g("",!0),l.imgs.length===9?(e(),d(w,{key:7},{default:o(()=>[s(f,{"x-gap":4,"y-gap":4,cols:3},{default:o(()=>[(e(!0),r(a,null,m(l.imgs,(t,i)=>(e(),r(a,null,[i<3?(e(),d(_,{key:t.id},{default:o(()=>[s(v,{onError:()=>t.content=c(p),onClick:n[11]||(n[11]=k(()=>{},["stop"])),class:"post-img x2","object-fit":"cover",src:t.content+c(u),"preview-src":t.content},null,8,["onError","src","preview-src"])]),_:2},1024)):g("",!0)],64))),256))]),_:1}),s(f,{"x-gap":4,"y-gap":4,cols:3,style:{"margin-top":"4px"}},{default:o(()=>[(e(!0),r(a,null,m(l.imgs,(t,i)=>(e(),r(a,null,[i>=3&&i<6?(e(),d(_,{key:t.id},{default:o(()=>[s(v,{onError:()=>t.content=c(p),onClick:n[12]||(n[12]=k(()=>{},["stop"])),class:"post-img x2","object-fit":"cover",src:t.content+c(u),"preview-src":t.content},null,8,["onError","src","preview-src"])]),_:2},1024)):g("",!0)],64))),256))]),_:1}),s(f,{"x-gap":4,"y-gap":4,cols:3,style:{"margin-top":"4px"}},{default:o(()=>[(e(!0),r(a,null,m(l.imgs,(t,i)=>(e(),r(a,null,[i>=6?(e(),d(_,{key:t.id},{default:o(()=>[s(v,{onError:()=>t.content=c(p),onClick:n[13]||(n[13]=k(()=>{},["stop"])),class:"post-img x2","object-fit":"cover",src:t.content+c(u),"preview-src":t.content},null,8,["onError","src","preview-src"])]),_:2},1024)):g("",!0)],64))),256))]),_:1})]),_:1})):g("",!0)])}}});const Y={class:"attachment-wrap"},Z=h({__name:"post-attachment",props:{attachments:{default:()=>[]},price:{default:0}},setup(y){const l=y,p=j(!1),u=j(""),x=j(0),n=_=>{p.value=!0,x.value=_.id,u.value="这是一个免费附件,您可以直接下载?",_.type===8&&(u.value=()=>b("div",{},[b("p",{},"这是一个收费附件,下载将收取"+(l.price/100).toFixed(2)+"元")]),T({id:x.value}).then(f=>{f.paid&&(u.value=()=>b("div",{},[b("p",{},"此次下载您已支付或无需付费,请确认下载")]))}).catch(f=>{p.value=!1}))},v=()=>{U({id:x.value}).then(_=>{window.open(_.signed_url.replace("http://","https://"),"_blank")}).catch(_=>{console.log(_)})};return(_,f)=>{const w=$,t=P,i=R;return e(),r("div",Y,[(e(!0),r(a,null,m(_.attachments,E=>(e(),r("div",{class:"attach-item",key:E.id},[s(t,{onClick:k(G=>n(E),["stop"]),type:"primary",size:"tiny",dashed:""},{icon:o(()=>[s(w,null,{default:o(()=>[s(c(z))]),_:1})]),default:o(()=>[N(" "+I(E.type===8?"收费":"免费")+"附件 ",1)]),_:2},1032,["onClick"])]))),128)),s(i,{show:p.value,"onUpdate:show":f[0]||(f[0]=E=>p.value=E),"mask-closable":!1,preset:"dialog",title:"下载提示",content:u.value,"positive-text":"确认下载","negative-text":"取消","icon-placement":"top",onPositiveClick:v},null,8,["show","content"])])}}});const lt=D(Z,[["__scopeId","data-v-22563084"]]),ct=y=>{const l=[],p=[];var u=/(#|#)([^#@\s])+?\s+?/g,x=/@([a-zA-Z0-9])+?\s+?/g;return y=y.replace(/<[^>]*?>/gi,"").replace(/(.*?)<\/[^>]*?>/gi,"").replace(u,n=>(l.push(n.substr(1).trim()),''+n.trim()+" ")).replace(x,n=>(p.push(n.substr(1).trim()),''+n.trim()+" ")),{content:y,tags:l,users:p}};export{rt as _,lt as a,st as b,ot as c,ct as p}; diff --git a/web/dist/assets/content-d5264b98.js b/web/dist/assets/content-d5264b98.js new file mode 100644 index 00000000..8720f680 --- /dev/null +++ b/web/dist/assets/content-d5264b98.js @@ -0,0 +1 @@ +import{d as h,e,f as r,F as a,u as m,k as s,w as o,bf as c,j as C,y as k,x as I,q as d,Y as g,H as j,A as N,h as b}from"./@vue-a481fc63.js";import{R as V,U}from"./@vicons-1a3558c6.js";import{j as $,V as A,W as B,m as z,X as F,e as L,i as P}from"./naive-ui-d8de3dda.js";import{_ as D,P as R,Q as T}from"./index-757c547c.js";import{e as M}from"./paopao-video-player-2fe58954.js";const O={class:"link-wrap"},q={class:"link-txt-wrap"},H=["href"],Q={class:"link-txt"},S=h({__name:"post-link",props:{links:{default:()=>[]}},setup(y){const l=y;return(p,u)=>{const x=$;return e(),r("div",O,[(e(!0),r(a,null,m(l.links,n=>(e(),r("div",{class:"link-item",key:n.id},[s(x,{class:"hash-link"},{default:o(()=>[s(c(V))]),_:1}),C("div",q,[C("a",{href:n.content,class:"hash-link",target:"_blank",onClick:u[0]||(u[0]=k(()=>{},["stop"]))},[C("span",Q,I(n.content),1)],8,H)])]))),128))])}}});const ot=D(S,[["__scopeId","data-v-36eef76b"]]),W={key:0},st=h({__name:"post-video",props:{videos:{default:()=>[]},full:{type:Boolean,default:!1}},setup(y){const l=y;return(p,u)=>{const x=A,n=B;return l.videos.length>0?(e(),r("div",W,[s(n,{"x-gap":4,"y-gap":4,cols:p.full?1:5},{default:o(()=>[s(x,{span:p.full?1:3},{default:o(()=>[(e(!0),r(a,null,m(l.videos,v=>(e(),d(c(M),{onClick:u[0]||(u[0]=k(()=>{},["stop"])),key:v.id,src:v.content,colors:["#18a058","#2aca75"],hoverable:!0,theme:"gradient"},null,8,["src"]))),128))]),_:1},8,["span"])]),_:1},8,["cols"])])):g("",!0)}}}),X={class:"images-wrap"},rt=h({__name:"post-image",props:{imgs:{default:()=>[]}},setup(y){const l=y,p="https://paopao-assets.oss-cn-shanghai.aliyuncs.com/public/404.png",u="?x-oss-process=image/resize,m_fill,w_300,h_300,limit_0/auto-orient,1/format,png";return(x,n)=>{const v=z,_=A,f=B,w=F;return e(),r("div",X,[[1].includes(l.imgs.length)?(e(),d(w,{key:0},{default:o(()=>[s(f,{"x-gap":4,"y-gap":4,cols:2},{default:o(()=>[(e(!0),r(a,null,m(l.imgs,t=>(e(),d(_,{key:t.id},{default:o(()=>[s(v,{onError:()=>t.content=c(p),onClick:n[0]||(n[0]=k(()=>{},["stop"])),class:"post-img x1","object-fit":"cover",src:t.content+c(u),"preview-src":t.content},null,8,["onError","src","preview-src"])]),_:2},1024))),128))]),_:1})]),_:1})):g("",!0),[2,3].includes(l.imgs.length)?(e(),d(w,{key:1},{default:o(()=>[s(f,{"x-gap":4,"y-gap":4,cols:3},{default:o(()=>[(e(!0),r(a,null,m(l.imgs,t=>(e(),d(_,{key:t.id},{default:o(()=>[s(v,{onError:()=>t.content=c(p),onClick:n[1]||(n[1]=k(()=>{},["stop"])),class:"post-img x2","object-fit":"cover",src:t.content+c(u),"preview-src":t.content},null,8,["onError","src","preview-src"])]),_:2},1024))),128))]),_:1})]),_:1})):g("",!0),[4].includes(l.imgs.length)?(e(),d(w,{key:2},{default:o(()=>[s(f,{"x-gap":4,"y-gap":4,cols:4},{default:o(()=>[(e(!0),r(a,null,m(l.imgs,t=>(e(),d(_,{key:t.id},{default:o(()=>[s(v,{onError:()=>t.content=c(p),onClick:n[2]||(n[2]=k(()=>{},["stop"])),class:"post-img x3","object-fit":"cover",src:t.content+c(u),"preview-src":t.content},null,8,["onError","src","preview-src"])]),_:2},1024))),128))]),_:1})]),_:1})):g("",!0),[5].includes(l.imgs.length)?(e(),d(w,{key:3},{default:o(()=>[s(f,{"x-gap":4,"y-gap":4,cols:3},{default:o(()=>[(e(!0),r(a,null,m(l.imgs,(t,i)=>(e(),r(a,{key:t.id},[i<3?(e(),d(_,{key:0},{default:o(()=>[s(v,{onError:()=>t.content=c(p),onClick:n[3]||(n[3]=k(()=>{},["stop"])),class:"post-img x2","object-fit":"cover",src:t.content+c(u),"preview-src":t.content},null,8,["onError","src","preview-src"])]),_:2},1024)):g("",!0)],64))),128))]),_:1}),s(f,{"x-gap":4,"y-gap":4,cols:2,style:{"margin-top":"4px"}},{default:o(()=>[(e(!0),r(a,null,m(l.imgs,(t,i)=>(e(),r(a,{key:t.id},[i>=3?(e(),d(_,{key:0},{default:o(()=>[s(v,{onError:()=>t.content=c(p),onClick:n[4]||(n[4]=k(()=>{},["stop"])),class:"post-img x1","object-fit":"cover",src:t.content+c(u),"preview-src":t.content},null,8,["onError","src","preview-src"])]),_:2},1024)):g("",!0)],64))),128))]),_:1})]),_:1})):g("",!0),[6].includes(l.imgs.length)?(e(),d(w,{key:4},{default:o(()=>[s(f,{"x-gap":4,"y-gap":4,cols:3},{default:o(()=>[(e(!0),r(a,null,m(l.imgs,(t,i)=>(e(),r(a,{key:t.id},[i<3?(e(),d(_,{key:0},{default:o(()=>[s(v,{onError:()=>t.content=c(p),onClick:n[5]||(n[5]=k(()=>{},["stop"])),class:"post-img x2","object-fit":"cover",src:t.content+c(u),"preview-src":t.content},null,8,["onError","src","preview-src"])]),_:2},1024)):g("",!0)],64))),128))]),_:1}),s(f,{"x-gap":4,"y-gap":4,cols:3,style:{"margin-top":"4px"}},{default:o(()=>[(e(!0),r(a,null,m(l.imgs,(t,i)=>(e(),r(a,{key:t.id},[i>=3?(e(),d(_,{key:0},{default:o(()=>[s(v,{onError:()=>t.content=c(p),onClick:n[6]||(n[6]=k(()=>{},["stop"])),class:"post-img x2","object-fit":"cover",src:t.content+c(u),"preview-src":t.content},null,8,["onError","src","preview-src"])]),_:2},1024)):g("",!0)],64))),128))]),_:1})]),_:1})):g("",!0),l.imgs.length===7?(e(),d(w,{key:5},{default:o(()=>[s(f,{"x-gap":4,"y-gap":4,cols:4},{default:o(()=>[(e(!0),r(a,null,m(l.imgs,(t,i)=>(e(),r(a,null,[i<4?(e(),d(_,{key:t.id},{default:o(()=>[s(v,{onError:()=>t.content=c(p),onClick:n[7]||(n[7]=k(()=>{},["stop"])),class:"post-img x3","object-fit":"cover",src:t.content+c(u),"preview-src":t.content},null,8,["onError","src","preview-src"])]),_:2},1024)):g("",!0)],64))),256))]),_:1}),s(f,{"x-gap":4,"y-gap":4,cols:3,style:{"margin-top":"4px"}},{default:o(()=>[(e(!0),r(a,null,m(l.imgs,(t,i)=>(e(),r(a,null,[i>=4?(e(),d(_,{key:t.id},{default:o(()=>[s(v,{onError:()=>t.content=c(p),onClick:n[8]||(n[8]=k(()=>{},["stop"])),class:"post-img x2","object-fit":"cover",src:t.content+c(u),"preview-src":t.content},null,8,["onError","src","preview-src"])]),_:2},1024)):g("",!0)],64))),256))]),_:1})]),_:1})):g("",!0),l.imgs.length===8?(e(),d(w,{key:6},{default:o(()=>[s(f,{"x-gap":4,"y-gap":4,cols:4},{default:o(()=>[(e(!0),r(a,null,m(l.imgs,(t,i)=>(e(),r(a,null,[i<4?(e(),d(_,{key:t.id},{default:o(()=>[s(v,{onError:()=>t.content=c(p),onClick:n[9]||(n[9]=k(()=>{},["stop"])),class:"post-img x3","object-fit":"cover",src:t.content+c(u),"preview-src":t.content},null,8,["onError","src","preview-src"])]),_:2},1024)):g("",!0)],64))),256))]),_:1}),s(f,{"x-gap":4,"y-gap":4,cols:4,style:{"margin-top":"4px"}},{default:o(()=>[(e(!0),r(a,null,m(l.imgs,(t,i)=>(e(),r(a,null,[i>=4?(e(),d(_,{key:t.id},{default:o(()=>[s(v,{onError:()=>t.content=c(p),onClick:n[10]||(n[10]=k(()=>{},["stop"])),class:"post-img x3","object-fit":"cover",src:t.content+c(u),"preview-src":t.content},null,8,["onError","src","preview-src"])]),_:2},1024)):g("",!0)],64))),256))]),_:1})]),_:1})):g("",!0),l.imgs.length===9?(e(),d(w,{key:7},{default:o(()=>[s(f,{"x-gap":4,"y-gap":4,cols:3},{default:o(()=>[(e(!0),r(a,null,m(l.imgs,(t,i)=>(e(),r(a,null,[i<3?(e(),d(_,{key:t.id},{default:o(()=>[s(v,{onError:()=>t.content=c(p),onClick:n[11]||(n[11]=k(()=>{},["stop"])),class:"post-img x2","object-fit":"cover",src:t.content+c(u),"preview-src":t.content},null,8,["onError","src","preview-src"])]),_:2},1024)):g("",!0)],64))),256))]),_:1}),s(f,{"x-gap":4,"y-gap":4,cols:3,style:{"margin-top":"4px"}},{default:o(()=>[(e(!0),r(a,null,m(l.imgs,(t,i)=>(e(),r(a,null,[i>=3&&i<6?(e(),d(_,{key:t.id},{default:o(()=>[s(v,{onError:()=>t.content=c(p),onClick:n[12]||(n[12]=k(()=>{},["stop"])),class:"post-img x2","object-fit":"cover",src:t.content+c(u),"preview-src":t.content},null,8,["onError","src","preview-src"])]),_:2},1024)):g("",!0)],64))),256))]),_:1}),s(f,{"x-gap":4,"y-gap":4,cols:3,style:{"margin-top":"4px"}},{default:o(()=>[(e(!0),r(a,null,m(l.imgs,(t,i)=>(e(),r(a,null,[i>=6?(e(),d(_,{key:t.id},{default:o(()=>[s(v,{onError:()=>t.content=c(p),onClick:n[13]||(n[13]=k(()=>{},["stop"])),class:"post-img x2","object-fit":"cover",src:t.content+c(u),"preview-src":t.content},null,8,["onError","src","preview-src"])]),_:2},1024)):g("",!0)],64))),256))]),_:1})]),_:1})):g("",!0)])}}});const Y={class:"attachment-wrap"},Z=h({__name:"post-attachment",props:{attachments:{default:()=>[]},price:{default:0}},setup(y){const l=y,p=j(!1),u=j(""),x=j(0),n=_=>{p.value=!0,x.value=_.id,u.value="这是一个免费附件,您可以直接下载?",_.type===8&&(u.value=()=>b("div",{},[b("p",{},"这是一个收费附件,下载将收取"+(l.price/100).toFixed(2)+"元")]),R({id:x.value}).then(f=>{f.paid&&(u.value=()=>b("div",{},[b("p",{},"此次下载您已支付或无需付费,请确认下载")]))}).catch(f=>{p.value=!1}))},v=()=>{T({id:x.value}).then(_=>{window.open(_.signed_url.replace("http://","https://"),"_blank")}).catch(_=>{console.log(_)})};return(_,f)=>{const w=$,t=L,i=P;return e(),r("div",Y,[(e(!0),r(a,null,m(_.attachments,E=>(e(),r("div",{class:"attach-item",key:E.id},[s(t,{onClick:k(G=>n(E),["stop"]),type:"primary",size:"tiny",dashed:""},{icon:o(()=>[s(w,null,{default:o(()=>[s(c(U))]),_:1})]),default:o(()=>[N(" "+I(E.type===8?"收费":"免费")+"附件 ",1)]),_:2},1032,["onClick"])]))),128)),s(i,{show:p.value,"onUpdate:show":f[0]||(f[0]=E=>p.value=E),"mask-closable":!1,preset:"dialog",title:"下载提示",content:u.value,"positive-text":"确认下载","negative-text":"取消","icon-placement":"top",onPositiveClick:v},null,8,["show","content"])])}}});const lt=D(Z,[["__scopeId","data-v-22563084"]]),ct=y=>{const l=[],p=[];var u=/(#|#)([^#@\s])+?\s+?/g,x=/@([a-zA-Z0-9])+?\s+?/g;return y=y.replace(/<[^>]*?>/gi,"").replace(/(.*?)<\/[^>]*?>/gi,"").replace(u,n=>(l.push(n.substr(1).trim()),''+n.trim()+" ")).replace(x,n=>(p.push(n.substr(1).trim()),''+n.trim()+" ")),{content:y,tags:l,users:p}};export{rt as _,lt as a,st as b,ot as c,ct as p}; diff --git a/web/dist/assets/index-7ab58e72.js b/web/dist/assets/index-757c547c.js similarity index 87% rename from web/dist/assets/index-7ab58e72.js rename to web/dist/assets/index-757c547c.js index 6906ecac..c3c17bdd 100644 --- a/web/dist/assets/index-7ab58e72.js +++ b/web/dist/assets/index-757c547c.js @@ -1 +1 @@ -import{d as W,H as $,R as Z,b as G,e as w,q as D,w as r,j as y,k as s,f as R,A as S,Z as q,y as K,Y as U,bf as g,c as Q,E as j,r as le,F as J,u as X,x as I,h as k,a5 as he,s as ee,l as ge,ag as fe}from"./@vue-a481fc63.js";import{c as ve,a as we,u as ue,b as ye}from"./vue-router-e5a2430e.js";import{c as be,u as B}from"./vuex-44de225f.js";import{a as ke}from"./axios-4a70c6fc.js";import{_ as Pe,N as Le,a as ce,b as ie,c as Oe,d as Ae,e as de,f as Te,g as Ee,h as pe,i as Re,j as V,k as $e,u as Ce,l as Ie,m as Se,n as Ue,o as Me,p as qe,q as Ke,r as De,s as Ne,t as xe}from"./naive-ui-d8de3dda.js";import{S as Fe,M as Ve,L as ze,C as We,B as Be,P as He,W as je,a as Ge,H as te,b as oe,c as se}from"./@vicons-33f992ab.js";/* empty css */import"./seemly-76b7b838.js";import"./vueuc-39372edb.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";(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const c of document.querySelectorAll('link[rel="modulepreload"]'))i(c);new MutationObserver(c=>{for(const n of c)if(n.type==="childList")for(const d of n.addedNodes)d.tagName==="LINK"&&d.rel==="modulepreload"&&i(d)}).observe(document,{childList:!0,subtree:!0});function a(c){const n={};return c.integrity&&(n.integrity=c.integrity),c.referrerPolicy&&(n.referrerPolicy=c.referrerPolicy),c.crossOrigin==="use-credentials"?n.credentials="include":c.crossOrigin==="anonymous"?n.credentials="omit":n.credentials="same-origin",n}function i(c){if(c.ep)return;c.ep=!0;const n=a(c);fetch(c.href,n)}})();const Qe="modulepreload",Ye=function(e){return"/"+e},ne={},O=function(t,a,i){if(!a||a.length===0)return t();const c=document.getElementsByTagName("link");return Promise.all(a.map(n=>{if(n=Ye(n),n in ne)return;ne[n]=!0;const d=n.endsWith(".css"),p=d?'[rel="stylesheet"]':"";if(!!i)for(let b=c.length-1;b>=0;b--){const h=c[b];if(h.href===n&&(!d||h.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${n}"]${p}`))return;const f=document.createElement("link");if(f.rel=d?"stylesheet":Qe,d||(f.as="script",f.crossOrigin=""),f.href=n,document.head.appendChild(f),d)return new Promise((b,h)=>{f.addEventListener("load",b),f.addEventListener("error",()=>h(new Error(`Unable to preload CSS for ${n}`)))})})).then(()=>t()).catch(n=>{const d=new Event("vite:preloadError",{cancelable:!0});if(d.payload=n,window.dispatchEvent(d),!d.defaultPrevented)throw n})},Ze=[{path:"/",name:"home",meta:{title:"广场",keepAlive:!0},component:()=>O(()=>import("./Home-e4808a73.js"),["assets/Home-e4808a73.js","assets/post-item.vue_vue_type_style_index_0_lang-3755d97f.js","assets/content-77341dc8.js","assets/@vue-a481fc63.js","assets/@vicons-33f992ab.js","assets/naive-ui-d8de3dda.js","assets/seemly-76b7b838.js","assets/vueuc-39372edb.js","assets/evtd-b614532e.js","assets/@css-render-7124a1a5.js","assets/vooks-6d99783e.js","assets/vdirs-b0483831.js","assets/@juggle-41516555.js","assets/css-render-6a5c5852.js","assets/@emotion-8a8e73f6.js","assets/lodash-es-8412e618.js","assets/treemate-25c27bff.js","assets/async-validator-dee29e8b.js","assets/date-fns-975a2d8f.js","assets/paopao-video-player-2fe58954.js","assets/content-2fda112b.css","assets/vuex-44de225f.js","assets/vue-router-e5a2430e.js","assets/formatTime-4210fcd1.js","assets/moment-2ab8298d.js","assets/copy-to-clipboard-4ef7d3eb.js","assets/@babel-725317a4.js","assets/toggle-selection-93f4ad84.js","assets/post-item-d81938d1.css","assets/post-skeleton-bae19eed.js","assets/post-skeleton-f1900002.css","assets/lodash-e0b37ac3.js","assets/IEnum-5453a777.js","assets/main-nav.vue_vue_type_style_index_0_lang-3b4e457a.js","assets/main-nav-569a7b0c.css","assets/v3-infinite-loading-2c58ec2f.js","assets/v3-infinite-loading-1ff9ffe7.css","assets/@opentiny-d73a2d67.js","assets/vue-1e3b54ec.js","assets/xss-a5544f63.js","assets/cssfilter-af71ba68.js","assets/@opentiny-0f942bd4.css","assets/axios-4a70c6fc.js","assets/Home-7d19114d.css","assets/vfonts-7afd136d.css"])},{path:"/post",name:"post",meta:{title:"泡泡详情"},component:()=>O(()=>import("./Post-38faf6e2.js"),["assets/Post-38faf6e2.js","assets/@vue-a481fc63.js","assets/vuex-44de225f.js","assets/formatTime-4210fcd1.js","assets/moment-2ab8298d.js","assets/IEnum-5453a777.js","assets/@vicons-33f992ab.js","assets/naive-ui-d8de3dda.js","assets/seemly-76b7b838.js","assets/vueuc-39372edb.js","assets/evtd-b614532e.js","assets/@css-render-7124a1a5.js","assets/vooks-6d99783e.js","assets/vdirs-b0483831.js","assets/@juggle-41516555.js","assets/css-render-6a5c5852.js","assets/@emotion-8a8e73f6.js","assets/lodash-es-8412e618.js","assets/treemate-25c27bff.js","assets/async-validator-dee29e8b.js","assets/date-fns-975a2d8f.js","assets/content-77341dc8.js","assets/paopao-video-player-2fe58954.js","assets/content-2fda112b.css","assets/vue-router-e5a2430e.js","assets/post-skeleton-bae19eed.js","assets/post-skeleton-f1900002.css","assets/lodash-e0b37ac3.js","assets/@babel-725317a4.js","assets/copy-to-clipboard-4ef7d3eb.js","assets/toggle-selection-93f4ad84.js","assets/main-nav.vue_vue_type_style_index_0_lang-3b4e457a.js","assets/main-nav-569a7b0c.css","assets/v3-infinite-loading-2c58ec2f.js","assets/v3-infinite-loading-1ff9ffe7.css","assets/axios-4a70c6fc.js","assets/Post-b5b6aab2.css","assets/vfonts-7afd136d.css"])},{path:"/topic",name:"topic",meta:{title:"话题"},component:()=>O(()=>import("./Topic-47abbf45.js"),["assets/Topic-47abbf45.js","assets/@vicons-33f992ab.js","assets/@vue-a481fc63.js","assets/naive-ui-d8de3dda.js","assets/seemly-76b7b838.js","assets/vueuc-39372edb.js","assets/evtd-b614532e.js","assets/@css-render-7124a1a5.js","assets/vooks-6d99783e.js","assets/vdirs-b0483831.js","assets/@juggle-41516555.js","assets/css-render-6a5c5852.js","assets/@emotion-8a8e73f6.js","assets/lodash-es-8412e618.js","assets/treemate-25c27bff.js","assets/async-validator-dee29e8b.js","assets/date-fns-975a2d8f.js","assets/main-nav.vue_vue_type_style_index_0_lang-3b4e457a.js","assets/vuex-44de225f.js","assets/vue-router-e5a2430e.js","assets/main-nav-569a7b0c.css","assets/axios-4a70c6fc.js","assets/Topic-384e019e.css","assets/vfonts-7afd136d.css"])},{path:"/anouncement",name:"anouncement",meta:{title:"公告"},component:()=>O(()=>import("./Anouncement-c742a454.js"),["assets/Anouncement-c742a454.js","assets/post-skeleton-bae19eed.js","assets/naive-ui-d8de3dda.js","assets/seemly-76b7b838.js","assets/@vue-a481fc63.js","assets/vueuc-39372edb.js","assets/evtd-b614532e.js","assets/@css-render-7124a1a5.js","assets/vooks-6d99783e.js","assets/vdirs-b0483831.js","assets/@juggle-41516555.js","assets/css-render-6a5c5852.js","assets/@emotion-8a8e73f6.js","assets/lodash-es-8412e618.js","assets/treemate-25c27bff.js","assets/async-validator-dee29e8b.js","assets/date-fns-975a2d8f.js","assets/post-skeleton-f1900002.css","assets/main-nav.vue_vue_type_style_index_0_lang-3b4e457a.js","assets/vuex-44de225f.js","assets/vue-router-e5a2430e.js","assets/@vicons-33f992ab.js","assets/main-nav-569a7b0c.css","assets/formatTime-4210fcd1.js","assets/moment-2ab8298d.js","assets/axios-4a70c6fc.js","assets/Anouncement-662e2d95.css","assets/vfonts-7afd136d.css"])},{path:"/profile",name:"profile",meta:{title:"主页"},component:()=>O(()=>import("./Profile-39c7e09b.js"),["assets/Profile-39c7e09b.js","assets/post-item.vue_vue_type_style_index_0_lang-3755d97f.js","assets/content-77341dc8.js","assets/@vue-a481fc63.js","assets/@vicons-33f992ab.js","assets/naive-ui-d8de3dda.js","assets/seemly-76b7b838.js","assets/vueuc-39372edb.js","assets/evtd-b614532e.js","assets/@css-render-7124a1a5.js","assets/vooks-6d99783e.js","assets/vdirs-b0483831.js","assets/@juggle-41516555.js","assets/css-render-6a5c5852.js","assets/@emotion-8a8e73f6.js","assets/lodash-es-8412e618.js","assets/treemate-25c27bff.js","assets/async-validator-dee29e8b.js","assets/date-fns-975a2d8f.js","assets/paopao-video-player-2fe58954.js","assets/content-2fda112b.css","assets/vuex-44de225f.js","assets/vue-router-e5a2430e.js","assets/formatTime-4210fcd1.js","assets/moment-2ab8298d.js","assets/copy-to-clipboard-4ef7d3eb.js","assets/@babel-725317a4.js","assets/toggle-selection-93f4ad84.js","assets/post-item-d81938d1.css","assets/post-skeleton-bae19eed.js","assets/post-skeleton-f1900002.css","assets/main-nav.vue_vue_type_style_index_0_lang-3b4e457a.js","assets/main-nav-569a7b0c.css","assets/v3-infinite-loading-2c58ec2f.js","assets/v3-infinite-loading-1ff9ffe7.css","assets/axios-4a70c6fc.js","assets/Profile-ab12b2fa.css","assets/vfonts-7afd136d.css"])},{path:"/u",name:"user",meta:{title:"用户详情"},component:()=>O(()=>import("./User-1173c46a.js"),["assets/User-1173c46a.js","assets/post-item.vue_vue_type_style_index_0_lang-3755d97f.js","assets/content-77341dc8.js","assets/@vue-a481fc63.js","assets/@vicons-33f992ab.js","assets/naive-ui-d8de3dda.js","assets/seemly-76b7b838.js","assets/vueuc-39372edb.js","assets/evtd-b614532e.js","assets/@css-render-7124a1a5.js","assets/vooks-6d99783e.js","assets/vdirs-b0483831.js","assets/@juggle-41516555.js","assets/css-render-6a5c5852.js","assets/@emotion-8a8e73f6.js","assets/lodash-es-8412e618.js","assets/treemate-25c27bff.js","assets/async-validator-dee29e8b.js","assets/date-fns-975a2d8f.js","assets/paopao-video-player-2fe58954.js","assets/content-2fda112b.css","assets/vuex-44de225f.js","assets/vue-router-e5a2430e.js","assets/formatTime-4210fcd1.js","assets/moment-2ab8298d.js","assets/copy-to-clipboard-4ef7d3eb.js","assets/@babel-725317a4.js","assets/toggle-selection-93f4ad84.js","assets/post-item-d81938d1.css","assets/post-skeleton-bae19eed.js","assets/post-skeleton-f1900002.css","assets/main-nav.vue_vue_type_style_index_0_lang-3b4e457a.js","assets/main-nav-569a7b0c.css","assets/v3-infinite-loading-2c58ec2f.js","assets/v3-infinite-loading-1ff9ffe7.css","assets/axios-4a70c6fc.js","assets/User-917e7989.css","assets/vfonts-7afd136d.css"])},{path:"/messages",name:"messages",meta:{title:"消息"},component:()=>O(()=>import("./Messages-f750805b.js"),["assets/Messages-f750805b.js","assets/@vue-a481fc63.js","assets/vue-router-e5a2430e.js","assets/formatTime-4210fcd1.js","assets/moment-2ab8298d.js","assets/@vicons-33f992ab.js","assets/naive-ui-d8de3dda.js","assets/seemly-76b7b838.js","assets/vueuc-39372edb.js","assets/evtd-b614532e.js","assets/@css-render-7124a1a5.js","assets/vooks-6d99783e.js","assets/vdirs-b0483831.js","assets/@juggle-41516555.js","assets/css-render-6a5c5852.js","assets/@emotion-8a8e73f6.js","assets/lodash-es-8412e618.js","assets/treemate-25c27bff.js","assets/async-validator-dee29e8b.js","assets/date-fns-975a2d8f.js","assets/main-nav.vue_vue_type_style_index_0_lang-3b4e457a.js","assets/vuex-44de225f.js","assets/main-nav-569a7b0c.css","assets/axios-4a70c6fc.js","assets/Messages-7a898af3.css","assets/vfonts-7afd136d.css"])},{path:"/collection",name:"collection",meta:{title:"收藏"},component:()=>O(()=>import("./Collection-a4fc2204.js"),["assets/Collection-a4fc2204.js","assets/post-item.vue_vue_type_style_index_0_lang-3755d97f.js","assets/content-77341dc8.js","assets/@vue-a481fc63.js","assets/@vicons-33f992ab.js","assets/naive-ui-d8de3dda.js","assets/seemly-76b7b838.js","assets/vueuc-39372edb.js","assets/evtd-b614532e.js","assets/@css-render-7124a1a5.js","assets/vooks-6d99783e.js","assets/vdirs-b0483831.js","assets/@juggle-41516555.js","assets/css-render-6a5c5852.js","assets/@emotion-8a8e73f6.js","assets/lodash-es-8412e618.js","assets/treemate-25c27bff.js","assets/async-validator-dee29e8b.js","assets/date-fns-975a2d8f.js","assets/paopao-video-player-2fe58954.js","assets/content-2fda112b.css","assets/vuex-44de225f.js","assets/vue-router-e5a2430e.js","assets/formatTime-4210fcd1.js","assets/moment-2ab8298d.js","assets/copy-to-clipboard-4ef7d3eb.js","assets/@babel-725317a4.js","assets/toggle-selection-93f4ad84.js","assets/post-item-d81938d1.css","assets/post-skeleton-bae19eed.js","assets/post-skeleton-f1900002.css","assets/main-nav.vue_vue_type_style_index_0_lang-3b4e457a.js","assets/main-nav-569a7b0c.css","assets/axios-4a70c6fc.js","assets/Collection-b97b3cf7.css","assets/vfonts-7afd136d.css"])},{path:"/contacts",name:"contacts",meta:{title:"好友"},component:()=>O(()=>import("./Contacts-9c1c8f45.js"),["assets/Contacts-9c1c8f45.js","assets/vue-router-e5a2430e.js","assets/@vue-a481fc63.js","assets/formatTime-4210fcd1.js","assets/moment-2ab8298d.js","assets/naive-ui-d8de3dda.js","assets/seemly-76b7b838.js","assets/vueuc-39372edb.js","assets/evtd-b614532e.js","assets/@css-render-7124a1a5.js","assets/vooks-6d99783e.js","assets/vdirs-b0483831.js","assets/@juggle-41516555.js","assets/css-render-6a5c5852.js","assets/@emotion-8a8e73f6.js","assets/lodash-es-8412e618.js","assets/treemate-25c27bff.js","assets/async-validator-dee29e8b.js","assets/date-fns-975a2d8f.js","assets/post-skeleton-bae19eed.js","assets/post-skeleton-f1900002.css","assets/main-nav.vue_vue_type_style_index_0_lang-3b4e457a.js","assets/vuex-44de225f.js","assets/@vicons-33f992ab.js","assets/main-nav-569a7b0c.css","assets/axios-4a70c6fc.js","assets/Contacts-baa2e9bb.css","assets/vfonts-7afd136d.css"])},{path:"/following",name:"following",meta:{title:"关注"},component:()=>O(()=>import("./Following-1907aebf.js"),["assets/Following-1907aebf.js","assets/@vue-a481fc63.js","assets/vue-router-e5a2430e.js","assets/formatTime-4210fcd1.js","assets/moment-2ab8298d.js","assets/@vicons-33f992ab.js","assets/naive-ui-d8de3dda.js","assets/seemly-76b7b838.js","assets/vueuc-39372edb.js","assets/evtd-b614532e.js","assets/@css-render-7124a1a5.js","assets/vooks-6d99783e.js","assets/vdirs-b0483831.js","assets/@juggle-41516555.js","assets/css-render-6a5c5852.js","assets/@emotion-8a8e73f6.js","assets/lodash-es-8412e618.js","assets/treemate-25c27bff.js","assets/async-validator-dee29e8b.js","assets/date-fns-975a2d8f.js","assets/post-skeleton-bae19eed.js","assets/post-skeleton-f1900002.css","assets/main-nav.vue_vue_type_style_index_0_lang-3b4e457a.js","assets/vuex-44de225f.js","assets/main-nav-569a7b0c.css","assets/axios-4a70c6fc.js","assets/Following-31b77f3b.css","assets/vfonts-7afd136d.css"])},{path:"/wallet",name:"wallet",meta:{title:"钱包"},component:()=>O(()=>import("./Wallet-7bd16035.js"),["assets/Wallet-7bd16035.js","assets/post-skeleton-bae19eed.js","assets/naive-ui-d8de3dda.js","assets/seemly-76b7b838.js","assets/@vue-a481fc63.js","assets/vueuc-39372edb.js","assets/evtd-b614532e.js","assets/@css-render-7124a1a5.js","assets/vooks-6d99783e.js","assets/vdirs-b0483831.js","assets/@juggle-41516555.js","assets/css-render-6a5c5852.js","assets/@emotion-8a8e73f6.js","assets/lodash-es-8412e618.js","assets/treemate-25c27bff.js","assets/async-validator-dee29e8b.js","assets/date-fns-975a2d8f.js","assets/post-skeleton-f1900002.css","assets/main-nav.vue_vue_type_style_index_0_lang-3b4e457a.js","assets/vuex-44de225f.js","assets/vue-router-e5a2430e.js","assets/@vicons-33f992ab.js","assets/main-nav-569a7b0c.css","assets/qrcode-9719fc56.js","assets/encode-utf8-f813de00.js","assets/dijkstrajs-f906a09e.js","assets/formatTime-4210fcd1.js","assets/moment-2ab8298d.js","assets/axios-4a70c6fc.js","assets/Wallet-77044929.css","assets/vfonts-7afd136d.css"])},{path:"/setting",name:"setting",meta:{title:"设置"},component:()=>O(()=>import("./Setting-63aa581f.js"),["assets/Setting-63aa581f.js","assets/main-nav.vue_vue_type_style_index_0_lang-3b4e457a.js","assets/vuex-44de225f.js","assets/@vue-a481fc63.js","assets/vue-router-e5a2430e.js","assets/vooks-6d99783e.js","assets/evtd-b614532e.js","assets/@vicons-33f992ab.js","assets/naive-ui-d8de3dda.js","assets/seemly-76b7b838.js","assets/vueuc-39372edb.js","assets/@css-render-7124a1a5.js","assets/vdirs-b0483831.js","assets/@juggle-41516555.js","assets/css-render-6a5c5852.js","assets/@emotion-8a8e73f6.js","assets/lodash-es-8412e618.js","assets/treemate-25c27bff.js","assets/async-validator-dee29e8b.js","assets/date-fns-975a2d8f.js","assets/main-nav-569a7b0c.css","assets/axios-4a70c6fc.js","assets/Setting-bfd24152.css","assets/vfonts-7afd136d.css"])},{path:"/404",name:"404",meta:{title:"404"},component:()=>O(()=>import("./404-cf8c84c4.js"),["assets/404-cf8c84c4.js","assets/main-nav.vue_vue_type_style_index_0_lang-3b4e457a.js","assets/vuex-44de225f.js","assets/@vue-a481fc63.js","assets/vue-router-e5a2430e.js","assets/vooks-6d99783e.js","assets/evtd-b614532e.js","assets/@vicons-33f992ab.js","assets/naive-ui-d8de3dda.js","assets/seemly-76b7b838.js","assets/vueuc-39372edb.js","assets/@css-render-7124a1a5.js","assets/vdirs-b0483831.js","assets/@juggle-41516555.js","assets/css-render-6a5c5852.js","assets/@emotion-8a8e73f6.js","assets/lodash-es-8412e618.js","assets/treemate-25c27bff.js","assets/async-validator-dee29e8b.js","assets/date-fns-975a2d8f.js","assets/main-nav-569a7b0c.css","assets/axios-4a70c6fc.js","assets/404-020b2afd.css","assets/vfonts-7afd136d.css"])},{path:"/:pathMatch(.*)",redirect:"/404"}],me=ve({history:we(),routes:Ze});me.beforeEach((e,t,a)=>{document.title=`${e.meta.title} | 泡泡 - 一个清新文艺的微社区`,a()});const Je=be({state:{refresh:Date.now(),refreshTopicFollow:Date.now(),theme:localStorage.getItem("PAOPAO_THEME"),collapsedLeft:document.body.clientWidth<=821,collapsedRight:document.body.clientWidth<=821,drawerModelShow:document.body.clientWidth<=821,desktopModelShow:document.body.clientWidth>821,authModalShow:!1,authModelTab:"signin",userLogined:!1,userInfo:{id:0,username:"",nickname:"",created_on:0,follows:0,followings:0}},mutations:{refresh(e,t){e.refresh=t||Date.now()},refreshTopicFollow(e){e.refreshTopicFollow=Date.now()},triggerTheme(e,t){e.theme=t},triggerAuth(e,t){e.authModalShow=t},triggerAuthKey(e,t){e.authModelTab=t},triggerCollapsedLeft(e,t){e.collapsedLeft=t,e.drawerModelShow=t,e.desktopModelShow=!t},triggerCollapsedRight(e,t){e.collapsedRight=t},updateUserinfo(e,t){e.userInfo=t,e.userInfo.id>0&&(e.userLogined=!0)},userLogout(e){localStorage.removeItem("PAOPAO_TOKEN"),e.userInfo={id:0,nickname:"",username:"",created_on:0,follows:0,followings:0},e.userLogined=!1}},actions:{},modules:{}}),Y=ke.create({baseURL:"",timeout:3e4});Y.interceptors.request.use(e=>(localStorage.getItem("PAOPAO_TOKEN")&&(e.headers.Authorization="Bearer "+localStorage.getItem("PAOPAO_TOKEN")),e),e=>Promise.reject(e));Y.interceptors.response.use(e=>{const{data:t={},code:a=0}=(e==null?void 0:e.data)||{};if(+a==0)return t||{};Promise.reject((e==null?void 0:e.data)||{})},(e={})=>{var a;const{response:t={}}=e||{};return+(t==null?void 0:t.status)==401?(localStorage.removeItem("PAOPAO_TOKEN"),(t==null?void 0:t.data.code)!==10005?window.$message.warning((t==null?void 0:t.data.msg)||"鉴权失败"):window.$store.commit("triggerAuth",!0)):window.$message.error(((a=t==null?void 0:t.data)==null?void 0:a.msg)||"请求失败"),Promise.reject((t==null?void 0:t.data)||{})});function o(e){return Y(e)}const re=e=>o({method:"post",url:"/v1/auth/login",data:e}),Xe=e=>o({method:"post",url:"/v1/auth/register",data:e}),H=(e="")=>o({method:"get",url:"/v1/user/info",headers:{Authorization:`Bearer ${e}`}}),et={class:"auth-wrap"},tt={key:0},ot=W({__name:"auth",setup(e){const t=$("true".toLowerCase()==="true"),a=B(),i=$(!1),c=$(),n=Z({username:"",password:""}),d=$(),p=Z({username:"",password:"",repassword:""}),M={username:{required:!0,message:"请输入账户名"},password:{required:!0,message:"请输入密码"},repassword:[{required:!0,message:"请输入密码"},{validator:(h,u)=>!!p.password&&p.password.startsWith(u)&&p.password.length>=u.length,message:"两次密码输入不一致",trigger:"input"}]},f=h=>{var u;h.preventDefault(),h.stopPropagation(),(u=c.value)==null||u.validate(A=>{A||(i.value=!0,re({username:n.username,password:n.password}).then(_=>{const L=(_==null?void 0:_.token)||"";return localStorage.setItem("PAOPAO_TOKEN",L),H(L)}).then(_=>{window.$message.success("登录成功"),i.value=!1,a.commit("updateUserinfo",_),a.commit("triggerAuth",!1),a.commit("refresh"),n.username="",n.password=""}).catch(_=>{i.value=!1}))})},b=h=>{var u;h.preventDefault(),h.stopPropagation(),(u=d.value)==null||u.validate(A=>{A||(i.value=!0,Xe({username:p.username,password:p.password}).then(_=>re({username:p.username,password:p.password})).then(_=>{const L=(_==null?void 0:_.token)||"";return localStorage.setItem("PAOPAO_TOKEN",L),H(L)}).then(_=>{window.$message.success("注册成功"),i.value=!1,a.commit("updateUserinfo",_),a.commit("triggerAuth",!1),p.username="",p.password="",p.repassword=""}).catch(_=>{i.value=!1}))})};return G(()=>{const h=localStorage.getItem("PAOPAO_TOKEN")||"";h?H(h).then(u=>{a.commit("updateUserinfo",u),a.commit("triggerAuth",!1)}).catch(u=>{a.commit("userLogout")}):a.commit("userLogout")}),(h,u)=>{const A=Pe,_=Le,L=ce,T=ie,P=Oe,v=Ae,l=de,E=Te,F=Ee,N=pe,x=Re;return w(),D(x,{show:g(a).state.authModalShow,"onUpdate:show":u[7]||(u[7]=m=>g(a).state.authModalShow=m),class:"auth-card",preset:"card",size:"small","mask-closable":!1,bordered:!1,style:{width:"360px"}},{default:r(()=>[y("div",et,[s(N,{bordered:!1},{default:r(()=>[t.value?U("",!0):(w(),R("div",tt,[s(L,{justify:"center"},{default:r(()=>[s(_,null,{default:r(()=>[s(A,{type:"success"},{default:r(()=>[S("账号登录")]),_:1})]),_:1})]),_:1}),s(v,{ref_key:"loginRef",ref:c,model:n,rules:{username:{required:!0,message:"请输入账户名"},password:{required:!0,message:"请输入密码"}}},{default:r(()=>[s(P,{label:"账户",path:"username"},{default:r(()=>[s(T,{value:n.username,"onUpdate:value":u[0]||(u[0]=m=>n.username=m),placeholder:"请输入用户名",onKeyup:q(K(f,["prevent"]),["enter"])},null,8,["value","onKeyup"])]),_:1}),s(P,{label:"密码",path:"password"},{default:r(()=>[s(T,{type:"password","show-password-on":"mousedown",value:n.password,"onUpdate:value":u[1]||(u[1]=m=>n.password=m),placeholder:"请输入账户密码",onKeyup:q(K(f,["prevent"]),["enter"])},null,8,["value","onKeyup"])]),_:1})]),_:1},8,["model"]),s(l,{type:"primary",block:"",secondary:"",strong:"",loading:i.value,onClick:f},{default:r(()=>[S(" 登录 ")]),_:1},8,["loading"])])),t.value?(w(),D(F,{key:1,"default-value":g(a).state.authModelTab,size:"large","justify-content":"space-evenly"},{default:r(()=>[s(E,{name:"signin",tab:"登录"},{default:r(()=>[s(v,{ref_key:"loginRef",ref:c,model:n,rules:{username:{required:!0,message:"请输入账户名"},password:{required:!0,message:"请输入密码"}}},{default:r(()=>[s(P,{label:"账户",path:"username"},{default:r(()=>[s(T,{value:n.username,"onUpdate:value":u[2]||(u[2]=m=>n.username=m),placeholder:"请输入用户名",onKeyup:q(K(f,["prevent"]),["enter"])},null,8,["value","onKeyup"])]),_:1}),s(P,{label:"密码",path:"password"},{default:r(()=>[s(T,{type:"password","show-password-on":"mousedown",value:n.password,"onUpdate:value":u[3]||(u[3]=m=>n.password=m),placeholder:"请输入账户密码",onKeyup:q(K(f,["prevent"]),["enter"])},null,8,["value","onKeyup"])]),_:1})]),_:1},8,["model"]),s(l,{type:"primary",block:"",secondary:"",strong:"",loading:i.value,onClick:f},{default:r(()=>[S(" 登录 ")]),_:1},8,["loading"])]),_:1}),s(E,{name:"signup",tab:"注册"},{default:r(()=>[s(v,{ref_key:"registerRef",ref:d,model:p,rules:M},{default:r(()=>[s(P,{label:"用户名",path:"username"},{default:r(()=>[s(T,{value:p.username,"onUpdate:value":u[4]||(u[4]=m=>p.username=m),placeholder:"用户名注册后无法修改"},null,8,["value"])]),_:1}),s(P,{label:"密码",path:"password"},{default:r(()=>[s(T,{type:"password","show-password-on":"mousedown",placeholder:"密码不少于6位",value:p.password,"onUpdate:value":u[5]||(u[5]=m=>p.password=m),onKeyup:q(K(b,["prevent"]),["enter"])},null,8,["value","onKeyup"])]),_:1}),s(P,{label:"重复密码",path:"repassword"},{default:r(()=>[s(T,{type:"password","show-password-on":"mousedown",placeholder:"请再次输入密码",value:p.repassword,"onUpdate:value":u[6]||(u[6]=m=>p.repassword=m),onKeyup:q(K(b,["prevent"]),["enter"])},null,8,["value","onKeyup"])]),_:1})]),_:1},8,["model"]),s(l,{type:"primary",block:"",secondary:"",strong:"",loading:i.value,onClick:b},{default:r(()=>[S(" 注册 ")]),_:1},8,["loading"])]),_:1})]),_:1},8,["default-value"])):U("",!0)]),_:1})])]),_:1},8,["show"])}}});const _e=(e,t)=>{const a=e.__vccOpts||e;for(const[i,c]of t)a[i]=c;return a},st=_e(ot,[["__scopeId","data-v-053dfa44"]]),Zt=e=>o({method:"get",url:"/v1/posts",params:e}),nt=e=>o({method:"get",url:"/v1/tags",params:e}),Jt=e=>o({method:"get",url:"/v1/post",params:e}),Xt=e=>o({method:"get",url:"/v1/post/star",params:e}),eo=e=>o({method:"post",url:"/v1/post/star",data:e}),to=e=>o({method:"get",url:"/v1/post/collection",params:e}),oo=e=>o({method:"post",url:"/v1/post/collection",data:e}),so=e=>o({method:"get",url:"/v1/post/comments",params:e}),no=e=>o({method:"get",url:"/v1/user/contacts",params:e}),ro=e=>o({method:"post",url:"/v1/post",data:e}),ao=e=>o({method:"delete",url:"/v1/post",data:e}),lo=e=>o({method:"post",url:"/v1/post/lock",data:e}),uo=e=>o({method:"post",url:"/v1/post/stick",data:e}),co=e=>o({method:"post",url:"/v1/post/highlight",data:e}),io=e=>o({method:"post",url:"/v1/post/visibility",data:e}),po=e=>o({method:"post",url:"/v1/tweet/comment/thumbsup",data:e}),mo=e=>o({method:"post",url:"/v1/tweet/comment/thumbsdown",data:e}),_o=e=>o({method:"post",url:"/v1/tweet/reply/thumbsup",data:e}),ho=e=>o({method:"post",url:"/v1/tweet/reply/thumbsdown",data:e}),go=e=>o({method:"post",url:"/v1/post/comment",data:e}),fo=e=>o({method:"delete",url:"/v1/post/comment",data:e}),vo=e=>o({method:"post",url:"/v1/post/comment/reply",data:e}),wo=e=>o({method:"delete",url:"/v1/post/comment/reply",data:e}),yo=e=>o({method:"post",url:"/v1/topic/stick",data:e}),bo=e=>o({method:"post",url:"/v1/topic/follow",data:e}),ko=e=>o({method:"post",url:"/v1/topic/unfollow",data:e}),rt={key:0,class:"rightbar-wrap"},at={class:"search-wrap"},lt={class:"post-num"},ut={class:"post-num"},ct={class:"copyright"},it=["href"],dt=["href"],pt=W({__name:"rightbar",setup(e){const t=$([]),a=$([]),i=$(!1),c=$(""),n=B(),d=ue(),p="2023 paopao.info",M="Roc's Me",f="",b="泡泡(PaoPao)开源社区",h="https://www.paopao.info",u=+"6",A=+"12",_=()=>{i.value=!0,nt({type:"hot_extral",num:A,extral_num:u}).then(v=>{t.value=v.topics,a.value=v.extral_topics??[],P.value=!0,i.value=!1}).catch(v=>{i.value=!1})},L=v=>v>=1e3?(v/1e3).toFixed(1)+"k":v,T=()=>{d.push({name:"home",query:{q:c.value}})},P=Q({get:()=>n.state.userLogined&&a.value.length!==0,set:v=>{}});return j(()=>({refreshTopicFollow:n.state.refreshTopicFollow,userLogined:n.state.userLogined}),(v,l)=>{(v.refreshTopicFollow!==l.refreshTopicFollow||v.userLogined)&&_()}),G(()=>{_()}),(v,l)=>{const E=V,F=ie,N=le("router-link"),x=$e,m=pe,z=ce;return g(n).state.collapsedRight?U("",!0):(w(),R("div",rt,[y("div",at,[s(F,{round:"",clearable:"",placeholder:"搜一搜...",value:c.value,"onUpdate:value":l[0]||(l[0]=C=>c.value=C),onKeyup:q(K(T,["prevent"]),["enter"])},{prefix:r(()=>[s(E,{component:g(Fe)},null,8,["component"])]),_:1},8,["value","onKeyup"])]),P.value?(w(),D(m,{key:0,class:"hottopic-wrap",title:"关注话题",embedded:"",bordered:!1,size:"small"},{default:r(()=>[s(x,{show:i.value},{default:r(()=>[(w(!0),R(J,null,X(a.value,C=>(w(),R("div",{class:"hot-tag-item",key:C.id},[s(N,{class:"hash-link",to:{name:"home",query:{q:C.tag,t:"tag"}}},{default:r(()=>[S(" #"+I(C.tag),1)]),_:2},1032,["to"]),y("div",lt,I(L(C.quote_num)),1)]))),128))]),_:1},8,["show"])]),_:1})):U("",!0),s(m,{class:"hottopic-wrap",title:"热门话题",embedded:"",bordered:!1,size:"small"},{default:r(()=>[s(x,{show:i.value},{default:r(()=>[(w(!0),R(J,null,X(t.value,C=>(w(),R("div",{class:"hot-tag-item",key:C.id},[s(N,{class:"hash-link",to:{name:"home",query:{q:C.tag,t:"tag"}}},{default:r(()=>[S(" #"+I(C.tag),1)]),_:2},1032,["to"]),y("div",ut,I(L(C.quote_num)),1)]))),128))]),_:1},8,["show"])]),_:1}),s(m,{class:"copyright-wrap",embedded:"",bordered:!1,size:"small"},{default:r(()=>[y("div",ct,"© "+I(g(p)),1),y("div",null,[s(z,null,{default:r(()=>[y("a",{href:g(f),target:"_blank",class:"hash-link"},I(g(M)),9,it),y("a",{href:g(h),target:"_blank",class:"hash-link"},I(g(b)),9,dt)]),_:1})])]),_:1})]))}}});const mt=_e(pt,[["__scopeId","data-v-52b86ac0"]]),Po=(e={})=>o({method:"get",url:"/v1/captcha",params:e}),Lo=e=>o({method:"post",url:"/v1/captcha",data:e}),Oo=e=>o({method:"post",url:"/v1/user/whisper",data:e}),Ao=e=>o({method:"post",url:"/v1/friend/requesting",data:e}),To=e=>o({method:"post",url:"/v1/friend/add",data:e}),Eo=e=>o({method:"post",url:"/v1/user/follow",data:e}),Ro=e=>o({method:"post",url:"/v1/user/unfollow",data:e}),$o=e=>o({method:"get",url:"/v1/user/follows",params:e}),Co=e=>o({method:"get",url:"/v1/user/followings",params:e}),Io=e=>o({method:"post",url:"/v1/friend/reject",data:e}),So=e=>o({method:"post",url:"/v1/friend/delete",data:e}),Uo=e=>o({method:"post",url:"/v1/user/phone",data:e}),Mo=e=>o({method:"post",url:"/v1/user/activate",data:e}),qo=e=>o({method:"post",url:"/v1/user/password",data:e}),Ko=e=>o({method:"post",url:"/v1/user/nickname",data:e}),Do=e=>o({method:"post",url:"/v1/user/avatar",data:e}),ae=(e={})=>o({method:"get",url:"/v1/user/msgcount/unread",params:e}),No=e=>o({method:"get",url:"/v1/user/messages",params:e}),xo=e=>o({method:"post",url:"/v1/user/message/read",data:e}),Fo=e=>o({method:"get",url:"/v1/user/collections",params:e}),Vo=e=>o({method:"get",url:"/v1/user/profile",params:e}),zo=e=>o({method:"get",url:"/v1/user/posts",params:e}),Wo=e=>o({method:"get",url:"/v1/user/wallet/bills",params:e}),Bo=e=>o({method:"post",url:"/v1/user/recharge",data:e}),Ho=e=>o({method:"get",url:"/v1/user/recharge",params:e}),jo=e=>o({method:"get",url:"/v1/suggest/users",params:e}),Go=e=>o({method:"get",url:"/v1/suggest/tags",params:e}),Qo=e=>o({method:"get",url:"/v1/attachment/precheck",params:e}),Yo=e=>o({method:"get",url:"/v1/attachment",params:e}),Zo=e=>o({method:"post",url:"/v1/admin/user/status",data:e}),_t="/assets/logo-52afee68.png",ht={class:"sidebar-wrap"},gt={class:"logo-wrap"},ft={key:0,class:"user-wrap"},vt={class:"user-info"},wt={class:"nickname"},yt={class:"nickname-txt"},bt={class:"username"},kt={class:"user-mini-wrap"},Pt={key:1,class:"user-wrap"},Lt={key:0,class:"login-only-wrap"},Ot={key:1,class:"login-wrap"},At=W({__name:"sidebar",setup(e){const t=B(),a=ye(),i=ue(),c=$(!1),n=$(a.name||""),d=$(),p="true".toLowerCase()==="true",M="false".toLowerCase()==="true",f="false".toLocaleLowerCase()==="true",b=$("true".toLowerCase()==="true"),h=+"5000";j(a,()=>{n.value=a.name}),j(t.state,()=>{t.state.userInfo.id>0?d.value||(ae().then(l=>{c.value=l.count>0}).catch(l=>{console.log(l)}),d.value=setInterval(()=>{ae().then(l=>{c.value=l.count>0}).catch(l=>{console.log(l)})},h)):d.value&&clearInterval(d.value)}),G(()=>{window.onresize=()=>{t.commit("triggerCollapsedLeft",document.body.clientWidth<=821),t.commit("triggerCollapsedRight",document.body.clientWidth<=821)}});const u=Q(()=>{const l=[{label:"广场",key:"home",icon:()=>k(te),href:"/"},{label:"话题",key:"topic",icon:()=>k(oe),href:"/topic"}];return M&&l.push({label:"公告",key:"anouncement",icon:()=>k(Ve),href:"/anouncement"}),l.push({label:"主页",key:"profile",icon:()=>k(ze),href:"/profile"}),l.push({label:"消息",key:"messages",icon:()=>k(We),href:"/messages"}),l.push({label:"收藏",key:"collection",icon:()=>k(Be),href:"/collection"}),p&&l.push({label:"好友",key:"contacts",icon:()=>k(He),href:"/contacts"}),f&&l.push({label:"钱包",key:"wallet",icon:()=>k(je),href:"/wallet"}),l.push({label:"设置",key:"setting",icon:()=>k(Ge),href:"/setting"}),t.state.userInfo.id>0?l:[{label:"广场",key:"home",icon:()=>k(te),href:"/"},{label:"话题",key:"topic",icon:()=>k(oe),href:"/topic"}]}),A=l=>"href"in l?k("div",{},l.label):l.label,_=l=>l.key==="messages"?k(Ie,{dot:!0,show:c.value,processing:!0},{default:()=>k(V,{color:l.key===n.value?"var(--n-item-icon-color-active)":"var(--n-item-icon-color)"},{default:l.icon})}):k(V,null,{default:l.icon}),L=(l,E={})=>{n.value=l,i.push({name:l,query:{t:new Date().getTime()}})},T=()=>{a.path==="/"&&t.commit("refresh"),L("home")},P=l=>{t.commit("triggerAuth",!0),t.commit("triggerAuthKey",l)},v=()=>{t.commit("userLogout"),t.commit("refresh"),T()};return window.$store=t,window.$message=Ce(),(l,E)=>{const F=Se,N=Ue,x=Me,m=de;return w(),R("div",ht,[y("div",gt,[s(F,{class:"logo-img",width:"36",src:g(_t),"preview-disabled":!0,onClick:T},null,8,["src"])]),s(N,{accordion:!0,"icon-size":24,options:u.value,"render-label":A,"render-icon":_,value:n.value,"onUpdate:value":L},null,8,["options","value"]),g(t).state.userInfo.id>0?(w(),R("div",ft,[s(x,{class:"user-avatar",round:"",size:34,src:g(t).state.userInfo.avatar},null,8,["src"]),y("div",vt,[y("div",wt,[y("span",yt,I(g(t).state.userInfo.nickname),1),s(m,{class:"logout",quaternary:"",circle:"",size:"tiny",onClick:v},{icon:r(()=>[s(g(V),null,{default:r(()=>[s(g(se))]),_:1})]),_:1})]),y("div",bt,"@"+I(g(t).state.userInfo.username),1)]),y("div",kt,[s(m,{class:"logout",quaternary:"",circle:"",onClick:v},{icon:r(()=>[s(g(V),{size:24},{default:r(()=>[s(g(se))]),_:1})]),_:1})])])):(w(),R("div",Pt,[b.value?U("",!0):(w(),R("div",Lt,[s(m,{strong:"",secondary:"",round:"",type:"primary",onClick:E[0]||(E[0]=z=>P("signin"))},{default:r(()=>[S(" 登录 ")]),_:1})])),b.value?(w(),R("div",Ot,[s(m,{strong:"",secondary:"",round:"",type:"primary",onClick:E[1]||(E[1]=z=>P("signin"))},{default:r(()=>[S(" 登录 ")]),_:1}),s(m,{strong:"",secondary:"",round:"",type:"info",onClick:E[2]||(E[2]=z=>P("signup"))},{default:r(()=>[S(" 注册 ")]),_:1})])):U("",!0)]))])}}});const Tt={"has-sider":"",class:"main-wrap",position:"static"},Et={key:0},Rt={class:"content-wrap"},$t=W({__name:"App",setup(e){const t=B(),a=Q(()=>t.state.theme==="dark"?Ke:null);return(i,c)=>{const n=At,d=le("router-view"),p=mt,M=st,f=De,b=Ne,h=xe,u=qe;return w(),D(u,{theme:a.value},{default:r(()=>[s(b,null,{default:r(()=>[s(f,null,{default:r(()=>{var A;return[y("div",{class:ge(["app-container",{dark:((A=a.value)==null?void 0:A.name)==="dark",mobile:!g(t).state.desktopModelShow}])},[y("div",Tt,[g(t).state.desktopModelShow?(w(),R("div",Et,[s(n)])):U("",!0),y("div",Rt,[s(d,{class:"app-wrap"},{default:r(({Component:_})=>[(w(),D(he,null,[i.$route.meta.keepAlive?(w(),D(ee(_),{key:0})):U("",!0)],1024)),i.$route.meta.keepAlive?U("",!0):(w(),D(ee(_),{key:0}))]),_:1})]),s(p)]),s(M)],2)]}),_:1})]),_:1}),s(h)]),_:1},8,["theme"])}}});fe($t).use(me).use(Je).mount("#app");export{Uo as $,ko as A,bo as B,nt as C,Oo as D,Ao as E,Vo as F,So as G,Ro as H,Eo as I,Zo as J,To as K,Io as L,xo as M,No as N,Fo as O,Qo as P,Yo as Q,$o as R,Co as S,H as T,Wo as U,Bo as V,Ho as W,Po as X,Do as Y,qo as Z,_e as _,Go as a,Mo as a0,Ko as a1,Lo as a2,At as a3,no as b,ro as c,Zt as d,zo as e,ho as f,jo as g,wo as h,po as i,mo as j,vo as k,fo as l,go as m,Xt as n,to as o,ao as p,lo as q,co as r,uo as s,_o as t,eo as u,io as v,oo as w,Jt as x,so as y,yo as z}; +import{d as W,H as $,R as Z,b as G,e as w,q as D,w as r,j as y,k as s,f as R,A as S,Z as q,y as K,Y as U,bf as g,c as Q,E as j,r as le,F as J,u as X,x as I,h as k,a5 as he,s as ee,l as ge,ag as fe}from"./@vue-a481fc63.js";import{c as ve,a as we,u as ue,b as ye}from"./vue-router-e5a2430e.js";import{c as be,u as B}from"./vuex-44de225f.js";import{a as ke}from"./axios-4a70c6fc.js";import{_ as Pe,N as Le,a as ce,b as ie,c as Oe,d as Ae,e as de,f as Te,g as Ee,h as pe,i as Re,j as V,k as $e,u as Ce,l as Ie,m as Se,n as Ue,o as Me,p as qe,q as Ke,r as De,s as Ne,t as xe}from"./naive-ui-d8de3dda.js";import{S as Fe,M as Ve,L as ze,C as We,B as Be,P as He,W as je,a as Ge,H as te,b as oe,c as se}from"./@vicons-1a3558c6.js";/* empty css */import"./seemly-76b7b838.js";import"./vueuc-39372edb.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";(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const c of document.querySelectorAll('link[rel="modulepreload"]'))i(c);new MutationObserver(c=>{for(const n of c)if(n.type==="childList")for(const d of n.addedNodes)d.tagName==="LINK"&&d.rel==="modulepreload"&&i(d)}).observe(document,{childList:!0,subtree:!0});function a(c){const n={};return c.integrity&&(n.integrity=c.integrity),c.referrerPolicy&&(n.referrerPolicy=c.referrerPolicy),c.crossOrigin==="use-credentials"?n.credentials="include":c.crossOrigin==="anonymous"?n.credentials="omit":n.credentials="same-origin",n}function i(c){if(c.ep)return;c.ep=!0;const n=a(c);fetch(c.href,n)}})();const Qe="modulepreload",Ye=function(e){return"/"+e},ne={},O=function(t,a,i){if(!a||a.length===0)return t();const c=document.getElementsByTagName("link");return Promise.all(a.map(n=>{if(n=Ye(n),n in ne)return;ne[n]=!0;const d=n.endsWith(".css"),p=d?'[rel="stylesheet"]':"";if(!!i)for(let b=c.length-1;b>=0;b--){const h=c[b];if(h.href===n&&(!d||h.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${n}"]${p}`))return;const f=document.createElement("link");if(f.rel=d?"stylesheet":Qe,d||(f.as="script",f.crossOrigin=""),f.href=n,document.head.appendChild(f),d)return new Promise((b,h)=>{f.addEventListener("load",b),f.addEventListener("error",()=>h(new Error(`Unable to preload CSS for ${n}`)))})})).then(()=>t()).catch(n=>{const d=new Event("vite:preloadError",{cancelable:!0});if(d.payload=n,window.dispatchEvent(d),!d.defaultPrevented)throw n})},Ze=[{path:"/",name:"home",meta:{title:"广场",keepAlive:!0},component:()=>O(()=>import("./Home-d28a50f3.js"),["assets/Home-d28a50f3.js","assets/post-item.vue_vue_type_style_index_0_lang-cf11e2c5.js","assets/content-d5264b98.js","assets/@vue-a481fc63.js","assets/@vicons-1a3558c6.js","assets/naive-ui-d8de3dda.js","assets/seemly-76b7b838.js","assets/vueuc-39372edb.js","assets/evtd-b614532e.js","assets/@css-render-7124a1a5.js","assets/vooks-6d99783e.js","assets/vdirs-b0483831.js","assets/@juggle-41516555.js","assets/css-render-6a5c5852.js","assets/@emotion-8a8e73f6.js","assets/lodash-es-8412e618.js","assets/treemate-25c27bff.js","assets/async-validator-dee29e8b.js","assets/date-fns-975a2d8f.js","assets/paopao-video-player-2fe58954.js","assets/content-2fda112b.css","assets/vuex-44de225f.js","assets/vue-router-e5a2430e.js","assets/formatTime-4210fcd1.js","assets/moment-2ab8298d.js","assets/copy-to-clipboard-4ef7d3eb.js","assets/@babel-725317a4.js","assets/toggle-selection-93f4ad84.js","assets/post-item-d81938d1.css","assets/post-skeleton-c82f8a59.js","assets/post-skeleton-f1900002.css","assets/lodash-e0b37ac3.js","assets/IEnum-5453a777.js","assets/main-nav.vue_vue_type_style_index_0_lang-048bd56b.js","assets/main-nav-569a7b0c.css","assets/v3-infinite-loading-2c58ec2f.js","assets/v3-infinite-loading-1ff9ffe7.css","assets/@opentiny-d73a2d67.js","assets/vue-1e3b54ec.js","assets/xss-a5544f63.js","assets/cssfilter-af71ba68.js","assets/@opentiny-0f942bd4.css","assets/axios-4a70c6fc.js","assets/Home-7d19114d.css","assets/vfonts-7afd136d.css"])},{path:"/post",name:"post",meta:{title:"泡泡详情"},component:()=>O(()=>import("./Post-2d267990.js"),["assets/Post-2d267990.js","assets/@vue-a481fc63.js","assets/vuex-44de225f.js","assets/formatTime-4210fcd1.js","assets/moment-2ab8298d.js","assets/IEnum-5453a777.js","assets/@vicons-1a3558c6.js","assets/naive-ui-d8de3dda.js","assets/seemly-76b7b838.js","assets/vueuc-39372edb.js","assets/evtd-b614532e.js","assets/@css-render-7124a1a5.js","assets/vooks-6d99783e.js","assets/vdirs-b0483831.js","assets/@juggle-41516555.js","assets/css-render-6a5c5852.js","assets/@emotion-8a8e73f6.js","assets/lodash-es-8412e618.js","assets/treemate-25c27bff.js","assets/async-validator-dee29e8b.js","assets/date-fns-975a2d8f.js","assets/content-d5264b98.js","assets/paopao-video-player-2fe58954.js","assets/content-2fda112b.css","assets/vue-router-e5a2430e.js","assets/post-skeleton-c82f8a59.js","assets/post-skeleton-f1900002.css","assets/lodash-e0b37ac3.js","assets/@babel-725317a4.js","assets/copy-to-clipboard-4ef7d3eb.js","assets/toggle-selection-93f4ad84.js","assets/main-nav.vue_vue_type_style_index_0_lang-048bd56b.js","assets/main-nav-569a7b0c.css","assets/v3-infinite-loading-2c58ec2f.js","assets/v3-infinite-loading-1ff9ffe7.css","assets/axios-4a70c6fc.js","assets/Post-b5b6aab2.css","assets/vfonts-7afd136d.css"])},{path:"/topic",name:"topic",meta:{title:"话题"},component:()=>O(()=>import("./Topic-60f034a7.js"),["assets/Topic-60f034a7.js","assets/@vicons-1a3558c6.js","assets/@vue-a481fc63.js","assets/naive-ui-d8de3dda.js","assets/seemly-76b7b838.js","assets/vueuc-39372edb.js","assets/evtd-b614532e.js","assets/@css-render-7124a1a5.js","assets/vooks-6d99783e.js","assets/vdirs-b0483831.js","assets/@juggle-41516555.js","assets/css-render-6a5c5852.js","assets/@emotion-8a8e73f6.js","assets/lodash-es-8412e618.js","assets/treemate-25c27bff.js","assets/async-validator-dee29e8b.js","assets/date-fns-975a2d8f.js","assets/main-nav.vue_vue_type_style_index_0_lang-048bd56b.js","assets/vuex-44de225f.js","assets/vue-router-e5a2430e.js","assets/main-nav-569a7b0c.css","assets/axios-4a70c6fc.js","assets/Topic-384e019e.css","assets/vfonts-7afd136d.css"])},{path:"/anouncement",name:"anouncement",meta:{title:"公告"},component:()=>O(()=>import("./Anouncement-9930cc6a.js"),["assets/Anouncement-9930cc6a.js","assets/post-skeleton-c82f8a59.js","assets/naive-ui-d8de3dda.js","assets/seemly-76b7b838.js","assets/@vue-a481fc63.js","assets/vueuc-39372edb.js","assets/evtd-b614532e.js","assets/@css-render-7124a1a5.js","assets/vooks-6d99783e.js","assets/vdirs-b0483831.js","assets/@juggle-41516555.js","assets/css-render-6a5c5852.js","assets/@emotion-8a8e73f6.js","assets/lodash-es-8412e618.js","assets/treemate-25c27bff.js","assets/async-validator-dee29e8b.js","assets/date-fns-975a2d8f.js","assets/post-skeleton-f1900002.css","assets/main-nav.vue_vue_type_style_index_0_lang-048bd56b.js","assets/vuex-44de225f.js","assets/vue-router-e5a2430e.js","assets/@vicons-1a3558c6.js","assets/main-nav-569a7b0c.css","assets/formatTime-4210fcd1.js","assets/moment-2ab8298d.js","assets/axios-4a70c6fc.js","assets/Anouncement-662e2d95.css","assets/vfonts-7afd136d.css"])},{path:"/profile",name:"profile",meta:{title:"主页"},component:()=>O(()=>import("./Profile-389382b2.js"),["assets/Profile-389382b2.js","assets/post-item.vue_vue_type_style_index_0_lang-cf11e2c5.js","assets/content-d5264b98.js","assets/@vue-a481fc63.js","assets/@vicons-1a3558c6.js","assets/naive-ui-d8de3dda.js","assets/seemly-76b7b838.js","assets/vueuc-39372edb.js","assets/evtd-b614532e.js","assets/@css-render-7124a1a5.js","assets/vooks-6d99783e.js","assets/vdirs-b0483831.js","assets/@juggle-41516555.js","assets/css-render-6a5c5852.js","assets/@emotion-8a8e73f6.js","assets/lodash-es-8412e618.js","assets/treemate-25c27bff.js","assets/async-validator-dee29e8b.js","assets/date-fns-975a2d8f.js","assets/paopao-video-player-2fe58954.js","assets/content-2fda112b.css","assets/vuex-44de225f.js","assets/vue-router-e5a2430e.js","assets/formatTime-4210fcd1.js","assets/moment-2ab8298d.js","assets/copy-to-clipboard-4ef7d3eb.js","assets/@babel-725317a4.js","assets/toggle-selection-93f4ad84.js","assets/post-item-d81938d1.css","assets/post-skeleton-c82f8a59.js","assets/post-skeleton-f1900002.css","assets/main-nav.vue_vue_type_style_index_0_lang-048bd56b.js","assets/main-nav-569a7b0c.css","assets/v3-infinite-loading-2c58ec2f.js","assets/v3-infinite-loading-1ff9ffe7.css","assets/axios-4a70c6fc.js","assets/Profile-ab12b2fa.css","assets/vfonts-7afd136d.css"])},{path:"/u",name:"user",meta:{title:"用户详情"},component:()=>O(()=>import("./User-faa58349.js"),["assets/User-faa58349.js","assets/post-item.vue_vue_type_style_index_0_lang-cf11e2c5.js","assets/content-d5264b98.js","assets/@vue-a481fc63.js","assets/@vicons-1a3558c6.js","assets/naive-ui-d8de3dda.js","assets/seemly-76b7b838.js","assets/vueuc-39372edb.js","assets/evtd-b614532e.js","assets/@css-render-7124a1a5.js","assets/vooks-6d99783e.js","assets/vdirs-b0483831.js","assets/@juggle-41516555.js","assets/css-render-6a5c5852.js","assets/@emotion-8a8e73f6.js","assets/lodash-es-8412e618.js","assets/treemate-25c27bff.js","assets/async-validator-dee29e8b.js","assets/date-fns-975a2d8f.js","assets/paopao-video-player-2fe58954.js","assets/content-2fda112b.css","assets/vuex-44de225f.js","assets/vue-router-e5a2430e.js","assets/formatTime-4210fcd1.js","assets/moment-2ab8298d.js","assets/copy-to-clipboard-4ef7d3eb.js","assets/@babel-725317a4.js","assets/toggle-selection-93f4ad84.js","assets/post-item-d81938d1.css","assets/post-skeleton-c82f8a59.js","assets/post-skeleton-f1900002.css","assets/main-nav.vue_vue_type_style_index_0_lang-048bd56b.js","assets/main-nav-569a7b0c.css","assets/v3-infinite-loading-2c58ec2f.js","assets/v3-infinite-loading-1ff9ffe7.css","assets/axios-4a70c6fc.js","assets/User-917e7989.css","assets/vfonts-7afd136d.css"])},{path:"/messages",name:"messages",meta:{title:"消息"},component:()=>O(()=>import("./Messages-4104caea.js"),["assets/Messages-4104caea.js","assets/@vue-a481fc63.js","assets/vuex-44de225f.js","assets/vue-router-e5a2430e.js","assets/formatTime-4210fcd1.js","assets/moment-2ab8298d.js","assets/@vicons-1a3558c6.js","assets/naive-ui-d8de3dda.js","assets/seemly-76b7b838.js","assets/vueuc-39372edb.js","assets/evtd-b614532e.js","assets/@css-render-7124a1a5.js","assets/vooks-6d99783e.js","assets/vdirs-b0483831.js","assets/@juggle-41516555.js","assets/css-render-6a5c5852.js","assets/@emotion-8a8e73f6.js","assets/lodash-es-8412e618.js","assets/treemate-25c27bff.js","assets/async-validator-dee29e8b.js","assets/date-fns-975a2d8f.js","assets/main-nav.vue_vue_type_style_index_0_lang-048bd56b.js","assets/main-nav-569a7b0c.css","assets/axios-4a70c6fc.js","assets/Messages-1e4acdf3.css","assets/vfonts-7afd136d.css"])},{path:"/collection",name:"collection",meta:{title:"收藏"},component:()=>O(()=>import("./Collection-a3f9d0d9.js"),["assets/Collection-a3f9d0d9.js","assets/post-item.vue_vue_type_style_index_0_lang-cf11e2c5.js","assets/content-d5264b98.js","assets/@vue-a481fc63.js","assets/@vicons-1a3558c6.js","assets/naive-ui-d8de3dda.js","assets/seemly-76b7b838.js","assets/vueuc-39372edb.js","assets/evtd-b614532e.js","assets/@css-render-7124a1a5.js","assets/vooks-6d99783e.js","assets/vdirs-b0483831.js","assets/@juggle-41516555.js","assets/css-render-6a5c5852.js","assets/@emotion-8a8e73f6.js","assets/lodash-es-8412e618.js","assets/treemate-25c27bff.js","assets/async-validator-dee29e8b.js","assets/date-fns-975a2d8f.js","assets/paopao-video-player-2fe58954.js","assets/content-2fda112b.css","assets/vuex-44de225f.js","assets/vue-router-e5a2430e.js","assets/formatTime-4210fcd1.js","assets/moment-2ab8298d.js","assets/copy-to-clipboard-4ef7d3eb.js","assets/@babel-725317a4.js","assets/toggle-selection-93f4ad84.js","assets/post-item-d81938d1.css","assets/post-skeleton-c82f8a59.js","assets/post-skeleton-f1900002.css","assets/main-nav.vue_vue_type_style_index_0_lang-048bd56b.js","assets/main-nav-569a7b0c.css","assets/axios-4a70c6fc.js","assets/Collection-b97b3cf7.css","assets/vfonts-7afd136d.css"])},{path:"/contacts",name:"contacts",meta:{title:"好友"},component:()=>O(()=>import("./Contacts-839dbc08.js"),["assets/Contacts-839dbc08.js","assets/vue-router-e5a2430e.js","assets/@vue-a481fc63.js","assets/formatTime-4210fcd1.js","assets/moment-2ab8298d.js","assets/naive-ui-d8de3dda.js","assets/seemly-76b7b838.js","assets/vueuc-39372edb.js","assets/evtd-b614532e.js","assets/@css-render-7124a1a5.js","assets/vooks-6d99783e.js","assets/vdirs-b0483831.js","assets/@juggle-41516555.js","assets/css-render-6a5c5852.js","assets/@emotion-8a8e73f6.js","assets/lodash-es-8412e618.js","assets/treemate-25c27bff.js","assets/async-validator-dee29e8b.js","assets/date-fns-975a2d8f.js","assets/post-skeleton-c82f8a59.js","assets/post-skeleton-f1900002.css","assets/main-nav.vue_vue_type_style_index_0_lang-048bd56b.js","assets/vuex-44de225f.js","assets/@vicons-1a3558c6.js","assets/main-nav-569a7b0c.css","assets/axios-4a70c6fc.js","assets/Contacts-baa2e9bb.css","assets/vfonts-7afd136d.css"])},{path:"/following",name:"following",meta:{title:"关注"},component:()=>O(()=>import("./Following-be24e2b8.js"),["assets/Following-be24e2b8.js","assets/@vue-a481fc63.js","assets/vue-router-e5a2430e.js","assets/formatTime-4210fcd1.js","assets/moment-2ab8298d.js","assets/@vicons-1a3558c6.js","assets/naive-ui-d8de3dda.js","assets/seemly-76b7b838.js","assets/vueuc-39372edb.js","assets/evtd-b614532e.js","assets/@css-render-7124a1a5.js","assets/vooks-6d99783e.js","assets/vdirs-b0483831.js","assets/@juggle-41516555.js","assets/css-render-6a5c5852.js","assets/@emotion-8a8e73f6.js","assets/lodash-es-8412e618.js","assets/treemate-25c27bff.js","assets/async-validator-dee29e8b.js","assets/date-fns-975a2d8f.js","assets/post-skeleton-c82f8a59.js","assets/post-skeleton-f1900002.css","assets/main-nav.vue_vue_type_style_index_0_lang-048bd56b.js","assets/vuex-44de225f.js","assets/main-nav-569a7b0c.css","assets/axios-4a70c6fc.js","assets/Following-31b77f3b.css","assets/vfonts-7afd136d.css"])},{path:"/wallet",name:"wallet",meta:{title:"钱包"},component:()=>O(()=>import("./Wallet-41e3f3be.js"),["assets/Wallet-41e3f3be.js","assets/post-skeleton-c82f8a59.js","assets/naive-ui-d8de3dda.js","assets/seemly-76b7b838.js","assets/@vue-a481fc63.js","assets/vueuc-39372edb.js","assets/evtd-b614532e.js","assets/@css-render-7124a1a5.js","assets/vooks-6d99783e.js","assets/vdirs-b0483831.js","assets/@juggle-41516555.js","assets/css-render-6a5c5852.js","assets/@emotion-8a8e73f6.js","assets/lodash-es-8412e618.js","assets/treemate-25c27bff.js","assets/async-validator-dee29e8b.js","assets/date-fns-975a2d8f.js","assets/post-skeleton-f1900002.css","assets/main-nav.vue_vue_type_style_index_0_lang-048bd56b.js","assets/vuex-44de225f.js","assets/vue-router-e5a2430e.js","assets/@vicons-1a3558c6.js","assets/main-nav-569a7b0c.css","assets/qrcode-9719fc56.js","assets/encode-utf8-f813de00.js","assets/dijkstrajs-f906a09e.js","assets/formatTime-4210fcd1.js","assets/moment-2ab8298d.js","assets/axios-4a70c6fc.js","assets/Wallet-77044929.css","assets/vfonts-7afd136d.css"])},{path:"/setting",name:"setting",meta:{title:"设置"},component:()=>O(()=>import("./Setting-07adc927.js"),["assets/Setting-07adc927.js","assets/main-nav.vue_vue_type_style_index_0_lang-048bd56b.js","assets/vuex-44de225f.js","assets/@vue-a481fc63.js","assets/vue-router-e5a2430e.js","assets/vooks-6d99783e.js","assets/evtd-b614532e.js","assets/@vicons-1a3558c6.js","assets/naive-ui-d8de3dda.js","assets/seemly-76b7b838.js","assets/vueuc-39372edb.js","assets/@css-render-7124a1a5.js","assets/vdirs-b0483831.js","assets/@juggle-41516555.js","assets/css-render-6a5c5852.js","assets/@emotion-8a8e73f6.js","assets/lodash-es-8412e618.js","assets/treemate-25c27bff.js","assets/async-validator-dee29e8b.js","assets/date-fns-975a2d8f.js","assets/main-nav-569a7b0c.css","assets/axios-4a70c6fc.js","assets/Setting-bfd24152.css","assets/vfonts-7afd136d.css"])},{path:"/404",name:"404",meta:{title:"404"},component:()=>O(()=>import("./404-26f331db.js"),["assets/404-26f331db.js","assets/main-nav.vue_vue_type_style_index_0_lang-048bd56b.js","assets/vuex-44de225f.js","assets/@vue-a481fc63.js","assets/vue-router-e5a2430e.js","assets/vooks-6d99783e.js","assets/evtd-b614532e.js","assets/@vicons-1a3558c6.js","assets/naive-ui-d8de3dda.js","assets/seemly-76b7b838.js","assets/vueuc-39372edb.js","assets/@css-render-7124a1a5.js","assets/vdirs-b0483831.js","assets/@juggle-41516555.js","assets/css-render-6a5c5852.js","assets/@emotion-8a8e73f6.js","assets/lodash-es-8412e618.js","assets/treemate-25c27bff.js","assets/async-validator-dee29e8b.js","assets/date-fns-975a2d8f.js","assets/main-nav-569a7b0c.css","assets/axios-4a70c6fc.js","assets/404-020b2afd.css","assets/vfonts-7afd136d.css"])},{path:"/:pathMatch(.*)",redirect:"/404"}],me=ve({history:we(),routes:Ze});me.beforeEach((e,t,a)=>{document.title=`${e.meta.title} | 泡泡 - 一个清新文艺的微社区`,a()});const Je=be({state:{refresh:Date.now(),refreshTopicFollow:Date.now(),theme:localStorage.getItem("PAOPAO_THEME"),collapsedLeft:document.body.clientWidth<=821,collapsedRight:document.body.clientWidth<=821,drawerModelShow:document.body.clientWidth<=821,desktopModelShow:document.body.clientWidth>821,authModalShow:!1,authModelTab:"signin",userLogined:!1,userInfo:{id:0,username:"",nickname:"",created_on:0,follows:0,followings:0}},mutations:{refresh(e,t){e.refresh=t||Date.now()},refreshTopicFollow(e){e.refreshTopicFollow=Date.now()},triggerTheme(e,t){e.theme=t},triggerAuth(e,t){e.authModalShow=t},triggerAuthKey(e,t){e.authModelTab=t},triggerCollapsedLeft(e,t){e.collapsedLeft=t,e.drawerModelShow=t,e.desktopModelShow=!t},triggerCollapsedRight(e,t){e.collapsedRight=t},updateUserinfo(e,t){e.userInfo=t,e.userInfo.id>0&&(e.userLogined=!0)},userLogout(e){localStorage.removeItem("PAOPAO_TOKEN"),e.userInfo={id:0,nickname:"",username:"",created_on:0,follows:0,followings:0},e.userLogined=!1}},actions:{},modules:{}}),Y=ke.create({baseURL:"",timeout:3e4});Y.interceptors.request.use(e=>(localStorage.getItem("PAOPAO_TOKEN")&&(e.headers.Authorization="Bearer "+localStorage.getItem("PAOPAO_TOKEN")),e),e=>Promise.reject(e));Y.interceptors.response.use(e=>{const{data:t={},code:a=0}=(e==null?void 0:e.data)||{};if(+a==0)return t||{};Promise.reject((e==null?void 0:e.data)||{})},(e={})=>{var a;const{response:t={}}=e||{};return+(t==null?void 0:t.status)==401?(localStorage.removeItem("PAOPAO_TOKEN"),(t==null?void 0:t.data.code)!==10005?window.$message.warning((t==null?void 0:t.data.msg)||"鉴权失败"):window.$store.commit("triggerAuth",!0)):window.$message.error(((a=t==null?void 0:t.data)==null?void 0:a.msg)||"请求失败"),Promise.reject((t==null?void 0:t.data)||{})});function o(e){return Y(e)}const re=e=>o({method:"post",url:"/v1/auth/login",data:e}),Xe=e=>o({method:"post",url:"/v1/auth/register",data:e}),H=(e="")=>o({method:"get",url:"/v1/user/info",headers:{Authorization:`Bearer ${e}`}}),et={class:"auth-wrap"},tt={key:0},ot=W({__name:"auth",setup(e){const t=$("true".toLowerCase()==="true"),a=B(),i=$(!1),c=$(),n=Z({username:"",password:""}),d=$(),p=Z({username:"",password:"",repassword:""}),M={username:{required:!0,message:"请输入账户名"},password:{required:!0,message:"请输入密码"},repassword:[{required:!0,message:"请输入密码"},{validator:(h,u)=>!!p.password&&p.password.startsWith(u)&&p.password.length>=u.length,message:"两次密码输入不一致",trigger:"input"}]},f=h=>{var u;h.preventDefault(),h.stopPropagation(),(u=c.value)==null||u.validate(A=>{A||(i.value=!0,re({username:n.username,password:n.password}).then(_=>{const L=(_==null?void 0:_.token)||"";return localStorage.setItem("PAOPAO_TOKEN",L),H(L)}).then(_=>{window.$message.success("登录成功"),i.value=!1,a.commit("updateUserinfo",_),a.commit("triggerAuth",!1),a.commit("refresh"),n.username="",n.password=""}).catch(_=>{i.value=!1}))})},b=h=>{var u;h.preventDefault(),h.stopPropagation(),(u=d.value)==null||u.validate(A=>{A||(i.value=!0,Xe({username:p.username,password:p.password}).then(_=>re({username:p.username,password:p.password})).then(_=>{const L=(_==null?void 0:_.token)||"";return localStorage.setItem("PAOPAO_TOKEN",L),H(L)}).then(_=>{window.$message.success("注册成功"),i.value=!1,a.commit("updateUserinfo",_),a.commit("triggerAuth",!1),p.username="",p.password="",p.repassword=""}).catch(_=>{i.value=!1}))})};return G(()=>{const h=localStorage.getItem("PAOPAO_TOKEN")||"";h?H(h).then(u=>{a.commit("updateUserinfo",u),a.commit("triggerAuth",!1)}).catch(u=>{a.commit("userLogout")}):a.commit("userLogout")}),(h,u)=>{const A=Pe,_=Le,L=ce,T=ie,P=Oe,v=Ae,l=de,E=Te,F=Ee,N=pe,x=Re;return w(),D(x,{show:g(a).state.authModalShow,"onUpdate:show":u[7]||(u[7]=m=>g(a).state.authModalShow=m),class:"auth-card",preset:"card",size:"small","mask-closable":!1,bordered:!1,style:{width:"360px"}},{default:r(()=>[y("div",et,[s(N,{bordered:!1},{default:r(()=>[t.value?U("",!0):(w(),R("div",tt,[s(L,{justify:"center"},{default:r(()=>[s(_,null,{default:r(()=>[s(A,{type:"success"},{default:r(()=>[S("账号登录")]),_:1})]),_:1})]),_:1}),s(v,{ref_key:"loginRef",ref:c,model:n,rules:{username:{required:!0,message:"请输入账户名"},password:{required:!0,message:"请输入密码"}}},{default:r(()=>[s(P,{label:"账户",path:"username"},{default:r(()=>[s(T,{value:n.username,"onUpdate:value":u[0]||(u[0]=m=>n.username=m),placeholder:"请输入用户名",onKeyup:q(K(f,["prevent"]),["enter"])},null,8,["value","onKeyup"])]),_:1}),s(P,{label:"密码",path:"password"},{default:r(()=>[s(T,{type:"password","show-password-on":"mousedown",value:n.password,"onUpdate:value":u[1]||(u[1]=m=>n.password=m),placeholder:"请输入账户密码",onKeyup:q(K(f,["prevent"]),["enter"])},null,8,["value","onKeyup"])]),_:1})]),_:1},8,["model"]),s(l,{type:"primary",block:"",secondary:"",strong:"",loading:i.value,onClick:f},{default:r(()=>[S(" 登录 ")]),_:1},8,["loading"])])),t.value?(w(),D(F,{key:1,"default-value":g(a).state.authModelTab,size:"large","justify-content":"space-evenly"},{default:r(()=>[s(E,{name:"signin",tab:"登录"},{default:r(()=>[s(v,{ref_key:"loginRef",ref:c,model:n,rules:{username:{required:!0,message:"请输入账户名"},password:{required:!0,message:"请输入密码"}}},{default:r(()=>[s(P,{label:"账户",path:"username"},{default:r(()=>[s(T,{value:n.username,"onUpdate:value":u[2]||(u[2]=m=>n.username=m),placeholder:"请输入用户名",onKeyup:q(K(f,["prevent"]),["enter"])},null,8,["value","onKeyup"])]),_:1}),s(P,{label:"密码",path:"password"},{default:r(()=>[s(T,{type:"password","show-password-on":"mousedown",value:n.password,"onUpdate:value":u[3]||(u[3]=m=>n.password=m),placeholder:"请输入账户密码",onKeyup:q(K(f,["prevent"]),["enter"])},null,8,["value","onKeyup"])]),_:1})]),_:1},8,["model"]),s(l,{type:"primary",block:"",secondary:"",strong:"",loading:i.value,onClick:f},{default:r(()=>[S(" 登录 ")]),_:1},8,["loading"])]),_:1}),s(E,{name:"signup",tab:"注册"},{default:r(()=>[s(v,{ref_key:"registerRef",ref:d,model:p,rules:M},{default:r(()=>[s(P,{label:"用户名",path:"username"},{default:r(()=>[s(T,{value:p.username,"onUpdate:value":u[4]||(u[4]=m=>p.username=m),placeholder:"用户名注册后无法修改"},null,8,["value"])]),_:1}),s(P,{label:"密码",path:"password"},{default:r(()=>[s(T,{type:"password","show-password-on":"mousedown",placeholder:"密码不少于6位",value:p.password,"onUpdate:value":u[5]||(u[5]=m=>p.password=m),onKeyup:q(K(b,["prevent"]),["enter"])},null,8,["value","onKeyup"])]),_:1}),s(P,{label:"重复密码",path:"repassword"},{default:r(()=>[s(T,{type:"password","show-password-on":"mousedown",placeholder:"请再次输入密码",value:p.repassword,"onUpdate:value":u[6]||(u[6]=m=>p.repassword=m),onKeyup:q(K(b,["prevent"]),["enter"])},null,8,["value","onKeyup"])]),_:1})]),_:1},8,["model"]),s(l,{type:"primary",block:"",secondary:"",strong:"",loading:i.value,onClick:b},{default:r(()=>[S(" 注册 ")]),_:1},8,["loading"])]),_:1})]),_:1},8,["default-value"])):U("",!0)]),_:1})])]),_:1},8,["show"])}}});const _e=(e,t)=>{const a=e.__vccOpts||e;for(const[i,c]of t)a[i]=c;return a},st=_e(ot,[["__scopeId","data-v-053dfa44"]]),Zt=e=>o({method:"get",url:"/v1/posts",params:e}),nt=e=>o({method:"get",url:"/v1/tags",params:e}),Jt=e=>o({method:"get",url:"/v1/post",params:e}),Xt=e=>o({method:"get",url:"/v1/post/star",params:e}),eo=e=>o({method:"post",url:"/v1/post/star",data:e}),to=e=>o({method:"get",url:"/v1/post/collection",params:e}),oo=e=>o({method:"post",url:"/v1/post/collection",data:e}),so=e=>o({method:"get",url:"/v1/post/comments",params:e}),no=e=>o({method:"get",url:"/v1/user/contacts",params:e}),ro=e=>o({method:"post",url:"/v1/post",data:e}),ao=e=>o({method:"delete",url:"/v1/post",data:e}),lo=e=>o({method:"post",url:"/v1/post/lock",data:e}),uo=e=>o({method:"post",url:"/v1/post/stick",data:e}),co=e=>o({method:"post",url:"/v1/post/highlight",data:e}),io=e=>o({method:"post",url:"/v1/post/visibility",data:e}),po=e=>o({method:"post",url:"/v1/tweet/comment/thumbsup",data:e}),mo=e=>o({method:"post",url:"/v1/tweet/comment/thumbsdown",data:e}),_o=e=>o({method:"post",url:"/v1/tweet/reply/thumbsup",data:e}),ho=e=>o({method:"post",url:"/v1/tweet/reply/thumbsdown",data:e}),go=e=>o({method:"post",url:"/v1/post/comment",data:e}),fo=e=>o({method:"delete",url:"/v1/post/comment",data:e}),vo=e=>o({method:"post",url:"/v1/post/comment/reply",data:e}),wo=e=>o({method:"delete",url:"/v1/post/comment/reply",data:e}),yo=e=>o({method:"post",url:"/v1/topic/stick",data:e}),bo=e=>o({method:"post",url:"/v1/topic/follow",data:e}),ko=e=>o({method:"post",url:"/v1/topic/unfollow",data:e}),rt={key:0,class:"rightbar-wrap"},at={class:"search-wrap"},lt={class:"post-num"},ut={class:"post-num"},ct={class:"copyright"},it=["href"],dt=["href"],pt=W({__name:"rightbar",setup(e){const t=$([]),a=$([]),i=$(!1),c=$(""),n=B(),d=ue(),p="2023 paopao.info",M="Roc's Me",f="",b="泡泡(PaoPao)开源社区",h="https://www.paopao.info",u=+"6",A=+"12",_=()=>{i.value=!0,nt({type:"hot_extral",num:A,extral_num:u}).then(v=>{t.value=v.topics,a.value=v.extral_topics??[],P.value=!0,i.value=!1}).catch(v=>{i.value=!1})},L=v=>v>=1e3?(v/1e3).toFixed(1)+"k":v,T=()=>{d.push({name:"home",query:{q:c.value}})},P=Q({get:()=>n.state.userLogined&&a.value.length!==0,set:v=>{}});return j(()=>({refreshTopicFollow:n.state.refreshTopicFollow,userLogined:n.state.userLogined}),(v,l)=>{(v.refreshTopicFollow!==l.refreshTopicFollow||v.userLogined)&&_()}),G(()=>{_()}),(v,l)=>{const E=V,F=ie,N=le("router-link"),x=$e,m=pe,z=ce;return g(n).state.collapsedRight?U("",!0):(w(),R("div",rt,[y("div",at,[s(F,{round:"",clearable:"",placeholder:"搜一搜...",value:c.value,"onUpdate:value":l[0]||(l[0]=C=>c.value=C),onKeyup:q(K(T,["prevent"]),["enter"])},{prefix:r(()=>[s(E,{component:g(Fe)},null,8,["component"])]),_:1},8,["value","onKeyup"])]),P.value?(w(),D(m,{key:0,class:"hottopic-wrap",title:"关注话题",embedded:"",bordered:!1,size:"small"},{default:r(()=>[s(x,{show:i.value},{default:r(()=>[(w(!0),R(J,null,X(a.value,C=>(w(),R("div",{class:"hot-tag-item",key:C.id},[s(N,{class:"hash-link",to:{name:"home",query:{q:C.tag,t:"tag"}}},{default:r(()=>[S(" #"+I(C.tag),1)]),_:2},1032,["to"]),y("div",lt,I(L(C.quote_num)),1)]))),128))]),_:1},8,["show"])]),_:1})):U("",!0),s(m,{class:"hottopic-wrap",title:"热门话题",embedded:"",bordered:!1,size:"small"},{default:r(()=>[s(x,{show:i.value},{default:r(()=>[(w(!0),R(J,null,X(t.value,C=>(w(),R("div",{class:"hot-tag-item",key:C.id},[s(N,{class:"hash-link",to:{name:"home",query:{q:C.tag,t:"tag"}}},{default:r(()=>[S(" #"+I(C.tag),1)]),_:2},1032,["to"]),y("div",ut,I(L(C.quote_num)),1)]))),128))]),_:1},8,["show"])]),_:1}),s(m,{class:"copyright-wrap",embedded:"",bordered:!1,size:"small"},{default:r(()=>[y("div",ct,"© "+I(g(p)),1),y("div",null,[s(z,null,{default:r(()=>[y("a",{href:g(f),target:"_blank",class:"hash-link"},I(g(M)),9,it),y("a",{href:g(h),target:"_blank",class:"hash-link"},I(g(b)),9,dt)]),_:1})])]),_:1})]))}}});const mt=_e(pt,[["__scopeId","data-v-52b86ac0"]]),Po=(e={})=>o({method:"get",url:"/v1/captcha",params:e}),Lo=e=>o({method:"post",url:"/v1/captcha",data:e}),Oo=e=>o({method:"post",url:"/v1/user/whisper",data:e}),Ao=e=>o({method:"post",url:"/v1/friend/requesting",data:e}),To=e=>o({method:"post",url:"/v1/friend/add",data:e}),Eo=e=>o({method:"post",url:"/v1/user/follow",data:e}),Ro=e=>o({method:"post",url:"/v1/user/unfollow",data:e}),$o=e=>o({method:"get",url:"/v1/user/follows",params:e}),Co=e=>o({method:"get",url:"/v1/user/followings",params:e}),Io=e=>o({method:"post",url:"/v1/friend/reject",data:e}),So=e=>o({method:"post",url:"/v1/friend/delete",data:e}),Uo=e=>o({method:"post",url:"/v1/user/phone",data:e}),Mo=e=>o({method:"post",url:"/v1/user/activate",data:e}),qo=e=>o({method:"post",url:"/v1/user/password",data:e}),Ko=e=>o({method:"post",url:"/v1/user/nickname",data:e}),Do=e=>o({method:"post",url:"/v1/user/avatar",data:e}),ae=(e={})=>o({method:"get",url:"/v1/user/msgcount/unread",params:e}),No=e=>o({method:"get",url:"/v1/user/messages",params:e}),xo=e=>o({method:"post",url:"/v1/user/message/read",data:e}),Fo=e=>o({method:"get",url:"/v1/user/collections",params:e}),Vo=e=>o({method:"get",url:"/v1/user/profile",params:e}),zo=e=>o({method:"get",url:"/v1/user/posts",params:e}),Wo=e=>o({method:"get",url:"/v1/user/wallet/bills",params:e}),Bo=e=>o({method:"post",url:"/v1/user/recharge",data:e}),Ho=e=>o({method:"get",url:"/v1/user/recharge",params:e}),jo=e=>o({method:"get",url:"/v1/suggest/users",params:e}),Go=e=>o({method:"get",url:"/v1/suggest/tags",params:e}),Qo=e=>o({method:"get",url:"/v1/attachment/precheck",params:e}),Yo=e=>o({method:"get",url:"/v1/attachment",params:e}),Zo=e=>o({method:"post",url:"/v1/admin/user/status",data:e}),_t="/assets/logo-52afee68.png",ht={class:"sidebar-wrap"},gt={class:"logo-wrap"},ft={key:0,class:"user-wrap"},vt={class:"user-info"},wt={class:"nickname"},yt={class:"nickname-txt"},bt={class:"username"},kt={class:"user-mini-wrap"},Pt={key:1,class:"user-wrap"},Lt={key:0,class:"login-only-wrap"},Ot={key:1,class:"login-wrap"},At=W({__name:"sidebar",setup(e){const t=B(),a=ye(),i=ue(),c=$(!1),n=$(a.name||""),d=$(),p="true".toLowerCase()==="true",M="false".toLowerCase()==="true",f="false".toLocaleLowerCase()==="true",b=$("true".toLowerCase()==="true"),h=+"5000";j(a,()=>{n.value=a.name}),j(t.state,()=>{t.state.userInfo.id>0?d.value||(ae().then(l=>{c.value=l.count>0}).catch(l=>{console.log(l)}),d.value=setInterval(()=>{ae().then(l=>{c.value=l.count>0}).catch(l=>{console.log(l)})},h)):d.value&&clearInterval(d.value)}),G(()=>{window.onresize=()=>{t.commit("triggerCollapsedLeft",document.body.clientWidth<=821),t.commit("triggerCollapsedRight",document.body.clientWidth<=821)}});const u=Q(()=>{const l=[{label:"广场",key:"home",icon:()=>k(te),href:"/"},{label:"话题",key:"topic",icon:()=>k(oe),href:"/topic"}];return M&&l.push({label:"公告",key:"anouncement",icon:()=>k(Ve),href:"/anouncement"}),l.push({label:"主页",key:"profile",icon:()=>k(ze),href:"/profile"}),l.push({label:"消息",key:"messages",icon:()=>k(We),href:"/messages"}),l.push({label:"收藏",key:"collection",icon:()=>k(Be),href:"/collection"}),p&&l.push({label:"好友",key:"contacts",icon:()=>k(He),href:"/contacts"}),f&&l.push({label:"钱包",key:"wallet",icon:()=>k(je),href:"/wallet"}),l.push({label:"设置",key:"setting",icon:()=>k(Ge),href:"/setting"}),t.state.userInfo.id>0?l:[{label:"广场",key:"home",icon:()=>k(te),href:"/"},{label:"话题",key:"topic",icon:()=>k(oe),href:"/topic"}]}),A=l=>"href"in l?k("div",{},l.label):l.label,_=l=>l.key==="messages"?k(Ie,{dot:!0,show:c.value,processing:!0},{default:()=>k(V,{color:l.key===n.value?"var(--n-item-icon-color-active)":"var(--n-item-icon-color)"},{default:l.icon})}):k(V,null,{default:l.icon}),L=(l,E={})=>{n.value=l,i.push({name:l,query:{t:new Date().getTime()}})},T=()=>{a.path==="/"&&t.commit("refresh"),L("home")},P=l=>{t.commit("triggerAuth",!0),t.commit("triggerAuthKey",l)},v=()=>{t.commit("userLogout"),t.commit("refresh"),T()};return window.$store=t,window.$message=Ce(),(l,E)=>{const F=Se,N=Ue,x=Me,m=de;return w(),R("div",ht,[y("div",gt,[s(F,{class:"logo-img",width:"36",src:g(_t),"preview-disabled":!0,onClick:T},null,8,["src"])]),s(N,{accordion:!0,"icon-size":24,options:u.value,"render-label":A,"render-icon":_,value:n.value,"onUpdate:value":L},null,8,["options","value"]),g(t).state.userInfo.id>0?(w(),R("div",ft,[s(x,{class:"user-avatar",round:"",size:34,src:g(t).state.userInfo.avatar},null,8,["src"]),y("div",vt,[y("div",wt,[y("span",yt,I(g(t).state.userInfo.nickname),1),s(m,{class:"logout",quaternary:"",circle:"",size:"tiny",onClick:v},{icon:r(()=>[s(g(V),null,{default:r(()=>[s(g(se))]),_:1})]),_:1})]),y("div",bt,"@"+I(g(t).state.userInfo.username),1)]),y("div",kt,[s(m,{class:"logout",quaternary:"",circle:"",onClick:v},{icon:r(()=>[s(g(V),{size:24},{default:r(()=>[s(g(se))]),_:1})]),_:1})])])):(w(),R("div",Pt,[b.value?U("",!0):(w(),R("div",Lt,[s(m,{strong:"",secondary:"",round:"",type:"primary",onClick:E[0]||(E[0]=z=>P("signin"))},{default:r(()=>[S(" 登录 ")]),_:1})])),b.value?(w(),R("div",Ot,[s(m,{strong:"",secondary:"",round:"",type:"primary",onClick:E[1]||(E[1]=z=>P("signin"))},{default:r(()=>[S(" 登录 ")]),_:1}),s(m,{strong:"",secondary:"",round:"",type:"info",onClick:E[2]||(E[2]=z=>P("signup"))},{default:r(()=>[S(" 注册 ")]),_:1})])):U("",!0)]))])}}});const Tt={"has-sider":"",class:"main-wrap",position:"static"},Et={key:0},Rt={class:"content-wrap"},$t=W({__name:"App",setup(e){const t=B(),a=Q(()=>t.state.theme==="dark"?Ke:null);return(i,c)=>{const n=At,d=le("router-view"),p=mt,M=st,f=De,b=Ne,h=xe,u=qe;return w(),D(u,{theme:a.value},{default:r(()=>[s(b,null,{default:r(()=>[s(f,null,{default:r(()=>{var A;return[y("div",{class:ge(["app-container",{dark:((A=a.value)==null?void 0:A.name)==="dark",mobile:!g(t).state.desktopModelShow}])},[y("div",Tt,[g(t).state.desktopModelShow?(w(),R("div",Et,[s(n)])):U("",!0),y("div",Rt,[s(d,{class:"app-wrap"},{default:r(({Component:_})=>[(w(),D(he,null,[i.$route.meta.keepAlive?(w(),D(ee(_),{key:0})):U("",!0)],1024)),i.$route.meta.keepAlive?U("",!0):(w(),D(ee(_),{key:0}))]),_:1})]),s(p)]),s(M)],2)]}),_:1})]),_:1}),s(h)]),_:1},8,["theme"])}}});fe($t).use(me).use(Je).mount("#app");export{Uo as $,ko as A,bo as B,nt as C,Oo as D,Ao as E,Vo as F,So as G,Ro as H,Eo as I,Zo as J,To as K,Io as L,xo as M,No as N,Fo as O,Qo as P,Yo as Q,$o as R,Co as S,H as T,Wo as U,Bo as V,Ho as W,Po as X,Do as Y,qo as Z,_e as _,Go as a,Mo as a0,Ko as a1,Lo as a2,At as a3,no as b,ro as c,Zt as d,zo as e,ho as f,jo as g,wo as h,po as i,mo as j,vo as k,fo as l,go as m,Xt as n,to as o,ao as p,lo as q,co as r,uo as s,_o as t,eo as u,io as v,oo as w,Jt as x,so as y,yo as z}; diff --git a/web/dist/assets/main-nav.vue_vue_type_style_index_0_lang-048bd56b.js b/web/dist/assets/main-nav.vue_vue_type_style_index_0_lang-048bd56b.js new file mode 100644 index 00000000..989c6fc7 --- /dev/null +++ b/web/dist/assets/main-nav.vue_vue_type_style_index_0_lang-048bd56b.js @@ -0,0 +1 @@ +import{a3 as B}from"./index-757c547c.js";import{u as E}from"./vuex-44de225f.js";import{u as S}from"./vue-router-e5a2430e.js";import{j as z}from"./vooks-6d99783e.js";import{Z as C,_ as N,$ as P,a0 as D}from"./@vicons-1a3558c6.js";import{a3 as R,a4 as x,j as H,e as I,a5 as V,h as j}from"./naive-ui-d8de3dda.js";import{d as q,H as h,b as $,e as a,f,bf as o,k as e,w as t,Y as c,j as F,q as _,A as L,x as U,F as Y}from"./@vue-a481fc63.js";const Z={key:0},G={class:"navbar"},oe=q({__name:"main-nav",props:{title:{default:""},back:{type:Boolean,default:!1},theme:{type:Boolean,default:!0}},setup(g){const i=g,n=E(),m=S(),l=h(!1),k=h("left"),u=s=>{s?(localStorage.setItem("PAOPAO_THEME","dark"),n.commit("triggerTheme","dark")):(localStorage.setItem("PAOPAO_THEME","light"),n.commit("triggerTheme","light"))},w=()=>{window.history.length<=1?m.push({path:"/"}):m.go(-1)},v=()=>{l.value=!0};return $(()=>{localStorage.getItem("PAOPAO_THEME")||u(z()==="dark")}),(s,d)=>{const b=B,y=R,O=x,r=H,p=I,M=V,T=j;return a(),f(Y,null,[o(n).state.drawerModelShow?(a(),f("div",Z,[e(O,{show:l.value,"onUpdate:show":d[0]||(d[0]=A=>l.value=A),width:212,placement:k.value,resizable:""},{default:t(()=>[e(y,null,{default:t(()=>[e(b)]),_:1})]),_:1},8,["show","placement"])])):c("",!0),e(T,{size:"small",bordered:!0,class:"nav-title-card"},{header:t(()=>[F("div",G,[o(n).state.drawerModelShow&&!s.back?(a(),_(p,{key:0,class:"drawer-btn",onClick:v,quaternary:"",circle:"",size:"medium"},{icon:t(()=>[e(r,null,{default:t(()=>[e(o(C))]),_:1})]),_:1})):c("",!0),s.back?(a(),_(p,{key:1,class:"back-btn",onClick:w,quaternary:"",circle:"",size:"small"},{icon:t(()=>[e(r,null,{default:t(()=>[e(o(N))]),_:1})]),_:1})):c("",!0),L(" "+U(i.title)+" ",1),i.theme?(a(),_(M,{key:2,value:o(n).state.theme==="dark","onUpdate:value":u,size:"small",class:"theme-switch-wrap"},{"checked-icon":t(()=>[e(r,{component:o(P)},null,8,["component"])]),"unchecked-icon":t(()=>[e(r,{component:o(D)},null,8,["component"])]),_:1},8,["value"])):c("",!0)])]),_:1})],64)}}});export{oe as _}; diff --git a/web/dist/assets/main-nav.vue_vue_type_style_index_0_lang-3b4e457a.js b/web/dist/assets/main-nav.vue_vue_type_style_index_0_lang-3b4e457a.js deleted file mode 100644 index 6ca73ea9..00000000 --- a/web/dist/assets/main-nav.vue_vue_type_style_index_0_lang-3b4e457a.js +++ /dev/null @@ -1 +0,0 @@ -import{a3 as B}from"./index-7ab58e72.js";import{u as E}from"./vuex-44de225f.js";import{u as S}from"./vue-router-e5a2430e.js";import{j as z}from"./vooks-6d99783e.js";import{Y as C,Z as N,_ as P,$ as D}from"./@vicons-33f992ab.js";import{a3 as R,a4 as x,j as H,e as I,a5 as V,h as j}from"./naive-ui-d8de3dda.js";import{d as q,H as h,b as $,e as a,f,bf as o,k as e,w as t,Y as c,j as F,q as _,A as L,x as U,F as Y}from"./@vue-a481fc63.js";const Z={key:0},G={class:"navbar"},oe=q({__name:"main-nav",props:{title:{default:""},back:{type:Boolean,default:!1},theme:{type:Boolean,default:!0}},setup(g){const i=g,n=E(),m=S(),l=h(!1),k=h("left"),u=s=>{s?(localStorage.setItem("PAOPAO_THEME","dark"),n.commit("triggerTheme","dark")):(localStorage.setItem("PAOPAO_THEME","light"),n.commit("triggerTheme","light"))},w=()=>{window.history.length<=1?m.push({path:"/"}):m.go(-1)},v=()=>{l.value=!0};return $(()=>{localStorage.getItem("PAOPAO_THEME")||u(z()==="dark")}),(s,d)=>{const b=B,y=R,O=x,r=H,p=I,M=V,T=j;return a(),f(Y,null,[o(n).state.drawerModelShow?(a(),f("div",Z,[e(O,{show:l.value,"onUpdate:show":d[0]||(d[0]=A=>l.value=A),width:212,placement:k.value,resizable:""},{default:t(()=>[e(y,null,{default:t(()=>[e(b)]),_:1})]),_:1},8,["show","placement"])])):c("",!0),e(T,{size:"small",bordered:!0,class:"nav-title-card"},{header:t(()=>[F("div",G,[o(n).state.drawerModelShow&&!s.back?(a(),_(p,{key:0,class:"drawer-btn",onClick:v,quaternary:"",circle:"",size:"medium"},{icon:t(()=>[e(r,null,{default:t(()=>[e(o(C))]),_:1})]),_:1})):c("",!0),s.back?(a(),_(p,{key:1,class:"back-btn",onClick:w,quaternary:"",circle:"",size:"small"},{icon:t(()=>[e(r,null,{default:t(()=>[e(o(N))]),_:1})]),_:1})):c("",!0),L(" "+U(i.title)+" ",1),i.theme?(a(),_(M,{key:2,value:o(n).state.theme==="dark","onUpdate:value":u,size:"small",class:"theme-switch-wrap"},{"checked-icon":t(()=>[e(r,{component:o(P)},null,8,["component"])]),"unchecked-icon":t(()=>[e(r,{component:o(D)},null,8,["component"])]),_:1},8,["value"])):c("",!0)])]),_:1})],64)}}});export{oe as _}; diff --git a/web/dist/assets/post-item.vue_vue_type_style_index_0_lang-3755d97f.js b/web/dist/assets/post-item.vue_vue_type_style_index_0_lang-cf11e2c5.js similarity index 97% rename from web/dist/assets/post-item.vue_vue_type_style_index_0_lang-3755d97f.js rename to web/dist/assets/post-item.vue_vue_type_style_index_0_lang-cf11e2c5.js index 6cbbc030..5eafd4b4 100644 --- a/web/dist/assets/post-item.vue_vue_type_style_index_0_lang-3755d97f.js +++ b/web/dist/assets/post-item.vue_vue_type_style_index_0_lang-cf11e2c5.js @@ -1 +1 @@ -import{p as F,a as V,_ as E,b as R,c as Y}from"./content-77341dc8.js";import{d as G,c as C,r as J,e as a,f,k as n,al as K,w as s,j as i,F as Q,u as U,y as m,bf as l,A as r,x as p,q as u,Y as c,h as x}from"./@vue-a481fc63.js";import{u as W}from"./vuex-44de225f.js";import{u as X}from"./vue-router-e5a2430e.js";import{c as Z}from"./formatTime-4210fcd1.js";import{u as ee,w as te}from"./index-7ab58e72.js";import{c as oe}from"./copy-to-clipboard-4ef7d3eb.js";import{i as se,j as ne,l as ae,m as le,o as ie}from"./@vicons-33f992ab.js";import{j as v,o as ue,M as ce,e as re,O as pe,a as _e,L as me}from"./naive-ui-d8de3dda.js";const ve={class:"post-item"},de={class:"nickname-wrap"},he={class:"username-wrap"},ge={class:"timestamp-mobile"},ke={class:"item-header-extra"},ye=["innerHTML"],fe=["onClick"],we=["onClick"],Ie=G({__name:"mobile-post-item",props:{post:{}},setup($){const h=$,g=X(),b=W(),z=t=>()=>x(v,null,{default:()=>x(t)}),T=C(()=>[{label:"复制链接",key:"copyTweetLink",icon:z(ie)}]),q=async t=>{switch(t){case"copyTweetLink":oe(`${window.location.origin}/#/post?id=${e.value.id}&share=copy_link&t=${new Date().getTime()}`),window.$message.success("链接已复制到剪贴板");break}},e=C({get:()=>{let t=Object.assign({texts:[],imgs:[],videos:[],links:[],attachments:[],charge_attachments:[]},h.post);return t.contents.map(o=>{(+o.type==1||+o.type==2)&&t.texts.push(o),+o.type==3&&t.imgs.push(o),+o.type==4&&t.videos.push(o),+o.type==6&&t.links.push(o),+o.type==7&&t.attachments.push(o),+o.type==8&&t.charge_attachments.push(o)}),t},set:t=>{h.post.upvote_count=t.upvote_count,h.post.collection_count=t.collection_count}}),L=()=>{ee({id:e.value.id}).then(t=>{t.status?e.value={...e.value,upvote_count:e.value.upvote_count+1}:e.value={...e.value,upvote_count:e.value.upvote_count>0?e.value.upvote_count-1:0}}).catch(t=>{console.log(t)})},S=()=>{te({id:e.value.id}).then(t=>{t.status?e.value={...e.value,collection_count:e.value.collection_count+1}:e.value={...e.value,collection_count:e.value.collection_count>0?e.value.collection_count-1:0}}).catch(t=>{console.log(t)})},k=t=>{g.push({name:"post",query:{id:t}})},O=(t,o)=>{if(t.target.dataset.detail){const _=t.target.dataset.detail.split(":");if(_.length===2){b.commit("refresh"),_[0]==="tag"?g.push({name:"home",query:{q:_[1],t:"tag"}}):g.push({name:"user",query:{s:_[1]}});return}}k(o)};return(t,o)=>{const _=ue,P=J("router-link"),y=ce,j=re,M=pe,w=V,D=E,H=R,B=Y,I=_e,N=me;return a(),f("div",ve,[n(N,{"content-indented":""},K({avatar:s(()=>[n(_,{round:"",size:30,src:e.value.user.avatar},null,8,["src"])]),header:s(()=>[i("span",de,[n(P,{onClick:o[0]||(o[0]=m(()=>{},["stop"])),class:"username-link",to:{name:"user",query:{s:e.value.user.username}}},{default:s(()=>[r(p(e.value.user.nickname),1)]),_:1},8,["to"])]),i("span",he," @"+p(e.value.user.username),1),e.value.is_top?(a(),u(y,{key:0,class:"top-tag",type:"warning",size:"small",round:""},{default:s(()=>[r(" 置顶 ")]),_:1})):c("",!0),e.value.visibility==1?(a(),u(y,{key:1,class:"top-tag",type:"error",size:"small",round:""},{default:s(()=>[r(" 私密 ")]),_:1})):c("",!0),e.value.visibility==2?(a(),u(y,{key:2,class:"top-tag",type:"info",size:"small",round:""},{default:s(()=>[r(" 好友可见 ")]),_:1})):c("",!0),i("div",null,[i("span",ge,p(l(Z)(e.value.created_on))+" "+p(e.value.ip_loc),1)])]),"header-extra":s(()=>[i("div",ke,[n(M,{placement:"bottom-end",trigger:"click",size:"small",options:T.value,onSelect:q},{default:s(()=>[n(j,{quaternary:"",circle:""},{icon:s(()=>[n(l(v),null,{default:s(()=>[n(l(se))]),_:1})]),_:1})]),_:1},8,["options"])])]),footer:s(()=>[e.value.attachments.length>0?(a(),u(w,{key:0,attachments:e.value.attachments},null,8,["attachments"])):c("",!0),e.value.charge_attachments.length>0?(a(),u(w,{key:1,attachments:e.value.charge_attachments,price:e.value.attachment_price},null,8,["attachments","price"])):c("",!0),e.value.imgs.length>0?(a(),u(D,{key:2,imgs:e.value.imgs},null,8,["imgs"])):c("",!0),e.value.videos.length>0?(a(),u(H,{key:3,videos:e.value.videos},null,8,["videos"])):c("",!0),e.value.links.length>0?(a(),u(B,{key:4,links:e.value.links},null,8,["links"])):c("",!0)]),action:s(()=>[n(I,{justify:"space-between"},{default:s(()=>[i("div",{class:"opt-item",onClick:m(L,["stop"])},[n(l(v),{size:"18",class:"opt-item-icon"},{default:s(()=>[n(l(ne))]),_:1}),r(" "+p(e.value.upvote_count),1)],8,fe),i("div",{class:"opt-item",onClick:o[3]||(o[3]=m(d=>k(e.value.id),["stop"]))},[n(l(v),{size:"18",class:"opt-item-icon"},{default:s(()=>[n(l(ae))]),_:1}),r(" "+p(e.value.comment_count),1)]),i("div",{class:"opt-item",onClick:m(S,["stop"])},[n(l(v),{size:"18",class:"opt-item-icon"},{default:s(()=>[n(l(le))]),_:1}),r(" "+p(e.value.collection_count),1)],8,we)]),_:1})]),_:2},[e.value.texts.length>0?{name:"description",fn:s(()=>[i("div",{onClick:o[2]||(o[2]=d=>k(e.value.id))},[(a(!0),f(Q,null,U(e.value.texts,d=>(a(),f("span",{key:d.id,class:"post-text",onClick:o[1]||(o[1]=m(A=>O(A,e.value.id),["stop"])),innerHTML:l(F)(d.content).content},null,8,ye))),128))])]),key:"0"}:void 0]),1024)])}}});const Ce={class:"nickname-wrap"},xe={class:"username-wrap"},$e={class:"item-header-extra"},be={class:"timestamp"},ze=["innerHTML"],Te=["onClick"],qe=["onClick"],Ne=G({__name:"post-item",props:{post:{}},setup($){const h=$,g=X(),b=W(),z=t=>()=>x(v,null,{default:()=>x(t)}),T=C(()=>[{label:"复制链接",key:"copyTweetLink",icon:z(ie)}]),q=async t=>{switch(t){case"copyTweetLink":oe(`${window.location.origin}/#/post?id=${e.value.id}&share=copy_link&t=${new Date().getTime()}`),window.$message.success("链接已复制到剪贴板");break}},e=C({get:()=>{let t=Object.assign({texts:[],imgs:[],videos:[],links:[],attachments:[],charge_attachments:[]},h.post);return t.contents.map(o=>{(+o.type==1||+o.type==2)&&t.texts.push(o),+o.type==3&&t.imgs.push(o),+o.type==4&&t.videos.push(o),+o.type==6&&t.links.push(o),+o.type==7&&t.attachments.push(o),+o.type==8&&t.charge_attachments.push(o)}),t},set:t=>{h.post.upvote_count=t.upvote_count,h.post.collection_count=t.collection_count}}),L=()=>{ee({id:e.value.id}).then(t=>{t.status?e.value={...e.value,upvote_count:e.value.upvote_count+1}:e.value={...e.value,upvote_count:e.value.upvote_count>0?e.value.upvote_count-1:0}}).catch(t=>{console.log(t)})},S=()=>{te({id:e.value.id}).then(t=>{t.status?e.value={...e.value,collection_count:e.value.collection_count+1}:e.value={...e.value,collection_count:e.value.collection_count>0?e.value.collection_count-1:0}}).catch(t=>{console.log(t)})},k=t=>{g.push({name:"post",query:{id:t}})},O=(t,o)=>{if(t.target.dataset.detail){const _=t.target.dataset.detail.split(":");if(_.length===2){b.commit("refresh"),_[0]==="tag"?g.push({name:"home",query:{q:_[1],t:"tag"}}):g.push({name:"user",query:{s:_[1]}});return}}k(o)};return(t,o)=>{const _=ue,P=J("router-link"),y=ce,j=re,M=pe,w=V,D=E,H=R,B=Y,I=_e,N=me;return a(),f("div",{class:"post-item",onClick:o[3]||(o[3]=d=>k(e.value.id))},[n(N,{"content-indented":""},K({avatar:s(()=>[n(_,{round:"",size:30,src:e.value.user.avatar},null,8,["src"])]),header:s(()=>[i("span",Ce,[n(P,{onClick:o[0]||(o[0]=m(()=>{},["stop"])),class:"username-link",to:{name:"user",query:{s:e.value.user.username}}},{default:s(()=>[r(p(e.value.user.nickname),1)]),_:1},8,["to"])]),i("span",xe," @"+p(e.value.user.username),1),e.value.is_top?(a(),u(y,{key:0,class:"top-tag",type:"warning",size:"small",round:""},{default:s(()=>[r(" 置顶 ")]),_:1})):c("",!0),e.value.visibility==1?(a(),u(y,{key:1,class:"top-tag",type:"error",size:"small",round:""},{default:s(()=>[r(" 私密 ")]),_:1})):c("",!0),e.value.visibility==2?(a(),u(y,{key:2,class:"top-tag",type:"info",size:"small",round:""},{default:s(()=>[r(" 好友可见 ")]),_:1})):c("",!0)]),"header-extra":s(()=>[i("div",$e,[i("span",be,p(e.value.ip_loc?e.value.ip_loc+" · ":e.value.ip_loc)+" "+p(l(Z)(e.value.created_on)),1),n(M,{placement:"bottom-end",trigger:"hover",size:"small",options:T.value,onSelect:q},{default:s(()=>[n(j,{quaternary:"",circle:""},{icon:s(()=>[n(l(v),null,{default:s(()=>[n(l(se))]),_:1})]),_:1})]),_:1},8,["options"])])]),footer:s(()=>[e.value.attachments.length>0?(a(),u(w,{key:0,attachments:e.value.attachments},null,8,["attachments"])):c("",!0),e.value.charge_attachments.length>0?(a(),u(w,{key:1,attachments:e.value.charge_attachments,price:e.value.attachment_price},null,8,["attachments","price"])):c("",!0),e.value.imgs.length>0?(a(),u(D,{key:2,imgs:e.value.imgs},null,8,["imgs"])):c("",!0),e.value.videos.length>0?(a(),u(H,{key:3,videos:e.value.videos},null,8,["videos"])):c("",!0),e.value.links.length>0?(a(),u(B,{key:4,links:e.value.links},null,8,["links"])):c("",!0)]),action:s(()=>[n(I,{justify:"space-between"},{default:s(()=>[i("div",{class:"opt-item hover",onClick:m(L,["stop"])},[n(l(v),{size:"18",class:"opt-item-icon"},{default:s(()=>[n(l(ne))]),_:1}),r(" "+p(e.value.upvote_count),1)],8,Te),i("div",{class:"opt-item hover",onClick:o[2]||(o[2]=m(d=>k(e.value.id),["stop"]))},[n(l(v),{size:"18",class:"opt-item-icon"},{default:s(()=>[n(l(ae))]),_:1}),r(" "+p(e.value.comment_count),1)]),i("div",{class:"opt-item hover",onClick:m(S,["stop"])},[n(l(v),{size:"18",class:"opt-item-icon"},{default:s(()=>[n(l(le))]),_:1}),r(" "+p(e.value.collection_count),1)],8,qe)]),_:1})]),_:2},[e.value.texts.length>0?{name:"description",fn:s(()=>[(a(!0),f(Q,null,U(e.value.texts,d=>(a(),f("span",{key:d.id,class:"post-text hover",onClick:o[1]||(o[1]=m(A=>O(A,e.value.id),["stop"])),innerHTML:l(F)(d.content).content},null,8,ze))),128))]),key:"0"}:void 0]),1024)])}}});export{Ne as _,Ie as a}; +import{p as F,a as V,_ as E,b as R,c as Y}from"./content-d5264b98.js";import{d as G,c as C,r as J,e as a,f,k as n,al as K,w as s,j as i,F as Q,u as U,y as m,bf as l,A as r,x as p,q as u,Y as c,h as x}from"./@vue-a481fc63.js";import{u as W}from"./vuex-44de225f.js";import{u as X}from"./vue-router-e5a2430e.js";import{c as Z}from"./formatTime-4210fcd1.js";import{u as ee,w as te}from"./index-757c547c.js";import{c as oe}from"./copy-to-clipboard-4ef7d3eb.js";import{i as se,j as ne,l as ae,m as le,o as ie}from"./@vicons-1a3558c6.js";import{j as v,o as ue,M as ce,e as re,O as pe,a as _e,L as me}from"./naive-ui-d8de3dda.js";const ve={class:"post-item"},de={class:"nickname-wrap"},he={class:"username-wrap"},ge={class:"timestamp-mobile"},ke={class:"item-header-extra"},ye=["innerHTML"],fe=["onClick"],we=["onClick"],Ie=G({__name:"mobile-post-item",props:{post:{}},setup($){const h=$,g=X(),b=W(),z=t=>()=>x(v,null,{default:()=>x(t)}),T=C(()=>[{label:"复制链接",key:"copyTweetLink",icon:z(ie)}]),q=async t=>{switch(t){case"copyTweetLink":oe(`${window.location.origin}/#/post?id=${e.value.id}&share=copy_link&t=${new Date().getTime()}`),window.$message.success("链接已复制到剪贴板");break}},e=C({get:()=>{let t=Object.assign({texts:[],imgs:[],videos:[],links:[],attachments:[],charge_attachments:[]},h.post);return t.contents.map(o=>{(+o.type==1||+o.type==2)&&t.texts.push(o),+o.type==3&&t.imgs.push(o),+o.type==4&&t.videos.push(o),+o.type==6&&t.links.push(o),+o.type==7&&t.attachments.push(o),+o.type==8&&t.charge_attachments.push(o)}),t},set:t=>{h.post.upvote_count=t.upvote_count,h.post.collection_count=t.collection_count}}),L=()=>{ee({id:e.value.id}).then(t=>{t.status?e.value={...e.value,upvote_count:e.value.upvote_count+1}:e.value={...e.value,upvote_count:e.value.upvote_count>0?e.value.upvote_count-1:0}}).catch(t=>{console.log(t)})},S=()=>{te({id:e.value.id}).then(t=>{t.status?e.value={...e.value,collection_count:e.value.collection_count+1}:e.value={...e.value,collection_count:e.value.collection_count>0?e.value.collection_count-1:0}}).catch(t=>{console.log(t)})},k=t=>{g.push({name:"post",query:{id:t}})},O=(t,o)=>{if(t.target.dataset.detail){const _=t.target.dataset.detail.split(":");if(_.length===2){b.commit("refresh"),_[0]==="tag"?g.push({name:"home",query:{q:_[1],t:"tag"}}):g.push({name:"user",query:{s:_[1]}});return}}k(o)};return(t,o)=>{const _=ue,P=J("router-link"),y=ce,j=re,M=pe,w=V,D=E,H=R,B=Y,I=_e,N=me;return a(),f("div",ve,[n(N,{"content-indented":""},K({avatar:s(()=>[n(_,{round:"",size:30,src:e.value.user.avatar},null,8,["src"])]),header:s(()=>[i("span",de,[n(P,{onClick:o[0]||(o[0]=m(()=>{},["stop"])),class:"username-link",to:{name:"user",query:{s:e.value.user.username}}},{default:s(()=>[r(p(e.value.user.nickname),1)]),_:1},8,["to"])]),i("span",he," @"+p(e.value.user.username),1),e.value.is_top?(a(),u(y,{key:0,class:"top-tag",type:"warning",size:"small",round:""},{default:s(()=>[r(" 置顶 ")]),_:1})):c("",!0),e.value.visibility==1?(a(),u(y,{key:1,class:"top-tag",type:"error",size:"small",round:""},{default:s(()=>[r(" 私密 ")]),_:1})):c("",!0),e.value.visibility==2?(a(),u(y,{key:2,class:"top-tag",type:"info",size:"small",round:""},{default:s(()=>[r(" 好友可见 ")]),_:1})):c("",!0),i("div",null,[i("span",ge,p(l(Z)(e.value.created_on))+" "+p(e.value.ip_loc),1)])]),"header-extra":s(()=>[i("div",ke,[n(M,{placement:"bottom-end",trigger:"click",size:"small",options:T.value,onSelect:q},{default:s(()=>[n(j,{quaternary:"",circle:""},{icon:s(()=>[n(l(v),null,{default:s(()=>[n(l(se))]),_:1})]),_:1})]),_:1},8,["options"])])]),footer:s(()=>[e.value.attachments.length>0?(a(),u(w,{key:0,attachments:e.value.attachments},null,8,["attachments"])):c("",!0),e.value.charge_attachments.length>0?(a(),u(w,{key:1,attachments:e.value.charge_attachments,price:e.value.attachment_price},null,8,["attachments","price"])):c("",!0),e.value.imgs.length>0?(a(),u(D,{key:2,imgs:e.value.imgs},null,8,["imgs"])):c("",!0),e.value.videos.length>0?(a(),u(H,{key:3,videos:e.value.videos},null,8,["videos"])):c("",!0),e.value.links.length>0?(a(),u(B,{key:4,links:e.value.links},null,8,["links"])):c("",!0)]),action:s(()=>[n(I,{justify:"space-between"},{default:s(()=>[i("div",{class:"opt-item",onClick:m(L,["stop"])},[n(l(v),{size:"18",class:"opt-item-icon"},{default:s(()=>[n(l(ne))]),_:1}),r(" "+p(e.value.upvote_count),1)],8,fe),i("div",{class:"opt-item",onClick:o[3]||(o[3]=m(d=>k(e.value.id),["stop"]))},[n(l(v),{size:"18",class:"opt-item-icon"},{default:s(()=>[n(l(ae))]),_:1}),r(" "+p(e.value.comment_count),1)]),i("div",{class:"opt-item",onClick:m(S,["stop"])},[n(l(v),{size:"18",class:"opt-item-icon"},{default:s(()=>[n(l(le))]),_:1}),r(" "+p(e.value.collection_count),1)],8,we)]),_:1})]),_:2},[e.value.texts.length>0?{name:"description",fn:s(()=>[i("div",{onClick:o[2]||(o[2]=d=>k(e.value.id))},[(a(!0),f(Q,null,U(e.value.texts,d=>(a(),f("span",{key:d.id,class:"post-text",onClick:o[1]||(o[1]=m(A=>O(A,e.value.id),["stop"])),innerHTML:l(F)(d.content).content},null,8,ye))),128))])]),key:"0"}:void 0]),1024)])}}});const Ce={class:"nickname-wrap"},xe={class:"username-wrap"},$e={class:"item-header-extra"},be={class:"timestamp"},ze=["innerHTML"],Te=["onClick"],qe=["onClick"],Ne=G({__name:"post-item",props:{post:{}},setup($){const h=$,g=X(),b=W(),z=t=>()=>x(v,null,{default:()=>x(t)}),T=C(()=>[{label:"复制链接",key:"copyTweetLink",icon:z(ie)}]),q=async t=>{switch(t){case"copyTweetLink":oe(`${window.location.origin}/#/post?id=${e.value.id}&share=copy_link&t=${new Date().getTime()}`),window.$message.success("链接已复制到剪贴板");break}},e=C({get:()=>{let t=Object.assign({texts:[],imgs:[],videos:[],links:[],attachments:[],charge_attachments:[]},h.post);return t.contents.map(o=>{(+o.type==1||+o.type==2)&&t.texts.push(o),+o.type==3&&t.imgs.push(o),+o.type==4&&t.videos.push(o),+o.type==6&&t.links.push(o),+o.type==7&&t.attachments.push(o),+o.type==8&&t.charge_attachments.push(o)}),t},set:t=>{h.post.upvote_count=t.upvote_count,h.post.collection_count=t.collection_count}}),L=()=>{ee({id:e.value.id}).then(t=>{t.status?e.value={...e.value,upvote_count:e.value.upvote_count+1}:e.value={...e.value,upvote_count:e.value.upvote_count>0?e.value.upvote_count-1:0}}).catch(t=>{console.log(t)})},S=()=>{te({id:e.value.id}).then(t=>{t.status?e.value={...e.value,collection_count:e.value.collection_count+1}:e.value={...e.value,collection_count:e.value.collection_count>0?e.value.collection_count-1:0}}).catch(t=>{console.log(t)})},k=t=>{g.push({name:"post",query:{id:t}})},O=(t,o)=>{if(t.target.dataset.detail){const _=t.target.dataset.detail.split(":");if(_.length===2){b.commit("refresh"),_[0]==="tag"?g.push({name:"home",query:{q:_[1],t:"tag"}}):g.push({name:"user",query:{s:_[1]}});return}}k(o)};return(t,o)=>{const _=ue,P=J("router-link"),y=ce,j=re,M=pe,w=V,D=E,H=R,B=Y,I=_e,N=me;return a(),f("div",{class:"post-item",onClick:o[3]||(o[3]=d=>k(e.value.id))},[n(N,{"content-indented":""},K({avatar:s(()=>[n(_,{round:"",size:30,src:e.value.user.avatar},null,8,["src"])]),header:s(()=>[i("span",Ce,[n(P,{onClick:o[0]||(o[0]=m(()=>{},["stop"])),class:"username-link",to:{name:"user",query:{s:e.value.user.username}}},{default:s(()=>[r(p(e.value.user.nickname),1)]),_:1},8,["to"])]),i("span",xe," @"+p(e.value.user.username),1),e.value.is_top?(a(),u(y,{key:0,class:"top-tag",type:"warning",size:"small",round:""},{default:s(()=>[r(" 置顶 ")]),_:1})):c("",!0),e.value.visibility==1?(a(),u(y,{key:1,class:"top-tag",type:"error",size:"small",round:""},{default:s(()=>[r(" 私密 ")]),_:1})):c("",!0),e.value.visibility==2?(a(),u(y,{key:2,class:"top-tag",type:"info",size:"small",round:""},{default:s(()=>[r(" 好友可见 ")]),_:1})):c("",!0)]),"header-extra":s(()=>[i("div",$e,[i("span",be,p(e.value.ip_loc?e.value.ip_loc+" · ":e.value.ip_loc)+" "+p(l(Z)(e.value.created_on)),1),n(M,{placement:"bottom-end",trigger:"hover",size:"small",options:T.value,onSelect:q},{default:s(()=>[n(j,{quaternary:"",circle:""},{icon:s(()=>[n(l(v),null,{default:s(()=>[n(l(se))]),_:1})]),_:1})]),_:1},8,["options"])])]),footer:s(()=>[e.value.attachments.length>0?(a(),u(w,{key:0,attachments:e.value.attachments},null,8,["attachments"])):c("",!0),e.value.charge_attachments.length>0?(a(),u(w,{key:1,attachments:e.value.charge_attachments,price:e.value.attachment_price},null,8,["attachments","price"])):c("",!0),e.value.imgs.length>0?(a(),u(D,{key:2,imgs:e.value.imgs},null,8,["imgs"])):c("",!0),e.value.videos.length>0?(a(),u(H,{key:3,videos:e.value.videos},null,8,["videos"])):c("",!0),e.value.links.length>0?(a(),u(B,{key:4,links:e.value.links},null,8,["links"])):c("",!0)]),action:s(()=>[n(I,{justify:"space-between"},{default:s(()=>[i("div",{class:"opt-item hover",onClick:m(L,["stop"])},[n(l(v),{size:"18",class:"opt-item-icon"},{default:s(()=>[n(l(ne))]),_:1}),r(" "+p(e.value.upvote_count),1)],8,Te),i("div",{class:"opt-item hover",onClick:o[2]||(o[2]=m(d=>k(e.value.id),["stop"]))},[n(l(v),{size:"18",class:"opt-item-icon"},{default:s(()=>[n(l(ae))]),_:1}),r(" "+p(e.value.comment_count),1)]),i("div",{class:"opt-item hover",onClick:m(S,["stop"])},[n(l(v),{size:"18",class:"opt-item-icon"},{default:s(()=>[n(l(le))]),_:1}),r(" "+p(e.value.collection_count),1)],8,qe)]),_:1})]),_:2},[e.value.texts.length>0?{name:"description",fn:s(()=>[(a(!0),f(Q,null,U(e.value.texts,d=>(a(),f("span",{key:d.id,class:"post-text hover",onClick:o[1]||(o[1]=m(A=>O(A,e.value.id),["stop"])),innerHTML:l(F)(d.content).content},null,8,ze))),128))]),key:"0"}:void 0]),1024)])}}});export{Ne as _,Ie as a}; diff --git a/web/dist/assets/post-skeleton-bae19eed.js b/web/dist/assets/post-skeleton-c82f8a59.js similarity index 88% rename from web/dist/assets/post-skeleton-bae19eed.js rename to web/dist/assets/post-skeleton-c82f8a59.js index b57db05b..bb74ab61 100644 --- a/web/dist/assets/post-skeleton-bae19eed.js +++ b/web/dist/assets/post-skeleton-c82f8a59.js @@ -1 +1 @@ -import{U as r}from"./naive-ui-d8de3dda.js";import{d as c,e as s,f as n,u as p,j as o,k as t,F as l}from"./@vue-a481fc63.js";import{_ as i}from"./index-7ab58e72.js";const m={class:"user"},u={class:"content"},d=c({__name:"post-skeleton",props:{num:{default:1}},setup(f){return(_,k)=>{const e=r;return s(!0),n(l,null,p(new Array(_.num),a=>(s(),n("div",{class:"skeleton-item",key:a},[o("div",m,[t(e,{circle:"",size:"small"})]),o("div",u,[t(e,{text:"",repeat:3}),t(e,{text:"",style:{width:"60%"}})])]))),128)}}});const b=i(d,[["__scopeId","data-v-ab0015b4"]]);export{b as _}; +import{U as r}from"./naive-ui-d8de3dda.js";import{d as c,e as s,f as n,u as p,j as o,k as t,F as l}from"./@vue-a481fc63.js";import{_ as i}from"./index-757c547c.js";const m={class:"user"},u={class:"content"},d=c({__name:"post-skeleton",props:{num:{default:1}},setup(f){return(_,k)=>{const e=r;return s(!0),n(l,null,p(new Array(_.num),a=>(s(),n("div",{class:"skeleton-item",key:a},[o("div",m,[t(e,{circle:"",size:"small"})]),o("div",u,[t(e,{text:"",repeat:3}),t(e,{text:"",style:{width:"60%"}})])]))),128)}}});const b=i(d,[["__scopeId","data-v-ab0015b4"]]);export{b as _}; diff --git a/web/dist/index.html b/web/dist/index.html index 438dbb9f..c282c0ce 100644 --- a/web/dist/index.html +++ b/web/dist/index.html @@ -8,7 +8,7 @@ 泡泡 - + @@ -27,7 +27,7 @@ - + diff --git a/web/src/components/message-item.vue b/web/src/components/message-item.vue index 916ff885..7634377a 100644 --- a/web/src/components/message-item.vue +++ b/web/src/components/message-item.vue @@ -1,16 +1,19 @@ - + - + + + {{ message.receiver_user.nickname }} + + + @{{ message.receiver_user.username }} + + 系统 + + 私信 + + + + 已发送 + + + + + + 已接收 + + + + - + {{ formatRelativeTime(message.created_on) }} - + {{ message.brief }}