diff --git a/Makefile b/Makefile index cb5edd40..62ef4b1f 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -.PHONY: all build run test clean fmt pre-commit help +.PHONY: all build build-web run test clean fmt pre-commit help PROJECT = paopao-ce TARGET = paopao @@ -35,6 +35,9 @@ build: @echo Build paopao-ce @go build -pgo=auto -trimpath -tags '$(TAGS)' -ldflags '$(LDFLAGS)' -o $(RELEASE_ROOT)/$(TARGET) +build-web: + @cd web && rm -rf dist/* && yarn build && cd - + run: @go run -pgo=auto -trimpath -gcflags "all=-N -l" -tags '$(TAGS)' -ldflags '$(LDFLAGS)' . serve diff --git a/auto/api/v1/followship.go b/auto/api/v1/followship.go index fa6c0f8b..af668dc8 100644 --- a/auto/api/v1/followship.go +++ b/auto/api/v1/followship.go @@ -18,10 +18,10 @@ type Followship interface { // Chain provide handlers chain for gin Chain() gin.HandlersChain - ListFollowers(*web.ListFollowersReq) (*web.ListFollowersResp, mir.Error) ListFollowings(*web.ListFollowingsReq) (*web.ListFollowingsResp, mir.Error) - DeleteFollowing(*web.DeleteFollowingReq) mir.Error - AddFollowing(*web.AddFollowingReq) mir.Error + ListFollows(*web.ListFollowsReq) (*web.ListFollowsResp, mir.Error) + UnfollowUser(*web.UnfollowUserReq) mir.Error + FollowUser(*web.FollowUserReq) mir.Error mustEmbedUnimplementedFollowshipServant() } @@ -34,59 +34,59 @@ func RegisterFollowshipServant(e *gin.Engine, s Followship) { router.Use(middlewares...) // register routes info to router - router.Handle("GET", "/follower/list", func(c *gin.Context) { + router.Handle("GET", "/user/followings", func(c *gin.Context) { select { case <-c.Request.Context().Done(): return default: } - req := new(web.ListFollowersReq) + req := new(web.ListFollowingsReq) if err := s.Bind(c, req); err != nil { s.Render(c, nil, err) return } - resp, err := s.ListFollowers(req) + resp, err := s.ListFollowings(req) s.Render(c, resp, err) }) - router.Handle("GET", "/following/list", func(c *gin.Context) { + router.Handle("GET", "/user/follows", func(c *gin.Context) { select { case <-c.Request.Context().Done(): return default: } - req := new(web.ListFollowingsReq) + req := new(web.ListFollowsReq) if err := s.Bind(c, req); err != nil { s.Render(c, nil, err) return } - resp, err := s.ListFollowings(req) + resp, err := s.ListFollows(req) s.Render(c, resp, err) }) - router.Handle("POST", "/following/delete", func(c *gin.Context) { + router.Handle("POST", "/user/unfollow", func(c *gin.Context) { select { case <-c.Request.Context().Done(): return default: } - req := new(web.DeleteFollowingReq) + req := new(web.UnfollowUserReq) if err := s.Bind(c, req); err != nil { s.Render(c, nil, err) return } - s.Render(c, nil, s.DeleteFollowing(req)) + s.Render(c, nil, s.UnfollowUser(req)) }) - router.Handle("POST", "/following/add", func(c *gin.Context) { + router.Handle("POST", "/user/follow", func(c *gin.Context) { select { case <-c.Request.Context().Done(): return default: } - req := new(web.AddFollowingReq) + req := new(web.FollowUserReq) if err := s.Bind(c, req); err != nil { s.Render(c, nil, err) return } - s.Render(c, nil, s.AddFollowing(req)) + s.Render(c, nil, s.FollowUser(req)) }) } @@ -97,19 +97,19 @@ func (UnimplementedFollowshipServant) Chain() gin.HandlersChain { return nil } -func (UnimplementedFollowshipServant) ListFollowers(req *web.ListFollowersReq) (*web.ListFollowersResp, mir.Error) { +func (UnimplementedFollowshipServant) ListFollowings(req *web.ListFollowingsReq) (*web.ListFollowingsResp, mir.Error) { return nil, mir.Errorln(http.StatusNotImplemented, http.StatusText(http.StatusNotImplemented)) } -func (UnimplementedFollowshipServant) ListFollowings(req *web.ListFollowingsReq) (*web.ListFollowingsResp, mir.Error) { +func (UnimplementedFollowshipServant) ListFollows(req *web.ListFollowsReq) (*web.ListFollowsResp, mir.Error) { return nil, mir.Errorln(http.StatusNotImplemented, http.StatusText(http.StatusNotImplemented)) } -func (UnimplementedFollowshipServant) DeleteFollowing(req *web.DeleteFollowingReq) mir.Error { +func (UnimplementedFollowshipServant) UnfollowUser(req *web.UnfollowUserReq) mir.Error { return mir.Errorln(http.StatusNotImplemented, http.StatusText(http.StatusNotImplemented)) } -func (UnimplementedFollowshipServant) AddFollowing(req *web.AddFollowingReq) mir.Error { +func (UnimplementedFollowshipServant) FollowUser(req *web.FollowUserReq) mir.Error { return mir.Errorln(http.StatusNotImplemented, http.StatusText(http.StatusNotImplemented)) } diff --git a/docs/proposal/010-关于Sqlx功能项的设计.md b/docs/proposal/010-关于Sqlx功能项的设计.md deleted file mode 100644 index b808da0a..00000000 --- a/docs/proposal/010-关于Sqlx功能项的设计.md +++ /dev/null @@ -1,28 +0,0 @@ -| 编号 | 作者 | 发表时间 | 变更时间 | 版本 | 状态 | -| ----- | ----- | ----- | ----- | ----- | ----- | -| 010| 北野 | 2022-12-10 | 2022-12-10 | v0.0 | 提议 | - -### 关于Sqlx功能项的设计 - ---- 这里写简要介绍 ---- - -### 场景 - - ---- 这里描述在什么使用场景下会需要本提按 ---- - -### 需求 - -TODO-TL;DR... - -### 方案 - -TODO - -### 疑问 - -1. 如何开启这个功能? - -TODO - -### 更新记录 -#### v0.0(2022-12-10) - 北野 -* 初始文档, 先占个位置 diff --git a/internal/model/joint/joint.go b/internal/model/joint/joint.go new file mode 100644 index 00000000..fa7e4729 --- /dev/null +++ b/internal/model/joint/joint.go @@ -0,0 +1,16 @@ +// Copyright 2023 ROC. All rights reserved. +// Use of this source code is governed by a MIT style +// license that can be found in the LICENSE file. + +// Package joint provider some common base type or logic for model define. + +package joint + +type BasePageInfo struct { + Page int `form:"-" binding:"-"` + PageSize int `form:"-" binding:"-"` +} + +func (r *BasePageInfo) SetPageInfo(page int, pageSize int) { + r.Page, r.PageSize = page, pageSize +} diff --git a/internal/model/web/core.go b/internal/model/web/core.go index a697fec7..587d00ce 100644 --- a/internal/model/web/core.go +++ b/internal/model/web/core.go @@ -27,14 +27,17 @@ type UserInfoReq struct { } type UserInfoResp struct { - Id int64 `json:"id"` - Nickname string `json:"nickname"` - Username string `json:"username"` - Status int `json:"status"` - Avatar string `json:"avatar"` - Balance int64 `json:"balance"` - Phone string `json:"phone"` - IsAdmin bool `json:"is_admin"` + Id int64 `json:"id"` + Nickname string `json:"nickname"` + Username string `json:"username"` + Status int `json:"status"` + Avatar string `json:"avatar"` + Balance int64 `json:"balance"` + Phone string `json:"phone"` + IsAdmin bool `json:"is_admin"` + CreatedOn int64 `json:"created_on"` + Follows int `json:"follows"` + Followings int `json:"followings"` } type GetUnreadMsgCountReq struct { diff --git a/internal/model/web/followship.go b/internal/model/web/followship.go index aba69f72..1123531c 100644 --- a/internal/model/web/followship.go +++ b/internal/model/web/followship.go @@ -4,24 +4,33 @@ package web -import "github.com/rocboss/paopao-ce/internal/servants/base" +import ( + "github.com/rocboss/paopao-ce/internal/model/joint" + "github.com/rocboss/paopao-ce/internal/servants/base" +) -type AddFollowingReq struct { +type FollowUserReq struct { BaseInfo `json:"-" binding:"-"` + UserId int64 `json:"user_id" binding:"required"` } -type DeleteFollowingReq struct { +type UnfollowUserReq struct { BaseInfo `json:"-" binding:"-"` + UserId int64 `json:"user_id" binding:"required"` } -type ListFollowingsReq struct { +type ListFollowsReq struct { BaseInfo `json:"-" binding:"-"` + joint.BasePageInfo + Username string `form:"username" binding:"required"` } -type ListFollowingsResp base.PageResp +type ListFollowsResp base.PageResp -type ListFollowersReq struct { +type ListFollowingsReq struct { BaseInfo `form:"-" binding:"-"` + joint.BasePageInfo + Username string `form:"username" binding:"required"` } -type ListFollowersResp base.PageResp +type ListFollowingsResp base.PageResp diff --git a/internal/model/web/loose.go b/internal/model/web/loose.go index 0f6f863e..9376a1ea 100644 --- a/internal/model/web/loose.go +++ b/internal/model/web/loose.go @@ -67,13 +67,17 @@ type GetUserProfileReq struct { } type GetUserProfileResp struct { - ID int64 `json:"id"` - Nickname string `json:"nickname"` - Username string `json:"username"` - Status int `json:"status"` - Avatar string `json:"avatar"` - IsAdmin bool `json:"is_admin"` - IsFriend bool `json:"is_friend"` + ID int64 `json:"id"` + Nickname string `json:"nickname"` + Username string `json:"username"` + Status int `json:"status"` + Avatar string `json:"avatar"` + IsAdmin bool `json:"is_admin"` + IsFriend bool `json:"is_friend"` + IsFollowing bool `json:"is_following"` + CreatedOn int64 `json:"created_on"` + Follows int `json:"follows"` + Followings int `json:"followings"` } type TopicListReq struct { diff --git a/internal/servants/web/core.go b/internal/servants/web/core.go index c1337fe9..f5a8767d 100644 --- a/internal/servants/web/core.go +++ b/internal/servants/web/core.go @@ -61,13 +61,16 @@ func (s *coreSrv) GetUserInfo(req *web.UserInfoReq) (*web.UserInfoResp, mir.Erro return nil, xerror.UnauthorizedAuthNotExist } resp := &web.UserInfoResp{ - Id: user.ID, - Nickname: user.Nickname, - Username: user.Username, - Status: user.Status, - Avatar: user.Avatar, - Balance: user.Balance, - IsAdmin: user.IsAdmin, + Id: user.ID, + Nickname: user.Nickname, + Username: user.Username, + Status: user.Status, + Avatar: user.Avatar, + Balance: user.Balance, + IsAdmin: user.IsAdmin, + CreatedOn: user.CreatedOn, + Follows: 0, // TODO + Followings: 0, // TODO } if user.Phone != "" && len(user.Phone) == 11 { resp.Phone = user.Phone[0:3] + "****" + user.Phone[7:] diff --git a/internal/servants/web/followship.go b/internal/servants/web/followship.go index eb9cc14f..2c399f02 100644 --- a/internal/servants/web/followship.go +++ b/internal/servants/web/followship.go @@ -5,8 +5,11 @@ package web import ( + "github.com/alimy/mir/v4" "github.com/gin-gonic/gin" api "github.com/rocboss/paopao-ce/auto/api/v1" + "github.com/rocboss/paopao-ce/internal/core/ms" + "github.com/rocboss/paopao-ce/internal/model/web" "github.com/rocboss/paopao-ce/internal/servants/base" "github.com/rocboss/paopao-ce/internal/servants/chain" ) @@ -24,6 +27,32 @@ func (s *followshipSrv) Chain() gin.HandlersChain { return gin.HandlersChain{chain.JWT()} } +func (s *followshipSrv) ListFollowings(r *web.ListFollowingsReq) (*web.ListFollowingsResp, mir.Error) { + // TODO + res := ms.ContactList{} + resp := base.PageRespFrom(res.Contacts, r.Page, r.PageSize, res.Total) + return (*web.ListFollowingsResp)(resp), nil +} + +func (s *followshipSrv) ListFollows(r *web.ListFollowsReq) (*web.ListFollowsResp, mir.Error) { + // TODO + res := ms.ContactList{} + resp := base.PageRespFrom(res.Contacts, r.Page, r.PageSize, res.Total) + return (*web.ListFollowsResp)(resp), nil +} + +func (s *followshipSrv) UnfollowUser(r *web.UnfollowUserReq) mir.Error { + // TODO + return web.ErrNotImplemented +} + +func (s *followshipSrv) FollowUser(r *web.FollowUserReq) mir.Error { + // TODO + return web.ErrNotImplemented +} + func newFollowshipSrv(s *base.DaoServant) api.Followship { - return &followshipSrv{} + return &followshipSrv{ + DaoServant: s, + } } diff --git a/internal/servants/web/loose.go b/internal/servants/web/loose.go index 236964e8..6096538b 100644 --- a/internal/servants/web/loose.go +++ b/internal/servants/web/loose.go @@ -178,13 +178,16 @@ func (s *looseSrv) GetUserProfile(req *web.GetUserProfileReq) (*web.GetUserProfi isFriend = s.Ds.IsFriend(req.User.ID, he.ID) } return &web.GetUserProfileResp{ - ID: he.ID, - Nickname: he.Nickname, - Username: he.Username, - Status: he.Status, - Avatar: he.Avatar, - IsAdmin: he.IsAdmin, - IsFriend: isFriend, + ID: he.ID, + Nickname: he.Nickname, + Username: he.Username, + Status: he.Status, + Avatar: he.Avatar, + IsAdmin: he.IsAdmin, + IsFriend: isFriend, + CreatedOn: he.CreatedOn, + Follows: 0, // TODO + Followings: 0, // TODO }, nil } diff --git a/mirc/web/v1/followship.go b/mirc/web/v1/followship.go index c44c7709..9548b796 100644 --- a/mirc/web/v1/followship.go +++ b/mirc/web/v1/followship.go @@ -15,15 +15,15 @@ type Followship struct { Chain `mir:"-"` Group `mir:"v1"` - // AddFollowing 添加关注 - AddFollowing func(Post, web.AddFollowingReq) `mir:"/following/add"` + // FollowUser 关注用户 + FollowUser func(Post, web.FollowUserReq) `mir:"/user/follow"` - // DeleteFollowing 取消关注 - DeleteFollowing func(Post, web.DeleteFollowingReq) `mir:"/following/delete"` + // UnfollowUser 取消关注用户 + UnfollowUser func(Post, web.UnfollowUserReq) `mir:"/user/unfollow"` - // ListFollowings 获取用户的关注列表 - ListFollowings func(Get, web.ListFollowingsReq) web.ListFollowingsResp `mir:"/following/list"` + // ListFollows 获取用户的关注列表 + ListFollows func(Get, web.ListFollowsReq) web.ListFollowsResp `mir:"/user/follows"` - // ListFollowers 获取用户的追随者列表 - ListFollowers func(Get, web.ListFollowersReq) web.ListFollowersResp `mir:"/follower/list"` + // ListFollowings 获取用户的追随者列表 + ListFollowings func(Get, web.ListFollowingsReq) web.ListFollowingsResp `mir:"/user/followings"` } diff --git a/web/dist/assets/404-fd003fab.js b/web/dist/assets/404-5924d4b9.js similarity index 79% rename from web/dist/assets/404-fd003fab.js rename to web/dist/assets/404-5924d4b9.js index bdbb583e..75213a6e 100644 --- a/web/dist/assets/404-fd003fab.js +++ b/web/dist/assets/404-5924d4b9.js @@ -1 +1 @@ -import{_ as s}from"./main-nav.vue_vue_type_style_index_0_lang-e28257cc.js";import{u as a}from"./vue-router-b8e3382f.js";import{F as i,e as c,a2 as u}from"./naive-ui-62663ad7.js";import{d as l,c as d,V as t,a1 as o,o as f,e as x}from"./@vue-e0e89260.js";import{_ as g}from"./index-a0347e1a.js";import"./vuex-473b3783.js";import"./vooks-a50491fd.js";import"./evtd-b614532e.js";import"./@vicons-8f91201d.js";import"./seemly-76b7b838.js";import"./vueuc-59ca65c3.js";import"./@css-render-580d83ec.js";import"./vdirs-b0483831.js";import"./@juggle-41516555.js";import"./css-render-6a5c5852.js";import"./@emotion-8a8e73f6.js";import"./lodash-es-8412e618.js";import"./treemate-25c27bff.js";import"./async-validator-dee29e8b.js";import"./date-fns-975a2d8f.js";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-db217db0.js";import{u as a}from"./vue-router-b8e3382f.js";import{F as i,e as c,a2 as u}from"./naive-ui-62663ad7.js";import{d as l,c as d,V as t,a1 as o,o as f,e as x}from"./@vue-e0e89260.js";import{_ as g}from"./index-479e9ef6.js";import"./vuex-473b3783.js";import"./vooks-a50491fd.js";import"./evtd-b614532e.js";import"./@vicons-0524c43e.js";import"./seemly-76b7b838.js";import"./vueuc-59ca65c3.js";import"./@css-render-580d83ec.js";import"./vdirs-b0483831.js";import"./@juggle-41516555.js";import"./css-render-6a5c5852.js";import"./@emotion-8a8e73f6.js";import"./lodash-es-8412e618.js";import"./treemate-25c27bff.js";import"./async-validator-dee29e8b.js";import"./date-fns-975a2d8f.js";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-0524c43e.js b/web/dist/assets/@vicons-0524c43e.js new file mode 100644 index 00000000..0dcd12d0 --- /dev/null +++ b/web/dist/assets/@vicons-0524c43e.js @@ -0,0 +1 @@ +import{d as o,o as n,c as e,a as t,b as i}from"./@vue-e0e89260.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,V1 as u,Q1 as v,B1 as w,u1 as x,R1 as y,n1 as z}; diff --git a/web/dist/assets/@vicons-8f91201d.js b/web/dist/assets/@vicons-8f91201d.js deleted file mode 100644 index a940d6e2..00000000 --- a/web/dist/assets/@vicons-8f91201d.js +++ /dev/null @@ -1 +0,0 @@ -import{d as n,o,c as e,a as t,b as i}from"./@vue-e0e89260.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],Ko=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("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),u=[w],Wo=n({name:"Bookmark",render:function(s,l){return o(),e("svg",a,u)}}),_={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},k=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),p=[k],Qo=n({name:"BookmarkOutline",render:function(s,l){return o(),e("svg",_,p)}}),x={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},m=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),g=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),v=[m,g],Xo=n({name:"BookmarksOutline",render:function(s,l){return o(),e("svg",x,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:"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),C=[f],Yo=n({name:"ChatboxOutline",render:function(s,l){return o(),e("svg",$,C)}}),M={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},O=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),z=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),j=[O,z],Zo=n({name:"ChatbubblesOutline",render:function(s,l){return o(),e("svg",M,j)}}),B={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},L=t("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32",d:"M464 128L240 384l-96-96"},null,-1),H=t("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32",d:"M144 384l-96-96"},null,-1),V=t("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32",d:"M368 128L232 284"},null,-1),A=[L,H,V],t1=n({name:"CheckmarkDoneOutline",render:function(s,l){return o(),e("svg",B,A)}}),b={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:"M416 128L192 384l-96-96"},null,-1),P=[y],n1=n({name:"CheckmarkOutline",render:function(s,l){return o(),e("svg",b,P)}}),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:"M368 368L144 144"},null,-1),S=t("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32",d:"M368 144L144 368"},null,-1),E=[D,S],o1=n({name:"CloseOutline",render:function(s,l){return o(),e("svg",T,E)}}),F={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},R=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),q=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),I=t("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32",d:"M256 224v224.03"},null,-1),N=[R,q,I],e1=n({name:"CloudDownloadOutline",render:function(s,l){return o(),e("svg",F,N)}}),U={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},G=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),J=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),K=[G,J],r1=n({name:"CompassOutline",render:function(s,l){return o(),e("svg",U,K)}}),W={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 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),X=t("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32",d:"M69 153.99l187 110l187-110"},null,-1),Y=t("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32",d:"M256 463.99v-200"},null,-1),Z=[Q,X,Y],s1=n({name:"CubeOutline",render:function(s,l){return o(),e("svg",W,Z)}}),tt={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},nt=i('',5),ot=[nt],l1=n({name:"EyeOffOutline",render:function(s,l){return o(),e("svg",tt,ot)}}),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:"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),st=t("circle",{cx:"256",cy:"256",r:"80",fill:"none",stroke:"currentColor","stroke-miterlimit":"10","stroke-width":"32"},null,-1),lt=[rt,st],i1=n({name:"EyeOutline",render:function(s,l){return o(),e("svg",et,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:"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),ht=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),dt=[ct,ht],c1=n({name:"FlameOutline",render:function(s,l){return o(),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:"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),ut=[wt],h1=n({name:"Heart",render:function(s,l){return o(),e("svg",at,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:"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),pt=[kt],d1=n({name:"HeartOutline",render:function(s,l){return o(),e("svg",_t,pt)}}),xt={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},mt=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),gt=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),vt=t("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32",d:"M400 179V64h-48v69"},null,-1),$t=[mt,gt,vt],a1=n({name:"HomeOutline",render:function(s,l){return o(),e("svg",xt,$t)}}),ft={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},Ct=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),Mt=t("circle",{cx:"336",cy:"176",r:"32",fill:"none",stroke:"currentColor","stroke-miterlimit":"10","stroke-width":"32"},null,-1),Ot=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),zt=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),jt=[Ct,Mt,Ot,zt],w1=n({name:"ImageOutline",render:function(s,l){return o(),e("svg",ft,jt)}}),Bt={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},Lt=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),Ht=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),Vt=[Lt,Ht],u1=n({name:"LeafOutline",render:function(s,l){return o(),e("svg",Bt,Vt)}}),At={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},bt=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),yt=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),Pt=t("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"36",d:"M163.29 256h187.42"},null,-1),Tt=[bt,yt,Pt],_1=n({name:"LinkOutline",render:function(s,l){return o(),e("svg",At,Tt)}}),Dt={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},St=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),Et=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),Ft=[St,Et],k1=n({name:"LockClosedOutline",render:function(s,l){return o(),e("svg",Dt,Ft)}}),Rt={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 112a80 80 0 0 0-160 0v96",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],p1=n({name:"LockOpenOutline",render:function(s,l){return o(),e("svg",Rt,Nt)}}),Ut={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},Gt=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),Jt=t("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32",d:"M368 336l80-80l-80-80"},null,-1),Kt=t("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32",d:"M176 256h256"},null,-1),Wt=[Gt,Jt,Kt],x1=n({name:"LogOutOutline",render:function(s,l){return o(),e("svg",Ut,Wt)}}),Qt={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},Xt=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),Yt=[Xt],m1=n({name:"LogoAlipay",render:function(s,l){return o(),e("svg",Qt,Yt)}}),Zt={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},tn=i('',6),nn=[tn],g1=n({name:"MegaphoneOutline",render:function(s,l){return o(),e("svg",Zt,nn)}}),on={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},en=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),rn=t("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32",d:"M460 52L227 285"},null,-1),sn=[en,rn],v1=n({name:"PaperPlaneOutline",render:function(s,l){return o(),e("svg",on,sn)}}),ln={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},cn=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),hn=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),dn=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),an=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),wn=[cn,hn,dn,an],$1=n({name:"PeopleOutline",render:function(s,l){return o(),e("svg",ln,wn)}}),un={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),kn=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),pn=t("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32",d:"M88 176v112"},null,-1),xn=t("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32",d:"M144 232H32"},null,-1),mn=[_n,kn,pn,xn],f1=n({name:"PersonAddOutline",render:function(s,l){return o(),e("svg",un,mn)}}),gn={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},vn=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),$n=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),fn=[vn,$n],C1=n({name:"PersonOutline",render:function(s,l){return o(),e("svg",gn,fn)}}),Cn={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},Mn=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),On=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),zn=t("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32",d:"M144 232H32"},null,-1),jn=[Mn,On,zn],M1=n({name:"PersonRemoveOutline",render:function(s,l){return o(),e("svg",Cn,jn)}}),Bn={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},Ln=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),Hn=t("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32",d:"M176 240l80-80l80 80"},null,-1),Vn=t("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32",d:"M256 464V176"},null,-1),An=[Ln,Hn,Vn],O1=n({name:"PushOutline",render:function(s,l){return o(),e("svg",Bn,An)}}),bn={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},yn=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),Pn=[yn],z1=n({name:"Search",render:function(s,l){return o(),e("svg",bn,Pn)}}),Tn={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},Dn=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),Sn=[Dn],j1=n({name:"SettingsOutline",render:function(s,l){return o(),e("svg",Tn,Sn)}}),En={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},Fn=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),Rn=t("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32",d:"M336 128l-80-80l-80 80"},null,-1),qn=t("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32",d:"M256 321V48"},null,-1),In=[Fn,Rn,qn],B1=n({name:"ShareOutline",render:function(s,l){return o(),e("svg",En,In)}}),Nn={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},Un=i('',5),Gn=[Un],L1=n({name:"ShareSocialOutline",render:function(s,l){return o(),e("svg",Nn,Gn)}}),Jn={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},Kn=i('',6),Wn=[Kn],H1=n({name:"TrashOutline",render:function(s,l){return o(),e("svg",Jn,Wn)}}),Qn={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},Xn=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),Yn=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),Zn=[Xn,Yn],V1=n({name:"VideocamOutline",render:function(s,l){return o(),e("svg",Qn,Zn)}}),to={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},no=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),oo=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),eo=t("path",{d:"M368 320a32 32 0 1 1 32-32a32 32 0 0 1-32 32z",fill:"currentColor"},null,-1),ro=[no,oo,eo],A1=n({name:"WalletOutline",render:function(s,l){return o(),e("svg",to,ro)}}),so={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},lo=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),io=[lo],b1=n({name:"Edit",render:function(s,l){return o(),e("svg",so,io)}}),co={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},ho=i('',1),ao=[ho],y1=n({name:"Hash",render:function(s,l){return o(),e("svg",co,ao)}}),wo={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},uo=i('',1),_o=[uo],P1=n({name:"Trash",render:function(s,l){return o(),e("svg",wo,_o)}}),ko={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},po=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),xo=[po],T1=n({name:"ChevronLeftRound",render:function(s,l){return o(),e("svg",ko,xo)}}),mo={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},go=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),vo=[go],D1=n({name:"DarkModeOutlined",render:function(s,l){return o(),e("svg",mo,vo)}}),$o={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},fo=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),Co=[fo],S1=n({name:"DehazeRound",render:function(s,l){return o(),e("svg",$o,Co)}}),Mo={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},Oo=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),zo=[Oo],E1=n({name:"LightModeOutlined",render:function(s,l){return o(),e("svg",Mo,zo)}}),jo={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},Bo=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),Lo=[Bo],F1=n({name:"MoreHorizFilled",render:function(s,l){return o(),e("svg",jo,Lo)}}),Ho={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},Vo=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),Ao=[Vo],R1=n({name:"MoreVertOutlined",render:function(s,l){return o(),e("svg",Ho,Ao)}}),bo={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},yo=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),Po=[yo],q1=n({name:"ThumbDownOutlined",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",{opacity:".3",d:"M3 12v2h9l-1.34 5.34L15 15V5H6z",fill:"currentColor"},null,-1),So=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),Eo=[Do,So],I1=n({name:"ThumbDownTwotone",render:function(s,l){return o(),e("svg",To,Eo)}}),Fo={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},Ro=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),qo=[Ro],N1=n({name:"ThumbUpOutlined",render:function(s,l){return o(),e("svg",Fo,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",{opacity:".3",d:"M21 12v-2h-9l1.34-5.34L9 9v10h9z",fill:"currentColor"},null,-1),Uo=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),Go=[No,Uo],U1=n({name:"ThumbUpTwotone",render:function(s,l){return o(),e("svg",Io,Go)}});export{Ko as A,Xo as B,Zo as C,B1 as D,i1 as E,c1 as F,n1 as G,a1 as H,w1 as I,o1 as J,t1 as K,u1 as L,g1 as M,_1 as N,e1 as O,$1 as P,m1 as Q,b1 as R,z1 as S,P1 as T,S1 as U,V1 as V,A1 as W,T1 as X,E1 as Y,D1 as Z,j1 as a,y1 as b,x1 as c,r1 as d,N1 as e,U1 as f,q1 as g,I1 as h,F1 as i,d1 as j,h1 as k,Yo as l,Qo as m,Wo as n,L1 as o,H1 as p,k1 as q,p1 as r,O1 as s,l1 as t,C1 as u,R1 as v,v1 as w,s1 as x,M1 as y,f1 as z}; diff --git a/web/dist/assets/Anouncement-f7d9f626.js b/web/dist/assets/Anouncement-d8a4b6a4.js similarity index 85% rename from web/dist/assets/Anouncement-f7d9f626.js rename to web/dist/assets/Anouncement-d8a4b6a4.js index 5ef6d2b0..4351fc76 100644 --- a/web/dist/assets/Anouncement-f7d9f626.js +++ b/web/dist/assets/Anouncement-d8a4b6a4.js @@ -1 +1 @@ -import{_ as F}from"./post-skeleton-949f6995.js";import{_ as N}from"./main-nav.vue_vue_type_style_index_0_lang-e28257cc.js";import{u as V}from"./vuex-473b3783.js";import{b as z}from"./vue-router-b8e3382f.js";import{a as A}from"./formatTime-cdf4e6f1.js";import{d as R,r as n,j as S,c as o,V as a,a1 as p,o as e,_ as u,O as l,F as I,a4 as L,Q as M,a as s,M as _,L as O}from"./@vue-e0e89260.js";import{F as P,G as j,I as q,H as D}from"./naive-ui-62663ad7.js";import{_ as E}from"./index-a0347e1a.js";import"./vooks-a50491fd.js";import"./evtd-b614532e.js";import"./@vicons-8f91201d.js";import"./moment-2ab8298d.js";import"./seemly-76b7b838.js";import"./vueuc-59ca65c3.js";import"./@css-render-580d83ec.js";import"./vdirs-b0483831.js";import"./@juggle-41516555.js";import"./css-render-6a5c5852.js";import"./@emotion-8a8e73f6.js";import"./lodash-es-8412e618.js";import"./treemate-25c27bff.js";import"./async-validator-dee29e8b.js";import"./date-fns-975a2d8f.js";import"./axios-4a70c6fc.js";/* empty css */const G={key:0,class:"pagination-wrap"},H={key:0,class:"skeleton-wrap"},Q={key:1},T={key:0,class:"empty-wrap"},U={class:"bill-line"},$=R({__name:"Anouncement",setup(J){const d=V(),g=z(),v=n(!1),r=n([]),i=n(+g.query.p||1),f=n(20),c=n(0),h=m=>{i.value=m};return S(()=>{}),(m,K)=>{const y=N,k=j,x=F,w=q,B=D,C=P;return e(),o("div",null,[a(y,{title:"公告"}),a(C,{class:"main-content-wrap",bordered:""},{footer:p(()=>[c.value>1?(e(),o("div",G,[a(k,{page:i.value,"onUpdate:page":h,"page-slot":u(d).state.collapsedRight?5:8,"page-count":c.value},null,8,["page","page-slot","page-count"])])):l("",!0)]),default:p(()=>[v.value?(e(),o("div",H,[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(I,null,L(r.value,t=>(e(),M(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:O({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(A)(t.created_on)),1)])]),_:2},1024))),128))]))]),_:1})])}}});const kt=E($,[["__scopeId","data-v-d4d04859"]]);export{kt as default}; +import{_ as F}from"./post-skeleton-c0397381.js";import{_ as N}from"./main-nav.vue_vue_type_style_index_0_lang-db217db0.js";import{u as V}from"./vuex-473b3783.js";import{b as z}from"./vue-router-b8e3382f.js";import{a as A}from"./formatTime-4210fcd1.js";import{d as R,r as n,j as S,c as o,V as a,a1 as p,o as e,_ as u,O as l,F as I,a4 as L,Q as M,a as s,M as _,L as O}from"./@vue-e0e89260.js";import{F as P,G as j,I as q,H as D}from"./naive-ui-62663ad7.js";import{_ as E}from"./index-479e9ef6.js";import"./vooks-a50491fd.js";import"./evtd-b614532e.js";import"./@vicons-0524c43e.js";import"./moment-2ab8298d.js";import"./seemly-76b7b838.js";import"./vueuc-59ca65c3.js";import"./@css-render-580d83ec.js";import"./vdirs-b0483831.js";import"./@juggle-41516555.js";import"./css-render-6a5c5852.js";import"./@emotion-8a8e73f6.js";import"./lodash-es-8412e618.js";import"./treemate-25c27bff.js";import"./async-validator-dee29e8b.js";import"./date-fns-975a2d8f.js";import"./axios-4a70c6fc.js";/* empty css */const G={key:0,class:"pagination-wrap"},H={key:0,class:"skeleton-wrap"},Q={key:1},T={key:0,class:"empty-wrap"},U={class:"bill-line"},$=R({__name:"Anouncement",setup(J){const d=V(),g=z(),v=n(!1),r=n([]),i=n(+g.query.p||1),f=n(20),c=n(0),h=m=>{i.value=m};return S(()=>{}),(m,K)=>{const y=N,k=j,x=F,w=q,B=D,C=P;return e(),o("div",null,[a(y,{title:"公告"}),a(C,{class:"main-content-wrap",bordered:""},{footer:p(()=>[c.value>1?(e(),o("div",G,[a(k,{page:i.value,"onUpdate:page":h,"page-slot":u(d).state.collapsedRight?5:8,"page-count":c.value},null,8,["page","page-slot","page-count"])])):l("",!0)]),default:p(()=>[v.value?(e(),o("div",H,[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(I,null,L(r.value,t=>(e(),M(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:O({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(A)(t.created_on)),1)])]),_:2},1024))),128))]))]),_:1})])}}});const kt=E($,[["__scopeId","data-v-d4d04859"]]);export{kt as default}; diff --git a/web/dist/assets/Collection-0ddbbc4b.js b/web/dist/assets/Collection-0ddbbc4b.js new file mode 100644 index 00000000..b228f773 --- /dev/null +++ b/web/dist/assets/Collection-0ddbbc4b.js @@ -0,0 +1 @@ +import{_ as N,a as P}from"./post-item.vue_vue_type_style_index_0_lang-724e3b2f.js";import{_ as S}from"./post-skeleton-c0397381.js";import{_ as V}from"./main-nav.vue_vue_type_style_index_0_lang-db217db0.js";import{u as $}from"./vuex-473b3783.js";import{b as I}from"./vue-router-b8e3382f.js";import{N as R,_ as j}from"./index-479e9ef6.js";import{d as q,r as s,j as E,c as o,V as e,a1 as c,_ as g,O as v,o as t,F as f,a4 as h,Q as k}from"./@vue-e0e89260.js";import{F as G,G as H,I as L,H as O}from"./naive-ui-62663ad7.js";import"./content-ffcf943b.js";import"./@vicons-0524c43e.js";import"./paopao-video-player-aa5e8b3f.js";import"./formatTime-4210fcd1.js";import"./moment-2ab8298d.js";import"./copy-to-clipboard-1dd3075d.js";import"./toggle-selection-93f4ad84.js";import"./vooks-a50491fd.js";import"./evtd-b614532e.js";import"./axios-4a70c6fc.js";/* empty css */import"./seemly-76b7b838.js";import"./vueuc-59ca65c3.js";import"./@css-render-580d83ec.js";import"./vdirs-b0483831.js";import"./@juggle-41516555.js";import"./css-render-6a5c5852.js";import"./@emotion-8a8e73f6.js";import"./lodash-es-8412e618.js";import"./treemate-25c27bff.js";import"./async-validator-dee29e8b.js";import"./date-fns-975a2d8f.js";const Q={key:0,class:"skeleton-wrap"},T={key:1},U={key:0,class:"empty-wrap"},A={key:1},D={key:2},J={key:0,class:"pagination-wrap"},K=q({__name:"Collection",setup(W){const m=$(),y=I(),_=s(!1),i=s([]),p=s(+y.query.p||1),l=s(20),r=s(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 E(()=>{u()}),(n,X)=>{const C=V,b=S,x=L,z=N,d=O,B=P,F=G,M=H;return t(),o("div",null,[e(C,{title:"收藏"}),e(F,{class:"main-content-wrap",bordered:""},{default:c(()=>[_.value?(t(),o("div",Q,[e(b,{num:l.value},null,8,["num"])])):(t(),o("div",T,[i.value.length===0?(t(),o("div",U,[e(x,{size:"large",description:"暂无数据"})])):v("",!0),g(m).state.desktopModelShow?(t(),o("div",A,[(t(!0),o(f,null,h(i.value,a=>(t(),k(d,{key:a.id},{default:c(()=>[e(z,{post:a},null,8,["post"])]),_:2},1024))),128))])):(t(),o("div",D,[(t(!0),o(f,null,h(i.value,a=>(t(),k(d,{key:a.id},{default:c(()=>[e(B,{post:a},null,8,["post"])]),_:2},1024))),128))]))]))]),_:1}),r.value>0?(t(),o("div",J,[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 Mt=j(K,[["__scopeId","data-v-a5302c9b"]]);export{Mt as default}; diff --git a/web/dist/assets/Collection-17e15f34.js b/web/dist/assets/Collection-17e15f34.js deleted file mode 100644 index 6d038ad1..00000000 --- a/web/dist/assets/Collection-17e15f34.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as P,a as S}from"./post-item.vue_vue_type_style_index_0_lang-6f0e8ce9.js";import{_ as V}from"./post-skeleton-949f6995.js";import{_ as $}from"./main-nav.vue_vue_type_style_index_0_lang-e28257cc.js";import{u as I}from"./vuex-473b3783.js";import{b as L}from"./vue-router-b8e3382f.js";import{L as N,_ as R}from"./index-a0347e1a.js";import{d as j,r as s,j as q,c as o,V as e,a1 as c,_ as g,O as v,o as t,F as f,a4 as h,Q as k}from"./@vue-e0e89260.js";import{F as E,G,I as H,H as O}from"./naive-ui-62663ad7.js";import"./content-5d77464b.js";import"./@vicons-8f91201d.js";import"./paopao-video-player-aa5e8b3f.js";import"./formatTime-cdf4e6f1.js";import"./moment-2ab8298d.js";import"./copy-to-clipboard-1dd3075d.js";import"./toggle-selection-93f4ad84.js";import"./vooks-a50491fd.js";import"./evtd-b614532e.js";import"./axios-4a70c6fc.js";/* empty css */import"./seemly-76b7b838.js";import"./vueuc-59ca65c3.js";import"./@css-render-580d83ec.js";import"./vdirs-b0483831.js";import"./@juggle-41516555.js";import"./css-render-6a5c5852.js";import"./@emotion-8a8e73f6.js";import"./lodash-es-8412e618.js";import"./treemate-25c27bff.js";import"./async-validator-dee29e8b.js";import"./date-fns-975a2d8f.js";const Q={key:0,class:"skeleton-wrap"},T={key:1},U={key:0,class:"empty-wrap"},A={key:1},D={key:2},J={key:0,class:"pagination-wrap"},K=j({__name:"Collection",setup(W){const m=I(),y=L(),_=s(!1),i=s([]),p=s(+y.query.p||1),l=s(20),r=s(0),u=()=>{_.value=!0,N({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 q(()=>{u()}),(n,X)=>{const C=$,b=V,x=H,z=P,d=O,B=S,F=E,M=G;return t(),o("div",null,[e(C,{title:"收藏"}),e(F,{class:"main-content-wrap",bordered:""},{default:c(()=>[_.value?(t(),o("div",Q,[e(b,{num:l.value},null,8,["num"])])):(t(),o("div",T,[i.value.length===0?(t(),o("div",U,[e(x,{size:"large",description:"暂无数据"})])):v("",!0),g(m).state.desktopModelShow?(t(),o("div",A,[(t(!0),o(f,null,h(i.value,a=>(t(),k(d,{key:a.id},{default:c(()=>[e(z,{post:a},null,8,["post"])]),_:2},1024))),128))])):(t(),o("div",D,[(t(!0),o(f,null,h(i.value,a=>(t(),k(d,{key:a.id},{default:c(()=>[e(B,{post:a},null,8,["post"])]),_:2},1024))),128))]))]))]),_:1}),r.value>0?(t(),o("div",J,[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 Mt=R(K,[["__scopeId","data-v-a5302c9b"]]);export{Mt as default}; diff --git a/web/dist/assets/Contacts-23e8ea1b.js b/web/dist/assets/Contacts-1f6995dc.js similarity index 83% rename from web/dist/assets/Contacts-23e8ea1b.js rename to web/dist/assets/Contacts-1f6995dc.js index 95a73e86..3cd9dbc2 100644 --- a/web/dist/assets/Contacts-23e8ea1b.js +++ b/web/dist/assets/Contacts-1f6995dc.js @@ -1 +1 @@ -import{u as N,b as P}from"./vue-router-b8e3382f.js";import{d as k,o as e,c as n,a as s,V as a,M as d,r as c,j as R,a1 as f,_ as S,O as h,F as y,a4 as U,Q as q}from"./@vue-e0e89260.js";import{o as x,F as D,G as O,I as T,H as j}from"./naive-ui-62663ad7.js";import{_ as b,O as E}from"./index-a0347e1a.js";import{_ as G}from"./post-skeleton-949f6995.js";import{_ as H}from"./main-nav.vue_vue_type_style_index_0_lang-e28257cc.js";import{u as L}from"./vuex-473b3783.js";import"./seemly-76b7b838.js";import"./vueuc-59ca65c3.js";import"./evtd-b614532e.js";import"./@css-render-580d83ec.js";import"./vooks-a50491fd.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-8f91201d.js";/* empty css */const Q={class:"avatar"},A={class:"base-info"},J={class:"username"},K={class:"uid"},W=k({__name:"contact-item",props:{contact:{}},setup(C){const l=N(),u=t=>{l.push({name:"user",query:{s:t}})};return(t,o)=>{const _=x;return e(),n("div",{class:"contact-item",onClick:o[0]||(o[0]=r=>u(t.contact.username))},[s("div",Q,[a(_,{size:"large",src:t.contact.avatar},null,8,["src"])]),s("div",A,[s("div",J,[s("strong",null,d(t.contact.nickname),1),s("span",null," @"+d(t.contact.username),1)]),s("div",K,"UID. "+d(t.contact.user_id),1)])])}}});const X=b(W,[["__scopeId","data-v-0f1bf4ae"]]),Y={key:0,class:"skeleton-wrap"},Z={key:1},tt={key:0,class:"empty-wrap"},et={key:0,class:"pagination-wrap"},ot=k({__name:"Contacts",setup(C){const l=L(),u=P(),t=c(!1),o=c([]),_=c(+u.query.p||1),r=c(20),m=c(0),w=i=>{_.value=i,v()};R(()=>{v()});const v=(i=!1)=>{o.value.length===0&&(t.value=!0),E({page:_.value,page_size:r.value}).then(p=>{t.value=!1,o.value=p.list,m.value=Math.ceil(p.pager.total_rows/r.value),i&&setTimeout(()=>{window.scrollTo(0,99999)},50)}).catch(p=>{t.value=!1})};return(i,p)=>{const $=H,I=G,z=T,B=X,V=j,F=D,M=O;return e(),n(y,null,[s("div",null,[a($,{title:"好友"}),a(F,{class:"main-content-wrap",bordered:""},{default:f(()=>[t.value?(e(),n("div",Y,[a(I,{num:r.value},null,8,["num"])])):(e(),n("div",Z,[o.value.length===0?(e(),n("div",tt,[a(z,{size:"large",description:"暂无数据"})])):h("",!0),(e(!0),n(y,null,U(o.value,g=>(e(),q(V,{key:g.user_id},{default:f(()=>[a(B,{contact:g},null,8,["contact"])]),_:2},1024))),128))]))]),_:1})]),m.value>0?(e(),n("div",et,[a(M,{page:_.value,"onUpdate:page":w,"page-slot":S(l).state.collapsedRight?5:8,"page-count":m.value},null,8,["page","page-slot","page-count"])])):h("",!0)],64)}}});const zt=b(ot,[["__scopeId","data-v-3b2bf978"]]);export{zt as default}; +import{u as N,b as P}from"./vue-router-b8e3382f.js";import{d as k,o as e,c as n,a as s,V as a,M as d,r as c,j as R,a1 as f,_ as S,O as h,F as y,a4 as U,Q as q}from"./@vue-e0e89260.js";import{o as x,F as D,G as Q,I as T,H as j}from"./naive-ui-62663ad7.js";import{_ as b,Q as E}from"./index-479e9ef6.js";import{_ as G}from"./post-skeleton-c0397381.js";import{_ as H}from"./main-nav.vue_vue_type_style_index_0_lang-db217db0.js";import{u as L}from"./vuex-473b3783.js";import"./seemly-76b7b838.js";import"./vueuc-59ca65c3.js";import"./evtd-b614532e.js";import"./@css-render-580d83ec.js";import"./vooks-a50491fd.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-0524c43e.js";/* empty css */const O={class:"avatar"},A={class:"base-info"},J={class:"username"},K={class:"uid"},W=k({__name:"contact-item",props:{contact:{}},setup(C){const l=N(),u=t=>{l.push({name:"user",query:{s:t}})};return(t,o)=>{const _=x;return e(),n("div",{class:"contact-item",onClick:o[0]||(o[0]=r=>u(t.contact.username))},[s("div",O,[a(_,{size:"large",src:t.contact.avatar},null,8,["src"])]),s("div",A,[s("div",J,[s("strong",null,d(t.contact.nickname),1),s("span",null," @"+d(t.contact.username),1)]),s("div",K,"UID. "+d(t.contact.user_id),1)])])}}});const X=b(W,[["__scopeId","data-v-0f1bf4ae"]]),Y={key:0,class:"skeleton-wrap"},Z={key:1},tt={key:0,class:"empty-wrap"},et={key:0,class:"pagination-wrap"},ot=k({__name:"Contacts",setup(C){const l=L(),u=P(),t=c(!1),o=c([]),_=c(+u.query.p||1),r=c(20),m=c(0),w=i=>{_.value=i,v()};R(()=>{v()});const v=(i=!1)=>{o.value.length===0&&(t.value=!0),E({page:_.value,page_size:r.value}).then(p=>{t.value=!1,o.value=p.list,m.value=Math.ceil(p.pager.total_rows/r.value),i&&setTimeout(()=>{window.scrollTo(0,99999)},50)}).catch(p=>{t.value=!1})};return(i,p)=>{const $=H,I=G,z=T,B=X,V=j,F=D,M=Q;return e(),n(y,null,[s("div",null,[a($,{title:"好友"}),a(F,{class:"main-content-wrap",bordered:""},{default:f(()=>[t.value?(e(),n("div",Y,[a(I,{num:r.value},null,8,["num"])])):(e(),n("div",Z,[o.value.length===0?(e(),n("div",tt,[a(z,{size:"large",description:"暂无数据"})])):h("",!0),(e(!0),n(y,null,U(o.value,g=>(e(),q(V,{key:g.user_id},{default:f(()=>[a(B,{contact:g},null,8,["contact"])]),_:2},1024))),128))]))]),_:1})]),m.value>0?(e(),n("div",et,[a(M,{page:_.value,"onUpdate:page":w,"page-slot":S(l).state.collapsedRight?5:8,"page-count":m.value},null,8,["page","page-slot","page-count"])])):h("",!0)],64)}}});const zt=b(ot,[["__scopeId","data-v-3b2bf978"]]);export{zt as default}; diff --git a/web/dist/assets/Following-61c6e03a.js b/web/dist/assets/Following-61c6e03a.js new file mode 100644 index 00000000..19b76cce --- /dev/null +++ b/web/dist/assets/Following-61c6e03a.js @@ -0,0 +1 @@ +import{u as j,b as E}from"./vue-router-b8e3382f.js";import{d as q,o as s,c as l,a as _,V as o,M as h,r as c,j as G,_ as F,a1 as y,O as $,F as U,a4 as H,Q as L}from"./@vue-e0e89260.js";import{o as O,F as Q,G as A,f as J,g as K,I as W,H as X}from"./naive-ui-62663ad7.js";import{_ as z,R as Y,S as Z}from"./index-479e9ef6.js";import{_ as ee}from"./post-skeleton-c0397381.js";import{_ as oe}from"./main-nav.vue_vue_type_style_index_0_lang-db217db0.js";import{u as te}from"./vuex-473b3783.js";import"./seemly-76b7b838.js";import"./vueuc-59ca65c3.js";import"./evtd-b614532e.js";import"./@css-render-580d83ec.js";import"./vooks-a50491fd.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-0524c43e.js";/* empty css */const ne={class:"avatar"},ae={class:"base-info"},se={class:"username"},le={class:"uid"},_e=q({__name:"follow-item",props:{contact:{}},setup(I){const v=j(),u=e=>{v.push({name:"user",query:{s:e}})};return(e,t)=>{const g=O;return s(),l("div",{class:"follow-item",onClick:t[0]||(t[0]=f=>u(e.contact.username))},[_("div",ne,[o(g,{size:"large",src:e.contact.avatar},null,8,["src"])]),_("div",ae,[_("div",se,[_("strong",null,h(e.contact.nickname),1),_("span",null," @"+h(e.contact.username),1)]),_("div",le,"UID. "+h(e.contact.user_id),1)])])}}});const ue=z(_e,[["__scopeId","data-v-6e07cba3"]]),ce={key:0,class:"skeleton-wrap"},ie={key:1},re={key:0,class:"empty-wrap"},pe={key:0,class:"pagination-wrap"},me=q({__name:"Following",setup(I){const v=te(),u=E(),e=c(!1),t=c([]),g=u.query.n||"粉丝详情",f=u.query.s||"",r=c(u.query.t||"follows"),p=c(+u.query.p||1),i=c(20),m=c(0),T=a=>{p.value=a,w()},B=a=>{r.value=a,w()},w=()=>{r.value==="follows"?C(f):r.value==="followings"&&M(f)},C=(a,d=!1)=>{t.value.length===0&&(e.value=!0),Y({username:a,page:p.value,page_size:i.value}).then(n=>{e.value=!1,t.value=n.list||[],m.value=Math.ceil(n.pager.total_rows/i.value),d&&setTimeout(()=>{window.scrollTo(0,99999)},50)}).catch(n=>{e.value=!1})},M=(a,d=!1)=>{t.value.length===0&&(e.value=!0),Z({username:a,page:p.value,page_size:i.value}).then(n=>{e.value=!1,t.value=n.list||[],m.value=Math.ceil(n.pager.total_rows/i.value),d&&setTimeout(()=>{window.scrollTo(0,99999)},50)}).catch(n=>{e.value=!1})};return G(()=>{w()}),(a,d)=>{const n=oe,k=J,P=K,R=ee,S=W,V=ue,N=X,x=Q,D=A;return s(),l(U,null,[_("div",null,[o(n,{title:F(g),back:!0},null,8,["title"]),o(x,{class:"main-content-wrap",bordered:""},{default:y(()=>[o(P,{type:"line",animated:"","default-value":r.value,"onUpdate:value":B},{default:y(()=>[o(k,{name:"follows",tab:"正在关注"}),o(k,{name:"followings",tab:"我的粉丝"})]),_:1},8,["default-value"]),e.value?(s(),l("div",ce,[o(R,{num:i.value},null,8,["num"])])):(s(),l("div",ie,[t.value.length===0?(s(),l("div",re,[o(S,{size:"large",description:"暂无数据"})])):$("",!0),(s(!0),l(U,null,H(t.value,b=>(s(),L(N,{key:b.user_id},{default:y(()=>[o(V,{contact:b},null,8,["contact"])]),_:2},1024))),128))]))]),_:1})]),m.value>0?(s(),l("div",pe,[o(D,{page:p.value,"onUpdate:page":T,"page-slot":F(v).state.collapsedRight?5:8,"page-count":m.value},null,8,["page","page-slot","page-count"])])):$("",!0)],64)}}});const Ne=z(me,[["__scopeId","data-v-1f0f223d"]]);export{Ne as default}; diff --git a/web/dist/assets/Following-6d2abd0f.css b/web/dist/assets/Following-6d2abd0f.css new file mode 100644 index 00000000..23d172c2 --- /dev/null +++ b/web/dist/assets/Following-6d2abd0f.css @@ -0,0 +1 @@ +.follow-item[data-v-6e07cba3]{display:flex;width:100%;padding:12px 16px}.follow-item[data-v-6e07cba3]:hover{background:#f7f9f9;cursor:pointer}.follow-item .avatar[data-v-6e07cba3]{width:55px}.follow-item .base-info[data-v-6e07cba3]{position:relative;width:calc(100% - 55px)}.follow-item .base-info .username[data-v-6e07cba3]{line-height:16px;font-size:16px}.follow-item .base-info .uid[data-v-6e07cba3]{font-size:14px;line-height:14px;margin-top:10px;opacity:.75}.dark .follow-item[data-v-6e07cba3]{background-color:#101014bf}.dark .follow-item[data-v-6e07cba3]:hover{background:#18181c}.main-content-wrap[data-v-1f0f223d]{padding:20px}.pagination-wrap[data-v-1f0f223d]{padding:10px;display:flex;justify-content:center;overflow:hidden}.dark .main-content-wrap[data-v-1f0f223d],.dark .empty-wrap[data-v-1f0f223d],.dark .skeleton-wrap[data-v-1f0f223d]{background-color:#101014bf} diff --git a/web/dist/assets/Home-52e33bab.js b/web/dist/assets/Home-cf2e8d24.js similarity index 96% rename from web/dist/assets/Home-52e33bab.js rename to web/dist/assets/Home-cf2e8d24.js index 196a9a0b..c0a6cd50 100644 --- a/web/dist/assets/Home-52e33bab.js +++ b/web/dist/assets/Home-cf2e8d24.js @@ -1 +1 @@ -import{_ as Te,a as qe}from"./post-item.vue_vue_type_style_index_0_lang-6f0e8ce9.js";import{_ as xe}from"./post-skeleton-949f6995.js";import{d as Y,r as i,j as ee,o as c,c as v,_ as $,a as x,V as a,a1 as s,Q as L,O as T,a2 as Z,e as S,M as X,F as K,a4 as J,n as Ie,w as ze}from"./@vue-e0e89260.js";import{u as te}from"./vuex-473b3783.js";import{l as W}from"./lodash-94eb5868.js";import{g as Ue,a as Re,c as Ae,b as Ee,_ as Pe}from"./index-a0347e1a.js";import{p as Se}from"./content-5d77464b.js";import{V as z,P as N}from"./IEnum-a180d93e.js";import{I as Le,V as Ve,A as Ne,d as Fe,E as Be}from"./@vicons-8f91201d.js";import{o as Me,v as Oe,j as je,e as De,w as He,x as Ge,y as Ke,z as Je,A as Qe,B as Ze,C as Xe,a as We,D as Ye,E as et,F as tt,G as at,H as ot,I as nt}from"./naive-ui-62663ad7.js";import{_ as st}from"./main-nav.vue_vue_type_style_index_0_lang-e28257cc.js";import{b as lt,u as it}from"./vue-router-b8e3382f.js";import"./formatTime-cdf4e6f1.js";import"./moment-2ab8298d.js";import"./copy-to-clipboard-1dd3075d.js";import"./toggle-selection-93f4ad84.js";import"./axios-4a70c6fc.js";/* empty css */import"./seemly-76b7b838.js";import"./vueuc-59ca65c3.js";import"./evtd-b614532e.js";import"./@css-render-580d83ec.js";import"./vooks-a50491fd.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-aa5e8b3f.js";const rt=F=>{const q=new FileReader,r=_=>["application/zip","application/x-zip","application/octet-stream","application/x-zip-compressed"].includes(_),I=()=>{const _=new Uint8Array(q.result).subarray(0,4);let d="";for(let p=0;p<_.length;p++)d+=_[p].toString(16);switch(d){case"504b0304":case"504b0506":case"504b0708":return r("application/zip");case"504b030414":return r("application/x-zip-compressed");case"504b0508":return r("application/x-zip");case"504b5370":return r("application/octet-stream");default:return!1}};return new Promise((_,d)=>{q.onloadend=()=>{const p=F.type;_(p===""||p==="application/octet-stream"?I():r(p))},q.readAsArrayBuffer(F.slice(0,4))})},ut={key:0,class:"compose-wrap"},ct={class:"compose-line"},pt={class:"compose-user"},_t={class:"compose-line compose-options"},dt={class:"attachment"},mt={class:"submit-wrap"},vt={class:"attachment-list-wrap"},gt={key:0,class:"attachment-price-wrap"},ft=x("span",null," 附件价格¥",-1),yt={key:0,class:"eye-wrap"},ht={key:1,class:"link-wrap"},wt={key:1,class:"compose-wrap"},bt=x("div",{class:"login-wrap"},[x("span",{class:"login-banner"}," 登录后,精彩更多")],-1),kt={key:0,class:"login-only-wrap"},Ct={key:1,class:"login-wrap"},$t=Y({__name:"compose",emits:["post-success"],setup(F,{emit:q}){const r=te(),I=i([]),_=i(!1),d=i(!1),p=i(!1),b=i(!1),w=i(""),U=i([]),E=i(),V=i(0),f=i("public/image"),u=i([]),h=i([]),k=i([]),y=i([]),C=i(z.FRIEND),R=i(z.FRIEND),M=[{value:z.PUBLIC,label:"公开"},{value:z.PRIVATE,label:"私密"},{value:z.FRIEND,label:"好友可见"}],P=+"400",B=i("true".toLowerCase()==="true"),O=i("true".toLowerCase()==="true"),j=i("true".toLowerCase()==="true"),A=i("false".toLowerCase()==="true"),ae=i("true".toLowerCase()==="true"),oe="/v1/attachment",Q=i(),ne=()=>{p.value=!p.value,p.value&&b.value&&(b.value=!1)},se=()=>{b.value=!b.value,b.value&&p.value&&(p.value=!1)},le=W.debounce(t=>{Ue({k:t}).then(e=>{let n=[];e.suggest.map(o=>{n.push({label:o,value:o})}),I.value=n,_.value=!1}).catch(e=>{_.value=!1})},200),ie=W.debounce(t=>{Re({k:t}).then(e=>{let n=[];e.suggest.map(o=>{n.push({label:o,value:o})}),I.value=n,_.value=!1}).catch(e=>{_.value=!1})},200),re=(t,e)=>{_.value||(_.value=!0,e==="@"?le(t):ie(t))},ue=t=>{t.length>P?w.value=t.substring(0,P):w.value=t},D=t=>{f.value=t},ce=t=>{for(let l=0;l30&&(t[l].name=n.substring(0,18)+"..."+n.substring(n.length-9)+"."+o)}u.value=t},pe=async t=>{var e,n,o,l,g;return f.value==="public/image"&&!["image/png","image/jpg","image/jpeg","image/gif"].includes((e=t.file.file)==null?void 0:e.type)?(window.$message.warning("图片仅允许 png/jpg/gif 格式"),!1):f.value==="image"&&((n=t.file.file)==null?void 0:n.size)>10485760?(window.$message.warning("图片大小不能超过10MB"),!1):f.value==="public/video"&&!["video/mp4","video/quicktime"].includes((o=t.file.file)==null?void 0:o.type)?(window.$message.warning("视频仅允许 mp4/mov 格式"),!1):f.value==="public/video"&&((l=t.file.file)==null?void 0:l.size)>104857600?(window.$message.warning("视频大小不能超过100MB"),!1):f.value==="attachment"&&!await rt(t.file.file)?(window.$message.warning("附件仅允许 zip 格式"),!1):f.value==="attachment"&&((g=t.file.file)==null?void 0:g.size)>104857600?(window.$message.warning("附件大小不能超过100MB"),!1):!0},_e=({file:t,event:e})=>{var n;try{let o=JSON.parse((n=e.target)==null?void 0:n.response);o.code===0&&(f.value==="public/image"&&h.value.push({id:t.id,content:o.data.content}),f.value==="public/video"&&k.value.push({id:t.id,content:o.data.content}),f.value==="attachment"&&y.value.push({id:t.id,content:o.data.content}))}catch{window.$message.error("上传失败")}},de=({file:t,event:e})=>{var n;try{let o=JSON.parse((n=e.target)==null?void 0:n.response);if(o.code!==0){let l=o.msg||"上传失败";o.details&&o.details.length>0&&o.details.map(g=>{l+=":"+g}),window.$message.error(l)}}catch{window.$message.error("上传失败")}},me=({file:t})=>{let e=h.value.findIndex(n=>n.id===t.id);e>-1&&h.value.splice(e,1),e=k.value.findIndex(n=>n.id===t.id),e>-1&&k.value.splice(e,1),e=y.value.findIndex(n=>n.id===t.id),e>-1&&y.value.splice(e,1)},ve=()=>{if(w.value.trim().length===0){window.$message.warning("请输入内容哦");return}let{tags:t,users:e}=Se(w.value);const n=[];let o=100;n.push({content:w.value,type:N.TEXT,sort:o}),h.value.map(l=>{o++,n.push({content:l.content,type:N.IMAGEURL,sort:o})}),k.value.map(l=>{o++,n.push({content:l.content,type:N.VIDEOURL,sort:o})}),y.value.map(l=>{o++,n.push({content:l.content,type:N.ATTACHMENT,sort:o})}),U.value.length>0&&U.value.map(l=>{o++,n.push({content:l,type:N.LINKURL,sort:o})}),d.value=!0,Ae({contents:n,tags:Array.from(new Set(t)),users:Array.from(new Set(e)),attachment_price:+V.value*100,visibility:C.value}).then(l=>{var g;window.$message.success("发布成功"),d.value=!1,q("post-success",l),p.value=!1,b.value=!1,(g=E.value)==null||g.clear(),u.value=[],w.value="",U.value=[],h.value=[],k.value=[],y.value=[],C.value=R.value}).catch(l=>{d.value=!1})},H=t=>{r.commit("triggerAuth",!0),r.commit("triggerAuthKey",t)};return ee(()=>{"friend".toLowerCase()==="friend"?R.value=z.FRIEND:"friend".toLowerCase()==="public"?R.value=z.PUBLIC:R.value=z.PRIVATE,C.value=R.value,Q.value="Bearer "+localStorage.getItem("PAOPAO_TOKEN")}),(t,e)=>{const n=Me,o=Oe,l=je,g=De,G=He,ge=Ge,fe=Ke,ye=Je,he=Qe,we=Ze,be=Xe,ke=We,Ce=Ye,$e=et;return c(),v("div",null,[$(r).state.userInfo.id>0?(c(),v("div",ut,[x("div",ct,[x("div",pt,[a(n,{round:"",size:30,src:$(r).state.userInfo.avatar},null,8,["src"])]),a(o,{type:"textarea",size:"large",autosize:"",bordered:!1,loading:_.value,value:w.value,prefix:["@","#"],options:I.value,onSearch:re,"onUpdate:value":ue,placeholder:"说说您的新鲜事..."},null,8,["loading","value","options"])]),a(we,{ref_key:"uploadRef",ref:E,abstract:"","list-type":"image",multiple:!0,max:9,action:oe,headers:{Authorization:Q.value},data:{type:f.value},"file-list":u.value,onBeforeUpload:pe,onFinish:_e,onError:de,onRemove:me,"onUpdate:fileList":ce},{default:s(()=>[x("div",_t,[x("div",dt,[a(G,{abstract:""},{default:s(({handleClick:m})=>[a(g,{disabled:u.value.length>0&&f.value==="public/video"||u.value.length===9,onClick:()=>{D("public/image"),m()},quaternary:"",circle:"",type:"primary"},{icon:s(()=>[a(l,{size:"20",color:"var(--primary-color)"},{default:s(()=>[a($(Le))]),_:1})]),_:2},1032,["disabled","onClick"])]),_:1}),O.value?(c(),L(G,{key:0,abstract:""},{default:s(({handleClick:m})=>[a(g,{disabled:u.value.length>0&&f.value!=="public/video"||u.value.length===9,onClick:()=>{D("public/video"),m()},quaternary:"",circle:"",type:"primary"},{icon:s(()=>[a(l,{size:"20",color:"var(--primary-color)"},{default:s(()=>[a($(Ve))]),_:1})]),_:2},1032,["disabled","onClick"])]),_:1})):T("",!0),j.value?(c(),L(G,{key:1,abstract:""},{default:s(({handleClick:m})=>[a(g,{disabled:u.value.length>0&&f.value==="public/video"||u.value.length===9,onClick:()=>{D("attachment"),m()},quaternary:"",circle:"",type:"primary"},{icon:s(()=>[a(l,{size:"20",color:"var(--primary-color)"},{default:s(()=>[a($(Ne))]),_:1})]),_:2},1032,["disabled","onClick"])]),_:1})):T("",!0),a(g,{quaternary:"",circle:"",type:"primary",onClick:Z(ne,["stop"])},{icon:s(()=>[a(l,{size:"20",color:"var(--primary-color)"},{default:s(()=>[a($(Fe))]),_:1})]),_:1},8,["onClick"]),ae.value?(c(),L(g,{key:2,quaternary:"",circle:"",type:"primary",onClick:Z(se,["stop"])},{icon:s(()=>[a(l,{size:"20",color:"var(--primary-color)"},{default:s(()=>[a($(Be))]),_:1})]),_:1},8,["onClick"])):T("",!0)]),x("div",mt,[a(fe,{trigger:"hover",placement:"bottom"},{trigger:s(()=>[a(ge,{class:"text-statistic",type:"circle","show-indicator":!1,status:"success","stroke-width":10,percentage:w.value.length/$(P)*100},null,8,["percentage"])]),default:s(()=>[S(" "+X(w.value.length)+" / "+X($(P)),1)]),_:1}),a(g,{loading:d.value,onClick:ve,type:"primary",secondary:"",round:""},{default:s(()=>[S(" 发布 ")]),_:1},8,["loading"])])]),x("div",vt,[a(ye),y.value.length>0?(c(),v("div",gt,[A.value?(c(),L(he,{key:0,value:V.value,"onUpdate:value":e[0]||(e[0]=m=>V.value=m),min:0,max:1e5,placeholder:"请输入附件价格,0为免费附件"},{prefix:s(()=>[ft]),_:1},8,["value"])):T("",!0)])):T("",!0)])]),_:1},8,["headers","data","file-list"]),b.value?(c(),v("div",yt,[a(Ce,{value:C.value,"onUpdate:value":e[1]||(e[1]=m=>C.value=m),name:"radiogroup"},{default:s(()=>[a(ke,null,{default:s(()=>[(c(),v(K,null,J(M,m=>a(be,{key:m.value,value:m.value,label:m.label},null,8,["value","label"])),64))]),_:1})]),_:1},8,["value"])])):T("",!0),p.value?(c(),v("div",ht,[a($e,{value:U.value,"onUpdate:value":e[2]||(e[2]=m=>U.value=m),placeholder:"请输入以http(s)://开头的链接",min:0,max:3},{"create-button-default":s(()=>[S(" 创建链接 ")]),_:1},8,["value"])])):T("",!0)])):(c(),v("div",wt,[bt,B.value?T("",!0):(c(),v("div",kt,[a(g,{strong:"",secondary:"",round:"",type:"primary",onClick:e[3]||(e[3]=m=>H("signin"))},{default:s(()=>[S(" 登录 ")]),_:1})])),B.value?(c(),v("div",Ct,[a(g,{strong:"",secondary:"",round:"",type:"primary",onClick:e[4]||(e[4]=m=>H("signin"))},{default:s(()=>[S(" 登录 ")]),_:1}),a(g,{strong:"",secondary:"",round:"",type:"info",onClick:e[5]||(e[5]=m=>H("signup"))},{default:s(()=>[S(" 注册 ")]),_:1})])):T("",!0)]))])}}});const Tt={key:0,class:"skeleton-wrap"},qt={key:1},xt={key:0,class:"empty-wrap"},It={key:1},zt={key:2},Ut={key:0,class:"pagination-wrap"},Rt=Y({__name:"Home",setup(F){const q=te(),r=lt(),I=it(),_=i(!1),d=i([]),p=i(+r.query.p||1),b=i(20),w=i(0),U=Ie(()=>{let u="泡泡广场";return r.query&&r.query.q&&(r.query.t&&r.query.t==="tag"?u="#"+decodeURIComponent(r.query.q):u="搜索: "+decodeURIComponent(r.query.q)),u}),E=()=>{_.value=!0,Ee({query:r.query.q?decodeURIComponent(r.query.q):null,type:r.query.t,page:p.value,page_size:b.value}).then(u=>{_.value=!1,d.value=u.list,w.value=Math.ceil(u.pager.total_rows/b.value),window.scrollTo(0,0)}).catch(u=>{_.value=!1})},V=u=>{if(p.value!=1){I.push({name:"post",query:{id:u.id}});return}let h=[],k=d.value.length;k==b.value&&k--;for(var y=0;y{I.push({name:"home",query:{...r.query,p:u}})};return ee(()=>{E()}),ze(()=>({path:r.path,query:r.query,refresh:q.state.refresh}),(u,h)=>{if(u.refresh!==h.refresh){p.value=+r.query.p||1,setTimeout(()=>{E()},0);return}h.path!=="/post"&&u.path==="/"&&(p.value=+r.query.p||1,setTimeout(()=>{E()},0))}),(u,h)=>{const k=st,y=$t,C=ot,R=xe,M=nt,P=Te,B=qe,O=tt,j=at;return c(),v("div",null,[a(k,{title:U.value},null,8,["title"]),a(O,{class:"main-content-wrap",bordered:""},{default:s(()=>[a(C,null,{default:s(()=>[a(y,{onPostSuccess:V})]),_:1}),_.value?(c(),v("div",Tt,[a(R,{num:b.value},null,8,["num"])])):(c(),v("div",qt,[d.value.length===0?(c(),v("div",xt,[a(M,{size:"large",description:"暂无数据"})])):T("",!0),$(q).state.desktopModelShow?(c(),v("div",It,[(c(!0),v(K,null,J(d.value,A=>(c(),L(C,{key:A.id},{default:s(()=>[a(P,{post:A},null,8,["post"])]),_:2},1024))),128))])):(c(),v("div",zt,[(c(!0),v(K,null,J(d.value,A=>(c(),L(C,{key:A.id},{default:s(()=>[a(B,{post:A},null,8,["post"])]),_:2},1024))),128))]))]))]),_:1}),w.value>0?(c(),v("div",Ut,[a(j,{page:p.value,"onUpdate:page":f,"page-slot":$(q).state.collapsedRight?5:8,"page-count":w.value},null,8,["page","page-slot","page-count"])])):T("",!0)])}}});const ca=Pe(Rt,[["__scopeId","data-v-f42b0645"]]);export{ca as default}; +import{_ as Te,a as qe}from"./post-item.vue_vue_type_style_index_0_lang-724e3b2f.js";import{_ as xe}from"./post-skeleton-c0397381.js";import{d as Y,r as i,j as ee,o as c,c as v,_ as $,a as x,V as a,a1 as s,Q as L,O as T,a2 as Z,e as S,M as X,F as K,a4 as J,n as Ie,w as ze}from"./@vue-e0e89260.js";import{u as te}from"./vuex-473b3783.js";import{l as W}from"./lodash-94eb5868.js";import{g as Ue,a as Re,c as Ae,b as Ee,_ as Pe}from"./index-479e9ef6.js";import{p as Se}from"./content-ffcf943b.js";import{V as z,P as N}from"./IEnum-a180d93e.js";import{I as Le,V as Ve,A as Ne,d as Fe,E as Be}from"./@vicons-0524c43e.js";import{o as Me,v as Oe,j as je,e as De,w as He,x as Ge,y as Ke,z as Je,A as Qe,B as Ze,C as Xe,a as We,D as Ye,E as et,F as tt,G as at,H as ot,I as nt}from"./naive-ui-62663ad7.js";import{_ as st}from"./main-nav.vue_vue_type_style_index_0_lang-db217db0.js";import{b as lt,u as it}from"./vue-router-b8e3382f.js";import"./formatTime-4210fcd1.js";import"./moment-2ab8298d.js";import"./copy-to-clipboard-1dd3075d.js";import"./toggle-selection-93f4ad84.js";import"./axios-4a70c6fc.js";/* empty css */import"./seemly-76b7b838.js";import"./vueuc-59ca65c3.js";import"./evtd-b614532e.js";import"./@css-render-580d83ec.js";import"./vooks-a50491fd.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-aa5e8b3f.js";const rt=F=>{const q=new FileReader,r=_=>["application/zip","application/x-zip","application/octet-stream","application/x-zip-compressed"].includes(_),I=()=>{const _=new Uint8Array(q.result).subarray(0,4);let d="";for(let p=0;p<_.length;p++)d+=_[p].toString(16);switch(d){case"504b0304":case"504b0506":case"504b0708":return r("application/zip");case"504b030414":return r("application/x-zip-compressed");case"504b0508":return r("application/x-zip");case"504b5370":return r("application/octet-stream");default:return!1}};return new Promise((_,d)=>{q.onloadend=()=>{const p=F.type;_(p===""||p==="application/octet-stream"?I():r(p))},q.readAsArrayBuffer(F.slice(0,4))})},ut={key:0,class:"compose-wrap"},ct={class:"compose-line"},pt={class:"compose-user"},_t={class:"compose-line compose-options"},dt={class:"attachment"},mt={class:"submit-wrap"},vt={class:"attachment-list-wrap"},gt={key:0,class:"attachment-price-wrap"},ft=x("span",null," 附件价格¥",-1),yt={key:0,class:"eye-wrap"},ht={key:1,class:"link-wrap"},wt={key:1,class:"compose-wrap"},bt=x("div",{class:"login-wrap"},[x("span",{class:"login-banner"}," 登录后,精彩更多")],-1),kt={key:0,class:"login-only-wrap"},Ct={key:1,class:"login-wrap"},$t=Y({__name:"compose",emits:["post-success"],setup(F,{emit:q}){const r=te(),I=i([]),_=i(!1),d=i(!1),p=i(!1),b=i(!1),w=i(""),U=i([]),E=i(),V=i(0),f=i("public/image"),u=i([]),h=i([]),k=i([]),y=i([]),C=i(z.FRIEND),R=i(z.FRIEND),M=[{value:z.PUBLIC,label:"公开"},{value:z.PRIVATE,label:"私密"},{value:z.FRIEND,label:"好友可见"}],P=+"400",B=i("true".toLowerCase()==="true"),O=i("true".toLowerCase()==="true"),j=i("true".toLowerCase()==="true"),A=i("false".toLowerCase()==="true"),ae=i("true".toLowerCase()==="true"),oe="/v1/attachment",Q=i(),ne=()=>{p.value=!p.value,p.value&&b.value&&(b.value=!1)},se=()=>{b.value=!b.value,b.value&&p.value&&(p.value=!1)},le=W.debounce(t=>{Ue({k:t}).then(e=>{let n=[];e.suggest.map(o=>{n.push({label:o,value:o})}),I.value=n,_.value=!1}).catch(e=>{_.value=!1})},200),ie=W.debounce(t=>{Re({k:t}).then(e=>{let n=[];e.suggest.map(o=>{n.push({label:o,value:o})}),I.value=n,_.value=!1}).catch(e=>{_.value=!1})},200),re=(t,e)=>{_.value||(_.value=!0,e==="@"?le(t):ie(t))},ue=t=>{t.length>P?w.value=t.substring(0,P):w.value=t},D=t=>{f.value=t},ce=t=>{for(let l=0;l30&&(t[l].name=n.substring(0,18)+"..."+n.substring(n.length-9)+"."+o)}u.value=t},pe=async t=>{var e,n,o,l,g;return f.value==="public/image"&&!["image/png","image/jpg","image/jpeg","image/gif"].includes((e=t.file.file)==null?void 0:e.type)?(window.$message.warning("图片仅允许 png/jpg/gif 格式"),!1):f.value==="image"&&((n=t.file.file)==null?void 0:n.size)>10485760?(window.$message.warning("图片大小不能超过10MB"),!1):f.value==="public/video"&&!["video/mp4","video/quicktime"].includes((o=t.file.file)==null?void 0:o.type)?(window.$message.warning("视频仅允许 mp4/mov 格式"),!1):f.value==="public/video"&&((l=t.file.file)==null?void 0:l.size)>104857600?(window.$message.warning("视频大小不能超过100MB"),!1):f.value==="attachment"&&!await rt(t.file.file)?(window.$message.warning("附件仅允许 zip 格式"),!1):f.value==="attachment"&&((g=t.file.file)==null?void 0:g.size)>104857600?(window.$message.warning("附件大小不能超过100MB"),!1):!0},_e=({file:t,event:e})=>{var n;try{let o=JSON.parse((n=e.target)==null?void 0:n.response);o.code===0&&(f.value==="public/image"&&h.value.push({id:t.id,content:o.data.content}),f.value==="public/video"&&k.value.push({id:t.id,content:o.data.content}),f.value==="attachment"&&y.value.push({id:t.id,content:o.data.content}))}catch{window.$message.error("上传失败")}},de=({file:t,event:e})=>{var n;try{let o=JSON.parse((n=e.target)==null?void 0:n.response);if(o.code!==0){let l=o.msg||"上传失败";o.details&&o.details.length>0&&o.details.map(g=>{l+=":"+g}),window.$message.error(l)}}catch{window.$message.error("上传失败")}},me=({file:t})=>{let e=h.value.findIndex(n=>n.id===t.id);e>-1&&h.value.splice(e,1),e=k.value.findIndex(n=>n.id===t.id),e>-1&&k.value.splice(e,1),e=y.value.findIndex(n=>n.id===t.id),e>-1&&y.value.splice(e,1)},ve=()=>{if(w.value.trim().length===0){window.$message.warning("请输入内容哦");return}let{tags:t,users:e}=Se(w.value);const n=[];let o=100;n.push({content:w.value,type:N.TEXT,sort:o}),h.value.map(l=>{o++,n.push({content:l.content,type:N.IMAGEURL,sort:o})}),k.value.map(l=>{o++,n.push({content:l.content,type:N.VIDEOURL,sort:o})}),y.value.map(l=>{o++,n.push({content:l.content,type:N.ATTACHMENT,sort:o})}),U.value.length>0&&U.value.map(l=>{o++,n.push({content:l,type:N.LINKURL,sort:o})}),d.value=!0,Ae({contents:n,tags:Array.from(new Set(t)),users:Array.from(new Set(e)),attachment_price:+V.value*100,visibility:C.value}).then(l=>{var g;window.$message.success("发布成功"),d.value=!1,q("post-success",l),p.value=!1,b.value=!1,(g=E.value)==null||g.clear(),u.value=[],w.value="",U.value=[],h.value=[],k.value=[],y.value=[],C.value=R.value}).catch(l=>{d.value=!1})},H=t=>{r.commit("triggerAuth",!0),r.commit("triggerAuthKey",t)};return ee(()=>{"friend".toLowerCase()==="friend"?R.value=z.FRIEND:"friend".toLowerCase()==="public"?R.value=z.PUBLIC:R.value=z.PRIVATE,C.value=R.value,Q.value="Bearer "+localStorage.getItem("PAOPAO_TOKEN")}),(t,e)=>{const n=Me,o=Oe,l=je,g=De,G=He,ge=Ge,fe=Ke,ye=Je,he=Qe,we=Ze,be=Xe,ke=We,Ce=Ye,$e=et;return c(),v("div",null,[$(r).state.userInfo.id>0?(c(),v("div",ut,[x("div",ct,[x("div",pt,[a(n,{round:"",size:30,src:$(r).state.userInfo.avatar},null,8,["src"])]),a(o,{type:"textarea",size:"large",autosize:"",bordered:!1,loading:_.value,value:w.value,prefix:["@","#"],options:I.value,onSearch:re,"onUpdate:value":ue,placeholder:"说说您的新鲜事..."},null,8,["loading","value","options"])]),a(we,{ref_key:"uploadRef",ref:E,abstract:"","list-type":"image",multiple:!0,max:9,action:oe,headers:{Authorization:Q.value},data:{type:f.value},"file-list":u.value,onBeforeUpload:pe,onFinish:_e,onError:de,onRemove:me,"onUpdate:fileList":ce},{default:s(()=>[x("div",_t,[x("div",dt,[a(G,{abstract:""},{default:s(({handleClick:m})=>[a(g,{disabled:u.value.length>0&&f.value==="public/video"||u.value.length===9,onClick:()=>{D("public/image"),m()},quaternary:"",circle:"",type:"primary"},{icon:s(()=>[a(l,{size:"20",color:"var(--primary-color)"},{default:s(()=>[a($(Le))]),_:1})]),_:2},1032,["disabled","onClick"])]),_:1}),O.value?(c(),L(G,{key:0,abstract:""},{default:s(({handleClick:m})=>[a(g,{disabled:u.value.length>0&&f.value!=="public/video"||u.value.length===9,onClick:()=>{D("public/video"),m()},quaternary:"",circle:"",type:"primary"},{icon:s(()=>[a(l,{size:"20",color:"var(--primary-color)"},{default:s(()=>[a($(Ve))]),_:1})]),_:2},1032,["disabled","onClick"])]),_:1})):T("",!0),j.value?(c(),L(G,{key:1,abstract:""},{default:s(({handleClick:m})=>[a(g,{disabled:u.value.length>0&&f.value==="public/video"||u.value.length===9,onClick:()=>{D("attachment"),m()},quaternary:"",circle:"",type:"primary"},{icon:s(()=>[a(l,{size:"20",color:"var(--primary-color)"},{default:s(()=>[a($(Ne))]),_:1})]),_:2},1032,["disabled","onClick"])]),_:1})):T("",!0),a(g,{quaternary:"",circle:"",type:"primary",onClick:Z(ne,["stop"])},{icon:s(()=>[a(l,{size:"20",color:"var(--primary-color)"},{default:s(()=>[a($(Fe))]),_:1})]),_:1},8,["onClick"]),ae.value?(c(),L(g,{key:2,quaternary:"",circle:"",type:"primary",onClick:Z(se,["stop"])},{icon:s(()=>[a(l,{size:"20",color:"var(--primary-color)"},{default:s(()=>[a($(Be))]),_:1})]),_:1},8,["onClick"])):T("",!0)]),x("div",mt,[a(fe,{trigger:"hover",placement:"bottom"},{trigger:s(()=>[a(ge,{class:"text-statistic",type:"circle","show-indicator":!1,status:"success","stroke-width":10,percentage:w.value.length/$(P)*100},null,8,["percentage"])]),default:s(()=>[S(" "+X(w.value.length)+" / "+X($(P)),1)]),_:1}),a(g,{loading:d.value,onClick:ve,type:"primary",secondary:"",round:""},{default:s(()=>[S(" 发布 ")]),_:1},8,["loading"])])]),x("div",vt,[a(ye),y.value.length>0?(c(),v("div",gt,[A.value?(c(),L(he,{key:0,value:V.value,"onUpdate:value":e[0]||(e[0]=m=>V.value=m),min:0,max:1e5,placeholder:"请输入附件价格,0为免费附件"},{prefix:s(()=>[ft]),_:1},8,["value"])):T("",!0)])):T("",!0)])]),_:1},8,["headers","data","file-list"]),b.value?(c(),v("div",yt,[a(Ce,{value:C.value,"onUpdate:value":e[1]||(e[1]=m=>C.value=m),name:"radiogroup"},{default:s(()=>[a(ke,null,{default:s(()=>[(c(),v(K,null,J(M,m=>a(be,{key:m.value,value:m.value,label:m.label},null,8,["value","label"])),64))]),_:1})]),_:1},8,["value"])])):T("",!0),p.value?(c(),v("div",ht,[a($e,{value:U.value,"onUpdate:value":e[2]||(e[2]=m=>U.value=m),placeholder:"请输入以http(s)://开头的链接",min:0,max:3},{"create-button-default":s(()=>[S(" 创建链接 ")]),_:1},8,["value"])])):T("",!0)])):(c(),v("div",wt,[bt,B.value?T("",!0):(c(),v("div",kt,[a(g,{strong:"",secondary:"",round:"",type:"primary",onClick:e[3]||(e[3]=m=>H("signin"))},{default:s(()=>[S(" 登录 ")]),_:1})])),B.value?(c(),v("div",Ct,[a(g,{strong:"",secondary:"",round:"",type:"primary",onClick:e[4]||(e[4]=m=>H("signin"))},{default:s(()=>[S(" 登录 ")]),_:1}),a(g,{strong:"",secondary:"",round:"",type:"info",onClick:e[5]||(e[5]=m=>H("signup"))},{default:s(()=>[S(" 注册 ")]),_:1})])):T("",!0)]))])}}});const Tt={key:0,class:"skeleton-wrap"},qt={key:1},xt={key:0,class:"empty-wrap"},It={key:1},zt={key:2},Ut={key:0,class:"pagination-wrap"},Rt=Y({__name:"Home",setup(F){const q=te(),r=lt(),I=it(),_=i(!1),d=i([]),p=i(+r.query.p||1),b=i(20),w=i(0),U=Ie(()=>{let u="泡泡广场";return r.query&&r.query.q&&(r.query.t&&r.query.t==="tag"?u="#"+decodeURIComponent(r.query.q):u="搜索: "+decodeURIComponent(r.query.q)),u}),E=()=>{_.value=!0,Ee({query:r.query.q?decodeURIComponent(r.query.q):null,type:r.query.t,page:p.value,page_size:b.value}).then(u=>{_.value=!1,d.value=u.list,w.value=Math.ceil(u.pager.total_rows/b.value),window.scrollTo(0,0)}).catch(u=>{_.value=!1})},V=u=>{if(p.value!=1){I.push({name:"post",query:{id:u.id}});return}let h=[],k=d.value.length;k==b.value&&k--;for(var y=0;y{I.push({name:"home",query:{...r.query,p:u}})};return ee(()=>{E()}),ze(()=>({path:r.path,query:r.query,refresh:q.state.refresh}),(u,h)=>{if(u.refresh!==h.refresh){p.value=+r.query.p||1,setTimeout(()=>{E()},0);return}h.path!=="/post"&&u.path==="/"&&(p.value=+r.query.p||1,setTimeout(()=>{E()},0))}),(u,h)=>{const k=st,y=$t,C=ot,R=xe,M=nt,P=Te,B=qe,O=tt,j=at;return c(),v("div",null,[a(k,{title:U.value},null,8,["title"]),a(O,{class:"main-content-wrap",bordered:""},{default:s(()=>[a(C,null,{default:s(()=>[a(y,{onPostSuccess:V})]),_:1}),_.value?(c(),v("div",Tt,[a(R,{num:b.value},null,8,["num"])])):(c(),v("div",qt,[d.value.length===0?(c(),v("div",xt,[a(M,{size:"large",description:"暂无数据"})])):T("",!0),$(q).state.desktopModelShow?(c(),v("div",It,[(c(!0),v(K,null,J(d.value,A=>(c(),L(C,{key:A.id},{default:s(()=>[a(P,{post:A},null,8,["post"])]),_:2},1024))),128))])):(c(),v("div",zt,[(c(!0),v(K,null,J(d.value,A=>(c(),L(C,{key:A.id},{default:s(()=>[a(B,{post:A},null,8,["post"])]),_:2},1024))),128))]))]))]),_:1}),w.value>0?(c(),v("div",Ut,[a(j,{page:p.value,"onUpdate:page":f,"page-slot":$(q).state.collapsedRight?5:8,"page-count":w.value},null,8,["page","page-slot","page-count"])])):T("",!0)])}}});const ca=Pe(Rt,[["__scopeId","data-v-f42b0645"]]);export{ca as default}; diff --git a/web/dist/assets/Messages-943c32f0.js b/web/dist/assets/Messages-0ab7f8c3.js similarity index 68% rename from web/dist/assets/Messages-943c32f0.js rename to web/dist/assets/Messages-0ab7f8c3.js index 096b0c40..e9f4b6ec 100644 --- a/web/dist/assets/Messages-943c32f0.js +++ b/web/dist/assets/Messages-0ab7f8c3.js @@ -1 +1 @@ -import{d as b,a3 as D,o as t,c as a,V as n,a1 as o,a as y,a2 as w,e as p,M as m,Q as N,O as r,_ as c,L as A,a4 as O,F as R,r as f,j as G}from"./@vue-e0e89260.js";import{u as H,b as J}from"./vue-router-b8e3382f.js";import{H as K,I as L,J as P,_ as F,K as T}from"./index-a0347e1a.js";import{a as U}from"./formatTime-cdf4e6f1.js";import{D as E,G as Q,J as z,K as W}from"./@vicons-8f91201d.js";import{o as X,l as Y,j as Z,S as x,M as ee,U as se,F as ne,G as te,I as ae,H as oe}from"./naive-ui-62663ad7.js";import{_ as re}from"./main-nav.vue_vue_type_style_index_0_lang-e28257cc.js";import{u as ie}from"./vuex-473b3783.js";import"./axios-4a70c6fc.js";/* empty css */import"./seemly-76b7b838.js";import"./vueuc-59ca65c3.js";import"./evtd-b614532e.js";import"./@css-render-580d83ec.js";import"./vooks-a50491fd.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=b({__name:"message-item",props:{message:{}},setup(I){const g=H(),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),K({user_id:e.sender_user_id}).then(s=>{e.reply_id=2,window.$message.success("已同意添加好友")}).catch(s=>{console.log(s)})},u=e=>{_(e),L({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&&P({id:e.id}).then(s=>{e.is_read=1}).catch(s=>{console.log(s)})};return(e,s)=>{const h=X,$=D("router-link"),l=Y,d=Z,C=x,M=ee;return t(),a("div",{class:A(["message-item",{unread:e.message.is_read===0}]),onClick:s[4]||(s[4]=v=>_(e.message))},[n(M,{"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(),N(l,{key:0,dot:"",processing:""})):r("",!0),y("span",de,m(c(U)(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(E))]),_: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(z))]),_:1}),p(" 拒绝 ")])):r("",!0),e.message.reply_id===2?(t(),a("span",fe,[n(d,null,{default:o(()=>[n(c(W))]),_:1}),p(" 已同意 ")])):r("",!0),e.message.reply_id===3?(t(),a("span",ye,[n(d,null,{default:o(()=>[n(c(z))]),_:1}),p(" 已拒绝 ")])):r("",!0)])):r("",!0)]),_:1},8,["type"])]),_:1})],2)}}});const we=F(he,[["__scopeId","data-v-07fc447f"]]),$e={class:"content"},Ce=b({__name:"message-skeleton",props:{num:{default:1}},setup(I){return(g,k)=>{const i=se;return t(!0),a(R,null,O(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 Me=F(Ce,[["__scopeId","data-v-01d2e871"]]),be={key:0,class:"skeleton-wrap"},Fe={key:1},Ie={key:0,class:"empty-wrap"},Se={key:0,class:"pagination-wrap"},ze=b({__name:"Messages",setup(I){const g=J(),k=ie(),i=f(!1),u=f(+g.query.p||1),_=f(10),e=f(0),s=f([]),h=()=>{i.value=!0,T({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 G(()=>{h()}),(l,d)=>{const C=re,M=Me,v=ae,V=we,j=oe,q=ne,B=te;return t(),a("div",null,[n(C,{title:"消息"}),n(q,{class:"main-content-wrap messages-wrap",bordered:""},{default:o(()=>[i.value?(t(),a("div",be,[n(M,{num:_.value},null,8,["num"])])):(t(),a("div",Fe,[s.value.length===0?(t(),a("div",Ie,[n(v,{size:"large",description:"暂无数据"})])):r("",!0),(t(!0),a(R,null,O(s.value,S=>(t(),N(j,{key:S.id},{default:o(()=>[n(V,{message:S},null,8,["message"])]),_:2},1024))),128))]))]),_:1}),e.value>0?(t(),a("div",Se,[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(ze,[["__scopeId","data-v-4e7b1342"]]);export{es as default}; +import{d as b,a3 as A,o as t,c as a,V as n,a1 as o,a as y,a2 as w,e as p,M as m,Q as S,O as r,_ as c,L as D,a4 as z,F as R,r as f,j as L}from"./@vue-e0e89260.js";import{u as J,b as K}from"./vue-router-b8e3382f.js";import{J as P,K as T,L as U,_ as F,M as E}from"./index-479e9ef6.js";import{a as G}from"./formatTime-4210fcd1.js";import{J as H,K as Q,N as O,O as W}from"./@vicons-0524c43e.js";import{o as X,l as Y,j as Z,S as x,M as ee,U as se,F as ne,G as te,I as ae,H as oe}from"./naive-ui-62663ad7.js";import{_ as re}from"./main-nav.vue_vue_type_style_index_0_lang-db217db0.js";import{u as ie}from"./vuex-473b3783.js";import"./axios-4a70c6fc.js";/* empty css */import"./seemly-76b7b838.js";import"./vueuc-59ca65c3.js";import"./evtd-b614532e.js";import"./@css-render-580d83ec.js";import"./vooks-a50491fd.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=b({__name:"message-item",props:{message:{}},setup(I){const g=J(),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),P({user_id:e.sender_user_id}).then(s=>{e.reply_id=2,window.$message.success("已同意添加好友")}).catch(s=>{console.log(s)})},u=e=>{_(e),T({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&&U({id:e.id}).then(s=>{e.is_read=1}).catch(s=>{console.log(s)})};return(e,s)=>{const h=X,$=A("router-link"),l=Y,d=Z,C=x,M=ee;return t(),a("div",{class:D(["message-item",{unread:e.message.is_read===0}]),onClick:s[4]||(s[4]=v=>_(e.message))},[n(M,{"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(),S(l,{key:0,dot:"",processing:""})):r("",!0),y("span",de,m(c(G)(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(H))]),_: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(O))]),_:1}),p(" 拒绝 ")])):r("",!0),e.message.reply_id===2?(t(),a("span",fe,[n(d,null,{default:o(()=>[n(c(W))]),_:1}),p(" 已同意 ")])):r("",!0),e.message.reply_id===3?(t(),a("span",ye,[n(d,null,{default:o(()=>[n(c(O))]),_:1}),p(" 已拒绝 ")])):r("",!0)])):r("",!0)]),_:1},8,["type"])]),_:1})],2)}}});const we=F(he,[["__scopeId","data-v-07fc447f"]]),$e={class:"content"},Ce=b({__name:"message-skeleton",props:{num:{default:1}},setup(I){return(g,k)=>{const i=se;return t(!0),a(R,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 Me=F(Ce,[["__scopeId","data-v-01d2e871"]]),be={key:0,class:"skeleton-wrap"},Fe={key:1},Ie={key:0,class:"empty-wrap"},Ne={key:0,class:"pagination-wrap"},Oe=b({__name:"Messages",setup(I){const g=K(),k=ie(),i=f(!1),u=f(+g.query.p||1),_=f(10),e=f(0),s=f([]),h=()=>{i.value=!0,E({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,M=Me,v=ae,V=we,j=oe,q=ne,B=te;return t(),a("div",null,[n(C,{title:"消息"}),n(q,{class:"main-content-wrap messages-wrap",bordered:""},{default:o(()=>[i.value?(t(),a("div",be,[n(M,{num:_.value},null,8,["num"])])):(t(),a("div",Fe,[s.value.length===0?(t(),a("div",Ie,[n(v,{size:"large",description:"暂无数据"})])):r("",!0),(t(!0),a(R,null,z(s.value,N=>(t(),S(j,{key:N.id},{default:o(()=>[n(V,{message:N},null,8,["message"])]),_:2},1024))),128))]))]),_:1}),e.value>0?(t(),a("div",Ne,[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(Oe,[["__scopeId","data-v-4e7b1342"]]);export{es as default}; diff --git a/web/dist/assets/Post-bbb54718.js b/web/dist/assets/Post-89906b13.js similarity index 98% rename from web/dist/assets/Post-bbb54718.js rename to web/dist/assets/Post-89906b13.js index 21a6ef49..48598824 100644 --- a/web/dist/assets/Post-bbb54718.js +++ b/web/dist/assets/Post-89906b13.js @@ -1 +1 @@ -import{d as X,r as c,a3 as ge,o,c as u,a as v,V as t,a1 as n,e as x,M as I,Q as P,O as i,_ as a,a2 as H,n as ae,a7 as qe,F as le,a4 as ie,j as ye,W as Ie,X as Te,s as be,w as Ee}from"./@vue-e0e89260.js";import{u as te}from"./vuex-473b3783.js";import{f as ue}from"./formatTime-cdf4e6f1.js";import{t as Ne,d as je,e as Be,_ as se,f as He,h as Fe,i as Ve,j as Ye,g as Je,k as Ke,l as Qe,m as We,n as Ge,o as Xe,s as Ze,p as et,v as tt,q as st,r as ot,u as nt,w as $e}from"./index-a0347e1a.js";import{Y as ce,V as Z}from"./IEnum-a180d93e.js";import{T as Pe,e as re,f as ze,g as _e,h as Ue,I as at,i as lt,j as it,k as ut,l as ct,m as rt,n as _t,o as pt,p as dt,q as mt,r as vt,s as Ce,F as xe,E as ve,t as he,u as fe}from"./@vicons-8f91201d.js";import{j as Y,e as oe,J as Re,K as ht,b as ft,L as gt,o as ke,M as Se,v as yt,w as kt,x as wt,y as bt,z as $t,B as Ct,O as xt,P as It,i as Tt,Q as Pt,a as Le,F as zt,I as Ut,k as Rt,H as St,f as Lt,g as Ot}from"./naive-ui-62663ad7.js";import{p as we,_ as Oe,a as Mt,b as At,c as Dt}from"./content-5d77464b.js";import{u as Me,b as qt}from"./vue-router-b8e3382f.js";import{_ as Et}from"./post-skeleton-949f6995.js";import{l as Nt}from"./lodash-94eb5868.js";import{a as jt}from"./copy-to-clipboard-1dd3075d.js";import{_ as Bt}from"./main-nav.vue_vue_type_style_index_0_lang-e28257cc.js";import{W as Ht}from"./v3-infinite-loading-e5c2e8bf.js";import"./moment-2ab8298d.js";import"./axios-4a70c6fc.js";/* empty css */import"./seemly-76b7b838.js";import"./vueuc-59ca65c3.js";import"./evtd-b614532e.js";import"./@css-render-580d83ec.js";import"./vooks-a50491fd.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-aa5e8b3f.js";import"./toggle-selection-93f4ad84.js";const Ft={class:"reply-item"},Vt={class:"header-wrap"},Yt={class:"username"},Jt={class:"reply-name"},Kt={class:"timestamp"},Qt={class:"base-wrap"},Wt={class:"content"},Gt={class:"reply-switch"},Xt={class:"time-item"},Zt={class:"actions"},es={class:"upvote-count"},ts=["onClick"],ss={class:"upvote-count"},os={key:2,class:"action-item"},ns=["onClick"],as=X({__name:"reply-item",props:{tweetId:{},reply:{}},emits:["focusReply","reload"],setup(A,{emit:q}){const l=A,p=te(),f=c(l.reply.is_thumbs_up==ce.YES),y=c(l.reply.is_thumbs_down==ce.YES),k=c(l.reply.thumbs_up_count),L=()=>{Ne({tweet_id:l.tweetId,comment_id:l.reply.comment_id,reply_id:l.reply.id}).then(h=>{f.value=!f.value,f.value?(k.value++,y.value=!1):k.value--}).catch(h=>{console.log(h)})},r=()=>{je({tweet_id:l.tweetId,comment_id:l.reply.comment_id,reply_id:l.reply.id}).then(h=>{y.value=!y.value,y.value&&f.value&&(k.value--,f.value=!1)}).catch(h=>{console.log(h)})},U=()=>{q("focusReply",l.reply)},T=()=>{Be({id:l.reply.id}).then(h=>{window.$message.success("删除成功"),setTimeout(()=>{q("reload")},50)}).catch(h=>{console.log(h)})};return(h,$)=>{const R=ge("router-link"),e=Y,_=oe,O=Re,w=ht;return o(),u("div",Ft,[v("div",Vt,[v("div",Yt,[t(R,{class:"user-link",to:{name:"user",query:{s:l.reply.user.username}}},{default:n(()=>[x(I(l.reply.user.username),1)]),_:1},8,["to"]),v("span",Jt,I(l.reply.at_user_id>0?"回复":":"),1),l.reply.at_user_id>0?(o(),P(R,{key:0,class:"user-link",to:{name:"user",query:{s:l.reply.at_user.username}}},{default:n(()=>[x(I(l.reply.at_user.username),1)]),_:1},8,["to"])):i("",!0)]),v("div",Kt,[x(I(l.reply.ip_loc)+" ",1),a(p).state.userInfo.is_admin||a(p).state.userInfo.id===l.reply.user.id?(o(),P(O,{key:0,"negative-text":"取消","positive-text":"确认",onPositiveClick:T},{trigger:n(()=>[t(_,{quaternary:"",circle:"",size:"tiny",class:"del-btn"},{icon:n(()=>[t(e,null,{default:n(()=>[t(a(Pe))]),_:1})]),_:1})]),default:n(()=>[x(" 是否确认删除? ")]),_:1})):i("",!0)])]),v("div",Qt,[v("div",Wt,[t(w,{"expand-trigger":"click","line-clamp":"5",tooltip:!1},{default:n(()=>[x(I(l.reply.content),1)]),_:1})]),v("div",Gt,[v("span",Xt,I(a(ue)(l.reply.created_on)),1),v("div",Zt,[a(p).state.userLogined?i("",!0):(o(),u("div",{key:0,class:"action-item",onClick:$[0]||($[0]=H(()=>{},["stop"]))},[t(e,{size:"medium"},{default:n(()=>[t(a(re))]),_:1}),v("span",es,I(k.value),1)])),a(p).state.userLogined?(o(),u("div",{key:1,class:"action-item hover",onClick:H(L,["stop"])},[t(e,{size:"medium"},{default:n(()=>[f.value?i("",!0):(o(),P(a(re),{key:0})),f.value?(o(),P(a(ze),{key:1,class:"show"})):i("",!0)]),_:1}),v("span",ss,I(k.value>0?k.value:"赞"),1)],8,ts)):i("",!0),a(p).state.userLogined?i("",!0):(o(),u("div",os,[t(e,{size:"medium"},{default:n(()=>[t(a(_e))]),_:1})])),a(p).state.userLogined?(o(),u("div",{key:3,class:"action-item hover",onClick:H(r,["stop"])},[t(e,{size:"medium"},{default:n(()=>[y.value?i("",!0):(o(),P(a(_e),{key:0})),y.value?(o(),P(a(Ue),{key:1,class:"show"})):i("",!0)]),_:1})],8,ns)):i("",!0),a(p).state.userLogined?(o(),u("span",{key:4,class:"show opacity-item reply-btn",onClick:U}," 回复 ")):i("",!0)])])])])}}});const ls=se(as,[["__scopeId","data-v-187a4ed3"]]),is={class:"reply-compose-wrap"},us={class:"reply-switch"},cs={class:"time-item"},rs={class:"actions"},_s={key:0,class:"action-item"},ps={class:"upvote-count"},ds=["onClick"],ms={class:"upvote-count"},vs={key:2,class:"action-item"},hs=["onClick"],fs={key:0,class:"reply-input-wrap"},gs=X({__name:"compose-reply",props:{comment:{},atUserid:{default:0},atUsername:{default:""}},emits:["reload","reset"],setup(A,{expose:q,emit:l}){const p=A,f=te(),y=c(),k=c(!1),L=c(""),r=c(!1),U=+"300",T=c(p.comment.is_thumbs_up==ce.YES),h=c(p.comment.is_thumbs_down==ce.YES),$=c(p.comment.thumbs_up_count),R=()=>{He({tweet_id:p.comment.post_id,comment_id:p.comment.id}).then(w=>{T.value=!T.value,T.value?($.value++,h.value=!1):$.value--}).catch(w=>{console.log(w)})},e=()=>{Fe({tweet_id:p.comment.post_id,comment_id:p.comment.id}).then(w=>{h.value=!h.value,h.value&&T.value&&($.value--,T.value=!1)}).catch(w=>{console.log(w)})},_=w=>{k.value=w,w?setTimeout(()=>{var M;(M=y.value)==null||M.focus()},10):(r.value=!1,L.value="",l("reset"))},O=()=>{r.value=!0,Ve({comment_id:p.comment.id,at_user_id:p.atUserid,content:L.value}).then(w=>{_(!1),window.$message.success("评论成功"),l("reload")}).catch(w=>{r.value=!1})};return q({switchReply:_}),(w,M)=>{const j=Y,B=ft,V=oe,z=gt;return o(),u("div",is,[v("div",us,[v("span",cs,I(a(ue)(w.comment.created_on)),1),v("div",rs,[a(f).state.userLogined?i("",!0):(o(),u("div",_s,[t(j,{size:"medium"},{default:n(()=>[t(a(re))]),_:1}),v("span",ps,I($.value),1)])),a(f).state.userLogined?(o(),u("div",{key:1,class:"action-item hover",onClick:H(R,["stop"])},[t(j,{size:"medium"},{default:n(()=>[T.value?i("",!0):(o(),P(a(re),{key:0})),T.value?(o(),P(a(ze),{key:1,class:"show"})):i("",!0)]),_:1}),v("span",ms,I($.value>0?$.value:"赞"),1)],8,ds)):i("",!0),a(f).state.userLogined?i("",!0):(o(),u("div",vs,[t(j,{size:"medium"},{default:n(()=>[t(a(_e))]),_:1})])),a(f).state.userLogined?(o(),u("div",{key:3,class:"action-item hover",onClick:H(e,["stop"])},[t(j,{size:"medium"},{default:n(()=>[h.value?i("",!0):(o(),P(a(_e),{key:0})),h.value?(o(),P(a(Ue),{key:1,class:"show"})):i("",!0)]),_:1})],8,hs)):i("",!0),a(f).state.userLogined&&!k.value?(o(),u("span",{key:4,class:"show reply-btn",onClick:M[0]||(M[0]=S=>_(!0))}," 回复 ")):i("",!0),a(f).state.userLogined&&k.value?(o(),u("span",{key:5,class:"hide reply-btn",onClick:M[1]||(M[1]=S=>_(!1))}," 取消 ")):i("",!0)])]),k.value?(o(),u("div",fs,[t(z,null,{default:n(()=>[t(B,{ref_key:"inputInstRef",ref:y,size:"small",placeholder:p.atUsername?"@"+p.atUsername:"请输入回复内容..",maxlength:a(U),value:L.value,"onUpdate:value":M[2]||(M[2]=S=>L.value=S),"show-count":"",clearable:""},null,8,["placeholder","maxlength","value"]),t(V,{type:"primary",size:"small",ghost:"",loading:r.value,onClick:O},{default:n(()=>[x(" 回复 ")]),_:1},8,["loading"])]),_:1})])):i("",!0)])}}});const ys=se(gs,[["__scopeId","data-v-f9af7a93"]]),ks={class:"comment-item"},ws={class:"nickname-wrap"},bs={class:"username-wrap"},$s={class:"opt-wrap"},Cs={class:"timestamp"},xs=["innerHTML"],Is={class:"reply-wrap"},Ts=X({__name:"comment-item",props:{comment:{}},emits:["reload"],setup(A,{emit:q}){const l=A,p=te(),f=Me(),y=c(0),k=c(""),L=c(),r=ae(()=>{let e=Object.assign({texts:[],imgs:[]},l.comment);return e.contents.map(_=>{(+_.type==1||+_.type==2)&&e.texts.push(_),+_.type==3&&e.imgs.push(_)}),e}),U=(e,_)=>{let O=e.target;if(O.dataset.detail){const w=O.dataset.detail.split(":");w.length===2&&(p.commit("refresh"),w[0]==="tag"?window.$message.warning("评论内的无效话题"):f.push({name:"user",query:{s:w[1]}}))}},T=e=>{var _,O;y.value=e.user_id,k.value=((_=e.user)==null?void 0:_.username)||"",(O=L.value)==null||O.switchReply(!0)},h=()=>{q("reload")},$=()=>{y.value=0,k.value=""},R=()=>{Ye({id:r.value.id}).then(e=>{window.$message.success("删除成功"),setTimeout(()=>{h()},50)}).catch(e=>{})};return(e,_)=>{const O=ke,w=ge("router-link"),M=Y,j=oe,B=Re,V=Oe,z=ys,S=ls,K=Se;return o(),u("div",ks,[t(K,{"content-indented":""},qe({avatar:n(()=>[t(O,{round:"",size:30,src:r.value.user.avatar},null,8,["src"])]),header:n(()=>[v("span",ws,[t(w,{onClick:_[0]||(_[0]=H(()=>{},["stop"])),class:"username-link",to:{name:"user",query:{s:r.value.user.username}}},{default:n(()=>[x(I(r.value.user.nickname),1)]),_:1},8,["to"])]),v("span",bs," @"+I(r.value.user.username),1)]),"header-extra":n(()=>[v("div",$s,[v("span",Cs,I(r.value.ip_loc),1),a(p).state.userInfo.is_admin||a(p).state.userInfo.id===r.value.user.id?(o(),P(B,{key:0,"negative-text":"取消","positive-text":"确认",onPositiveClick:R},{trigger:n(()=>[t(j,{quaternary:"",circle:"",size:"tiny",class:"del-btn"},{icon:n(()=>[t(M,null,{default:n(()=>[t(a(Pe))]),_:1})]),_:1})]),default:n(()=>[x(" 是否确认删除? ")]),_:1})):i("",!0)])]),footer:n(()=>[r.value.imgs.length>0?(o(),P(V,{key:0,imgs:r.value.imgs},null,8,["imgs"])):i("",!0),t(z,{ref_key:"replyComposeRef",ref:L,comment:r.value,"at-userid":y.value,"at-username":k.value,onReload:h,onReset:$},null,8,["comment","at-userid","at-username"]),v("div",Is,[(o(!0),u(le,null,ie(r.value.replies,F=>(o(),P(S,{key:F.id,reply:F,"tweet-id":r.value.post_id,onFocusReply:T,onReload:h},null,8,["reply","tweet-id"]))),128))])]),_:2},[r.value.texts.length>0?{name:"description",fn:n(()=>[(o(!0),u(le,null,ie(r.value.texts,F=>(o(),u("span",{key:F.id,class:"comment-text",onClick:_[1]||(_[1]=H(J=>U(J,r.value.id),["stop"])),innerHTML:a(we)(F.content).content},null,8,xs))),128))]),key:"0"}:void 0]),1024)])}}});const Ps=se(Ts,[["__scopeId","data-v-36dac8c8"]]),zs=A=>(Ie("data-v-634e6bfd"),A=A(),Te(),A),Us={key:0,class:"compose-wrap"},Rs={class:"compose-line"},Ss={class:"compose-user"},Ls={class:"compose-line compose-options"},Os={class:"attachment"},Ms={class:"submit-wrap"},As={class:"attachment-list-wrap"},Ds={key:1,class:"compose-wrap"},qs=zs(()=>v("div",{class:"login-wrap"},[v("span",{class:"login-banner"}," 登录后,精彩更多")],-1)),Es={key:0,class:"login-only-wrap"},Ns={key:1,class:"login-wrap"},js=X({__name:"compose-comment",props:{lock:{default:0},postId:{default:0}},emits:["post-success"],setup(A,{emit:q}){const l=A,p=te(),f=c([]),y=c(!1),k=c(!1),L=c(!1),r=c(""),U=c(),T=c("public/image"),h=c([]),$=c([]),R=c("true".toLowerCase()==="true"),e=+"300",_="/v1/attachment",O=c(),w=Nt.debounce(m=>{Je({k:m}).then(g=>{let b=[];g.suggest.map(C=>{b.push({label:C,value:C})}),f.value=b,k.value=!1}).catch(g=>{k.value=!1})},200),M=(m,g)=>{k.value||(k.value=!0,g==="@"&&w(m))},j=m=>{m.length>e?r.value=m.substring(0,e):r.value=m},B=m=>{T.value=m},V=m=>{for(let E=0;E30&&(m[E].name=b.substring(0,18)+"..."+b.substring(b.length-9)+"."+C)}h.value=m},z=async m=>{var g,b;return T.value==="public/image"&&!["image/png","image/jpg","image/jpeg","image/gif"].includes((g=m.file.file)==null?void 0:g.type)?(window.$message.warning("图片仅允许 png/jpg/gif 格式"),!1):T.value==="image"&&((b=m.file.file)==null?void 0:b.size)>10485760?(window.$message.warning("图片大小不能超过10MB"),!1):!0},S=({file:m,event:g})=>{var b;try{let C=JSON.parse((b=g.target)==null?void 0:b.response);C.code===0&&T.value==="public/image"&&$.value.push({id:m.id,content:C.data.content})}catch{window.$message.error("上传失败")}},K=({file:m,event:g})=>{var b;try{let C=JSON.parse((b=g.target)==null?void 0:b.response);if(C.code!==0){let E=C.msg||"上传失败";C.details&&C.details.length>0&&C.details.map(D=>{E+=":"+D}),window.$message.error(E)}}catch{window.$message.error("上传失败")}},F=({file:m})=>{let g=$.value.findIndex(b=>b.id===m.id);g>-1&&$.value.splice(g,1)},J=()=>{y.value=!0},W=()=>{var m;y.value=!1,(m=U.value)==null||m.clear(),h.value=[],r.value="",$.value=[]},s=()=>{if(r.value.trim().length===0){window.$message.warning("请输入内容哦");return}let{users:m}=we(r.value);const g=[];let b=100;g.push({content:r.value,type:2,sort:b}),$.value.map(C=>{b++,g.push({content:C.content,type:3,sort:b})}),L.value=!0,Ke({contents:g,post_id:l.postId,users:Array.from(new Set(m))}).then(C=>{window.$message.success("发布成功"),L.value=!1,q("post-success"),W()}).catch(C=>{L.value=!1})},d=m=>{p.commit("triggerAuth",!0),p.commit("triggerAuthKey",m)};return ye(()=>{O.value="Bearer "+localStorage.getItem("PAOPAO_TOKEN")}),(m,g)=>{const b=ke,C=yt,E=Y,D=oe,Q=kt,pe=wt,de=bt,me=$t,ne=Ct;return o(),u("div",null,[a(p).state.userInfo.id>0?(o(),u("div",Us,[v("div",Rs,[v("div",Ss,[t(b,{round:"",size:30,src:a(p).state.userInfo.avatar},null,8,["src"])]),t(C,{type:"textarea",size:"large",autosize:"",bordered:!1,options:f.value,prefix:["@"],loading:k.value,value:r.value,disabled:l.lock===1,"onUpdate:value":j,onSearch:M,onFocus:J,placeholder:l.lock===1?"泡泡已被锁定,回复功能已关闭":"快来评论两句吧..."},null,8,["options","loading","value","disabled","placeholder"])]),y.value?(o(),P(ne,{key:0,ref_key:"uploadRef",ref:U,abstract:"","list-type":"image",multiple:!0,max:9,action:_,headers:{Authorization:O.value},data:{type:T.value},"file-list":h.value,onBeforeUpload:z,onFinish:S,onError:K,onRemove:F,"onUpdate:fileList":V},{default:n(()=>[v("div",Ls,[v("div",Os,[t(Q,{abstract:""},{default:n(({handleClick:G})=>[t(D,{disabled:h.value.length>0&&T.value==="public/video"||h.value.length===9,onClick:()=>{B("public/image"),G()},quaternary:"",circle:"",type:"primary"},{icon:n(()=>[t(E,{size:"20",color:"var(--primary-color)"},{default:n(()=>[t(a(at))]),_:1})]),_:2},1032,["disabled","onClick"])]),_:1}),t(de,{trigger:"hover",placement:"bottom"},{trigger:n(()=>[t(pe,{class:"text-statistic",type:"circle","show-indicator":!1,status:"success","stroke-width":10,percentage:r.value.length/a(e)*100},null,8,["percentage"])]),default:n(()=>[x(" "+I(r.value.length)+" / "+I(a(e)),1)]),_:1})]),v("div",Ms,[t(D,{quaternary:"",round:"",type:"tertiary",class:"cancel-btn",size:"small",onClick:W},{default:n(()=>[x(" 取消 ")]),_:1}),t(D,{loading:L.value,onClick:s,type:"primary",secondary:"",size:"small",round:""},{default:n(()=>[x(" 发布 ")]),_:1},8,["loading"])])]),v("div",As,[t(me)])]),_:1},8,["headers","data","file-list"])):i("",!0)])):(o(),u("div",Ds,[qs,R.value?i("",!0):(o(),u("div",Es,[t(D,{strong:"",secondary:"",round:"",type:"primary",onClick:g[0]||(g[0]=G=>d("signin"))},{default:n(()=>[x(" 登录 ")]),_:1})])),R.value?(o(),u("div",Ns,[t(D,{strong:"",secondary:"",round:"",type:"primary",onClick:g[1]||(g[1]=G=>d("signin"))},{default:n(()=>[x(" 登录 ")]),_:1}),t(D,{strong:"",secondary:"",round:"",type:"info",onClick:g[2]||(g[2]=G=>d("signup"))},{default:n(()=>[x(" 注册 ")]),_:1})])):i("",!0)]))])}}});const Bs=se(js,[["__scopeId","data-v-634e6bfd"]]),Hs={class:"username-wrap"},Fs={key:0,class:"options"},Vs={key:0},Ys=["innerHTML"],Js={class:"timestamp"},Ks={key:0},Qs={key:1},Ws={class:"opts-wrap"},Gs=["onClick"],Xs={class:"opt-item"},Zs=["onClick"],eo=["onClick"],to=X({__name:"post-detail",props:{post:{}},emits:["reload"],setup(A,{emit:q}){const l=A,p=te(),f=Me(),y=c(!1),k=c(!1),L=c(!1),r=c(!1),U=c(!1),T=c(!1),h=c(!1),$=c(!1),R=c(Z.PUBLIC),e=ae({get:()=>{let s=Object.assign({texts:[],imgs:[],videos:[],links:[],attachments:[],charge_attachments:[]},l.post);return s.contents.map(d=>{(+d.type==1||+d.type==2)&&s.texts.push(d),+d.type==3&&s.imgs.push(d),+d.type==4&&s.videos.push(d),+d.type==6&&s.links.push(d),+d.type==7&&s.attachments.push(d),+d.type==8&&s.charge_attachments.push(d)}),s},set:s=>{l.post.upvote_count=s.upvote_count,l.post.comment_count=s.comment_count,l.post.collection_count=s.collection_count,l.post.is_essence=s.is_essence}}),_=s=>()=>be(Y,null,{default:()=>be(s)}),O=ae(()=>{let s=[{label:"删除",key:"delete",icon:_(dt)}];return e.value.is_lock===0?s.push({label:"锁定",key:"lock",icon:_(mt)}):s.push({label:"解锁",key:"unlock",icon:_(vt)}),p.state.userInfo.is_admin&&(e.value.is_top===0?s.push({label:"置顶",key:"stick",icon:_(Ce)}):s.push({label:"取消置顶",key:"unstick",icon:_(Ce)})),e.value.is_essence===0?s.push({label:"设为亮点",key:"highlight",icon:_(xe)}):s.push({label:"取消亮点",key:"unhighlight",icon:_(xe)}),e.value.visibility===Z.PUBLIC?s.push({label:"公开",key:"vpublic",icon:_(ve),children:[{label:"私密",key:"vprivate",icon:_(he)},{label:"好友可见",key:"vfriend",icon:_(fe)}]}):e.value.visibility===Z.PRIVATE?s.push({label:"私密",key:"vprivate",icon:_(he),children:[{label:"公开",key:"vpublic",icon:_(ve)},{label:"好友可见",key:"vfriend",icon:_(fe)}]}):s.push({label:"好友可见",key:"vfriend",icon:_(fe),children:[{label:"公开",key:"vpublic",icon:_(ve)},{label:"私密",key:"vprivate",icon:_(he)}]}),s}),w=s=>{f.push({name:"post",query:{id:s}})},M=(s,d)=>{if(s.target.dataset.detail){const m=s.target.dataset.detail.split(":");if(m.length===2){p.commit("refresh"),m[0]==="tag"?f.push({name:"home",query:{q:m[1],t:"tag"}}):f.push({name:"user",query:{s:m[1]}});return}}w(d)},j=s=>{switch(s){case"delete":L.value=!0;break;case"lock":case"unlock":r.value=!0;break;case"stick":case"unstick":U.value=!0;break;case"highlight":case"unhighlight":T.value=!0;break;case"vpublic":R.value=0,h.value=!0;break;case"vprivate":R.value=1,h.value=!0;break;case"vfriend":R.value=2,h.value=!0;break}},B=()=>{Ge({id:e.value.id}).then(s=>{window.$message.success("删除成功"),f.replace("/"),setTimeout(()=>{p.commit("refresh")},50)}).catch(s=>{$.value=!1})},V=()=>{Xe({id:e.value.id}).then(s=>{q("reload"),s.lock_status===1?window.$message.success("锁定成功"):window.$message.success("解锁成功")}).catch(s=>{$.value=!1})},z=()=>{Ze({id:e.value.id}).then(s=>{q("reload"),s.top_status===1?window.$message.success("置顶成功"):window.$message.success("取消置顶成功")}).catch(s=>{$.value=!1})},S=()=>{et({id:e.value.id}).then(s=>{e.value={...e.value,is_essence:s.highlight_status},s.highlight_status===1?window.$message.success("设为亮点成功"):window.$message.success("取消亮点成功")}).catch(s=>{$.value=!1})},K=()=>{tt({id:e.value.id,visibility:R.value}).then(s=>{q("reload"),window.$message.success("修改可见性成功")}).catch(s=>{$.value=!1})},F=()=>{st({id:e.value.id}).then(s=>{y.value=s.status,s.status?e.value={...e.value,upvote_count:e.value.upvote_count+1}:e.value={...e.value,upvote_count:e.value.upvote_count-1}}).catch(s=>{console.log(s)})},J=()=>{ot({id:e.value.id}).then(s=>{k.value=s.status,s.status?e.value={...e.value,collection_count:e.value.collection_count+1}:e.value={...e.value,collection_count:e.value.collection_count-1}}).catch(s=>{console.log(s)})},W=()=>{jt(`${window.location.origin}/#/post?id=${e.value.id}`),window.$message.success("链接已复制到剪贴板")};return ye(()=>{p.state.userInfo.id>0&&(Qe({id:e.value.id}).then(s=>{y.value=s.status}).catch(s=>{console.log(s)}),We({id:e.value.id}).then(s=>{k.value=s.status}).catch(s=>{console.log(s)}))}),(s,d)=>{const m=ke,g=ge("router-link"),b=xt,C=oe,E=It,D=Tt,Q=Mt,pe=Oe,de=At,me=Dt,ne=Pt,G=Le,Ae=Se;return o(),u("div",{class:"detail-item",onClick:d[7]||(d[7]=N=>w(e.value.id))},[t(Ae,null,{avatar:n(()=>[t(m,{round:"",size:30,src:e.value.user.avatar},null,8,["src"])]),header:n(()=>[t(g,{onClick:d[0]||(d[0]=H(()=>{},["stop"])),class:"username-link",to:{name:"user",query:{s:e.value.user.username}}},{default:n(()=>[x(I(e.value.user.nickname),1)]),_:1},8,["to"]),v("span",Hs," @"+I(e.value.user.username),1),e.value.is_top?(o(),P(b,{key:0,class:"top-tag",type:"warning",size:"small",round:""},{default:n(()=>[x(" 置顶 ")]),_:1})):i("",!0),e.value.visibility==a(Z).PRIVATE?(o(),P(b,{key:1,class:"top-tag",type:"error",size:"small",round:""},{default:n(()=>[x(" 私密 ")]),_:1})):i("",!0),e.value.visibility==a(Z).FRIEND?(o(),P(b,{key:2,class:"top-tag",type:"info",size:"small",round:""},{default:n(()=>[x(" 好友可见 ")]),_:1})):i("",!0)]),"header-extra":n(()=>[a(p).state.userInfo.is_admin||a(p).state.userInfo.id===e.value.user.id?(o(),u("div",Fs,[t(E,{placement:"bottom-end",trigger:"click",size:"small",options:O.value,onSelect:j},{default:n(()=>[t(C,{quaternary:"",circle:""},{icon:n(()=>[t(a(Y),null,{default:n(()=>[t(a(lt))]),_:1})]),_:1})]),_:1},8,["options"])])):i("",!0),t(D,{show:L.value,"onUpdate:show":d[1]||(d[1]=N=>L.value=N),"mask-closable":!1,preset:"dialog",title:"提示",content:"确定删除该泡泡动态吗?","positive-text":"确认","negative-text":"取消",onPositiveClick:B},null,8,["show"]),t(D,{show:r.value,"onUpdate:show":d[2]||(d[2]=N=>r.value=N),"mask-closable":!1,preset:"dialog",title:"提示",content:"确定"+(e.value.is_lock?"解锁":"锁定")+"该泡泡动态吗?","positive-text":"确认","negative-text":"取消",onPositiveClick:V},null,8,["show","content"]),t(D,{show:U.value,"onUpdate:show":d[3]||(d[3]=N=>U.value=N),"mask-closable":!1,preset:"dialog",title:"提示",content:"确定"+(e.value.is_top?"取消置顶":"置顶")+"该泡泡动态吗?","positive-text":"确认","negative-text":"取消",onPositiveClick:z},null,8,["show","content"]),t(D,{show:T.value,"onUpdate:show":d[4]||(d[4]=N=>T.value=N),"mask-closable":!1,preset:"dialog",title:"提示",content:"确定将该泡泡动态"+(e.value.is_essence?"取消亮点":"设为亮点")+"吗?","positive-text":"确认","negative-text":"取消",onPositiveClick:S},null,8,["show","content"]),t(D,{show:h.value,"onUpdate:show":d[5]||(d[5]=N=>h.value=N),"mask-closable":!1,preset:"dialog",title:"提示",content:"确定将该泡泡动态可见度修改为"+(R.value==0?"公开":R.value==1?"私密":"好友可见")+"吗?","positive-text":"确认","negative-text":"取消",onPositiveClick:K},null,8,["show","content"])]),footer:n(()=>[t(Q,{attachments:e.value.attachments},null,8,["attachments"]),t(Q,{attachments:e.value.charge_attachments,price:e.value.attachment_price},null,8,["attachments","price"]),t(pe,{imgs:e.value.imgs},null,8,["imgs"]),t(de,{videos:e.value.videos,full:!0},null,8,["videos"]),t(me,{links:e.value.links},null,8,["links"]),v("div",Js,[x(" 发布于 "+I(a(ue)(e.value.created_on))+" ",1),e.value.ip_loc?(o(),u("span",Ks,[t(ne,{vertical:""}),x(" "+I(e.value.ip_loc),1)])):i("",!0),!a(p).state.collapsedLeft&&e.value.created_on!=e.value.latest_replied_on?(o(),u("span",Qs,[t(ne,{vertical:""}),x(" 最后回复 "+I(a(ue)(e.value.latest_replied_on)),1)])):i("",!0)])]),action:n(()=>[v("div",Ws,[t(G,{justify:"space-between"},{default:n(()=>[v("div",{class:"opt-item hover",onClick:H(F,["stop"])},[t(a(Y),{size:"20",class:"opt-item-icon"},{default:n(()=>[y.value?i("",!0):(o(),P(a(it),{key:0})),y.value?(o(),P(a(ut),{key:1,color:"red"})):i("",!0)]),_:1}),x(" "+I(e.value.upvote_count),1)],8,Gs),v("div",Xs,[t(a(Y),{size:"20",class:"opt-item-icon"},{default:n(()=>[t(a(ct))]),_:1}),x(" "+I(e.value.comment_count),1)]),v("div",{class:"opt-item hover",onClick:H(J,["stop"])},[t(a(Y),{size:"20",class:"opt-item-icon"},{default:n(()=>[k.value?i("",!0):(o(),P(a(rt),{key:0})),k.value?(o(),P(a(_t),{key:1,color:"#ff7600"})):i("",!0)]),_:1}),x(" "+I(e.value.collection_count),1)],8,Zs),v("div",{class:"opt-item hover",onClick:H(W,["stop"])},[t(a(Y),{size:"20",class:"opt-item-icon"},{default:n(()=>[t(a(pt))]),_:1}),x(" "+I(e.value.share_count),1)],8,eo)]),_:1})])]),default:n(()=>[e.value.texts.length>0?(o(),u("div",Vs,[(o(!0),u(le,null,ie(e.value.texts,N=>(o(),u("span",{key:N.id,class:"post-text",onClick:d[6]||(d[6]=H(De=>M(De,e.value.id),["stop"])),innerHTML:a(we)(N.content).content},null,8,Ys))),128))])):i("",!0)]),_:1})])}}});const so=A=>(Ie("data-v-0d01659f"),A=A(),Te(),A),oo={key:0,class:"detail-wrap"},no={key:1,class:"empty-wrap"},ao={key:0,class:"comment-opts-wrap"},lo=so(()=>v("span",{class:"comment-title-item"},"评论",-1)),io={key:2},uo={key:0,class:"skeleton-wrap"},co={key:1},ro={key:0,class:"empty-wrap"},_o={key:0,class:"load-more-spinner"},po={key:1,class:"load-more-spinner"},mo={key:2,class:"load-more-spinner"},vo={key:3,class:"load-more-spinner"},ee=20,ho=X({__name:"Post",setup(A){const q=qt(),l=c({}),p=c(!1),f=c(!1),y=c([]),k=ae(()=>+q.query.id),L=c("default"),r=c(!0);let U={loading(){},loaded(){},complete(){},error(){}};const T=z=>{L.value=z,z==="default"&&(r.value=!0),B(U)},h=()=>{l.value={id:0},p.value=!0,nt({id:k.value}).then(z=>{p.value=!1,l.value=z,B(U)}).catch(z=>{p.value=!1})};let $=1;const R=c(!1),e=c([]),_=z=>{R.value||$e({id:l.value.id,sort_strategy:"default",page:$,page_size:ee}).then(S=>{z!==null&&(U=z),S.list.length0&&($===1?e.value=S.list:e.value.push(...S.list),y.value=e.value),U.loaded(),f.value=!1}).catch(S=>{f.value=!1,U.error()})};let O=1,w=c(!1);const M=c([]),j=z=>{w.value||$e({id:l.value.id,sort_strategy:"newest",page:O,page_size:ee}).then(S=>{z!==null&&(U=z),S.list.length0&&(O===1?M.value=S.list:M.value.push(...S.list),y.value=M.value),U.loaded(),f.value=!1}).catch(S=>{f.value=!1,U.error()})},B=z=>{k.value<1||(y.value.length===0&&(f.value=!0),L.value==="default"?(y.value=e.value,_(z)):(y.value=M.value,j(z)),f.value=!1)},V=()=>{$=1,R.value=!1,e.value=[],O=1,w.value=!1,M.value=[],B(U)};return ye(()=>{h()}),Ee(k,()=>{k.value>0&&q.name==="post"&&h()}),(z,S)=>{const K=Bt,F=to,J=Ut,W=Rt,s=St,d=Lt,m=Ot,g=Bs,b=Et,C=Ps,E=Le,D=zt;return o(),u("div",null,[t(K,{title:"泡泡详情",back:!0}),t(D,{class:"main-content-wrap",bordered:""},{default:n(()=>[t(s,null,{default:n(()=>[t(W,{show:p.value},{default:n(()=>[l.value.id>1?(o(),u("div",oo,[t(F,{post:l.value,onReload:h},null,8,["post"])])):(o(),u("div",no,[t(J,{size:"large",description:"暂无数据"})]))]),_:1},8,["show"])]),_:1}),l.value.id>0?(o(),u("div",ao,[t(m,{type:"bar","justify-content":"end",size:"small",animated:"","onUpdate:value":T},{prefix:n(()=>[lo]),default:n(()=>[t(d,{name:"default",tab:"默认"}),t(d,{name:"newest",tab:"最新"})]),_:1})])):i("",!0),l.value.id>0?(o(),P(s,{key:1},{default:n(()=>[t(g,{lock:l.value.is_lock,"post-id":l.value.id,onPostSuccess:V},null,8,["lock","post-id"])]),_:1})):i("",!0),l.value.id>0?(o(),u("div",io,[f.value?(o(),u("div",uo,[t(b,{num:5})])):(o(),u("div",co,[y.value.length===0?(o(),u("div",ro,[t(J,{size:"large",description:"暂无评论,快来抢沙发"})])):i("",!0),(o(!0),u(le,null,ie(y.value,Q=>(o(),P(s,{key:Q.id},{default:n(()=>[t(C,{comment:Q,onReload:V},null,8,["comment"])]),_:2},1024))),128))]))])):i("",!0),y.value.length>=ee?(o(),P(E,{key:3,justify:"center"},{default:n(()=>[t(a(Ht),{class:"load-more",slots:{complete:"没有更多数据了",error:"加载出错"},onInfinite:B},{spinner:n(()=>[r.value&&R.value?(o(),u("span",_o)):i("",!0),!r.value&&a(w)?(o(),u("span",po)):i("",!0),r.value&&!R.value?(o(),u("span",mo,"加载评论")):i("",!0),!r.value&&!a(w)?(o(),u("span",vo,"加载评论")):i("",!0)]),_:1})]),_:1})):i("",!0)]),_:1})])}}});const Qo=se(ho,[["__scopeId","data-v-0d01659f"]]);export{Qo as default}; +import{d as X,r as c,a3 as ge,o,c as u,a as v,V as t,a1 as n,e as x,M as I,Q as P,O as i,_ as a,a2 as H,n as ae,a7 as qe,F as le,a4 as ie,j as ye,W as Ie,X as Te,s as be,w as Ee}from"./@vue-e0e89260.js";import{u as te}from"./vuex-473b3783.js";import{f as ue}from"./formatTime-4210fcd1.js";import{t as Ne,d as je,e as Be,_ as se,f as He,h as Fe,i as Ve,j as Ye,g as Je,k as Ke,l as Qe,m as We,n as Ge,o as Xe,s as Ze,p as et,v as tt,q as st,r as ot,u as nt,w as $e}from"./index-479e9ef6.js";import{Y as ce,V as Z}from"./IEnum-a180d93e.js";import{T as Pe,e as re,f as ze,g as _e,h as Ue,I as at,i as lt,j as it,k as ut,l as ct,m as rt,n as _t,o as pt,p as dt,q as mt,r as vt,s as Ce,F as xe,E as ve,t as he,u as fe}from"./@vicons-0524c43e.js";import{j as Y,e as oe,J as Re,K as ht,b as ft,L as gt,o as ke,M as Se,v as yt,w as kt,x as wt,y as bt,z as $t,B as Ct,O as xt,P as It,i as Tt,Q as Pt,a as Le,F as zt,I as Ut,k as Rt,H as St,f as Lt,g as Ot}from"./naive-ui-62663ad7.js";import{p as we,_ as Oe,a as Mt,b as At,c as Dt}from"./content-ffcf943b.js";import{u as Me,b as qt}from"./vue-router-b8e3382f.js";import{_ as Et}from"./post-skeleton-c0397381.js";import{l as Nt}from"./lodash-94eb5868.js";import{a as jt}from"./copy-to-clipboard-1dd3075d.js";import{_ as Bt}from"./main-nav.vue_vue_type_style_index_0_lang-db217db0.js";import{W as Ht}from"./v3-infinite-loading-e5c2e8bf.js";import"./moment-2ab8298d.js";import"./axios-4a70c6fc.js";/* empty css */import"./seemly-76b7b838.js";import"./vueuc-59ca65c3.js";import"./evtd-b614532e.js";import"./@css-render-580d83ec.js";import"./vooks-a50491fd.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-aa5e8b3f.js";import"./toggle-selection-93f4ad84.js";const Ft={class:"reply-item"},Vt={class:"header-wrap"},Yt={class:"username"},Jt={class:"reply-name"},Kt={class:"timestamp"},Qt={class:"base-wrap"},Wt={class:"content"},Gt={class:"reply-switch"},Xt={class:"time-item"},Zt={class:"actions"},es={class:"upvote-count"},ts=["onClick"],ss={class:"upvote-count"},os={key:2,class:"action-item"},ns=["onClick"],as=X({__name:"reply-item",props:{tweetId:{},reply:{}},emits:["focusReply","reload"],setup(A,{emit:q}){const l=A,p=te(),f=c(l.reply.is_thumbs_up==ce.YES),y=c(l.reply.is_thumbs_down==ce.YES),k=c(l.reply.thumbs_up_count),L=()=>{Ne({tweet_id:l.tweetId,comment_id:l.reply.comment_id,reply_id:l.reply.id}).then(h=>{f.value=!f.value,f.value?(k.value++,y.value=!1):k.value--}).catch(h=>{console.log(h)})},r=()=>{je({tweet_id:l.tweetId,comment_id:l.reply.comment_id,reply_id:l.reply.id}).then(h=>{y.value=!y.value,y.value&&f.value&&(k.value--,f.value=!1)}).catch(h=>{console.log(h)})},U=()=>{q("focusReply",l.reply)},T=()=>{Be({id:l.reply.id}).then(h=>{window.$message.success("删除成功"),setTimeout(()=>{q("reload")},50)}).catch(h=>{console.log(h)})};return(h,$)=>{const R=ge("router-link"),e=Y,_=oe,O=Re,w=ht;return o(),u("div",Ft,[v("div",Vt,[v("div",Yt,[t(R,{class:"user-link",to:{name:"user",query:{s:l.reply.user.username}}},{default:n(()=>[x(I(l.reply.user.username),1)]),_:1},8,["to"]),v("span",Jt,I(l.reply.at_user_id>0?"回复":":"),1),l.reply.at_user_id>0?(o(),P(R,{key:0,class:"user-link",to:{name:"user",query:{s:l.reply.at_user.username}}},{default:n(()=>[x(I(l.reply.at_user.username),1)]),_:1},8,["to"])):i("",!0)]),v("div",Kt,[x(I(l.reply.ip_loc)+" ",1),a(p).state.userInfo.is_admin||a(p).state.userInfo.id===l.reply.user.id?(o(),P(O,{key:0,"negative-text":"取消","positive-text":"确认",onPositiveClick:T},{trigger:n(()=>[t(_,{quaternary:"",circle:"",size:"tiny",class:"del-btn"},{icon:n(()=>[t(e,null,{default:n(()=>[t(a(Pe))]),_:1})]),_:1})]),default:n(()=>[x(" 是否确认删除? ")]),_:1})):i("",!0)])]),v("div",Qt,[v("div",Wt,[t(w,{"expand-trigger":"click","line-clamp":"5",tooltip:!1},{default:n(()=>[x(I(l.reply.content),1)]),_:1})]),v("div",Gt,[v("span",Xt,I(a(ue)(l.reply.created_on)),1),v("div",Zt,[a(p).state.userLogined?i("",!0):(o(),u("div",{key:0,class:"action-item",onClick:$[0]||($[0]=H(()=>{},["stop"]))},[t(e,{size:"medium"},{default:n(()=>[t(a(re))]),_:1}),v("span",es,I(k.value),1)])),a(p).state.userLogined?(o(),u("div",{key:1,class:"action-item hover",onClick:H(L,["stop"])},[t(e,{size:"medium"},{default:n(()=>[f.value?i("",!0):(o(),P(a(re),{key:0})),f.value?(o(),P(a(ze),{key:1,class:"show"})):i("",!0)]),_:1}),v("span",ss,I(k.value>0?k.value:"赞"),1)],8,ts)):i("",!0),a(p).state.userLogined?i("",!0):(o(),u("div",os,[t(e,{size:"medium"},{default:n(()=>[t(a(_e))]),_:1})])),a(p).state.userLogined?(o(),u("div",{key:3,class:"action-item hover",onClick:H(r,["stop"])},[t(e,{size:"medium"},{default:n(()=>[y.value?i("",!0):(o(),P(a(_e),{key:0})),y.value?(o(),P(a(Ue),{key:1,class:"show"})):i("",!0)]),_:1})],8,ns)):i("",!0),a(p).state.userLogined?(o(),u("span",{key:4,class:"show opacity-item reply-btn",onClick:U}," 回复 ")):i("",!0)])])])])}}});const ls=se(as,[["__scopeId","data-v-187a4ed3"]]),is={class:"reply-compose-wrap"},us={class:"reply-switch"},cs={class:"time-item"},rs={class:"actions"},_s={key:0,class:"action-item"},ps={class:"upvote-count"},ds=["onClick"],ms={class:"upvote-count"},vs={key:2,class:"action-item"},hs=["onClick"],fs={key:0,class:"reply-input-wrap"},gs=X({__name:"compose-reply",props:{comment:{},atUserid:{default:0},atUsername:{default:""}},emits:["reload","reset"],setup(A,{expose:q,emit:l}){const p=A,f=te(),y=c(),k=c(!1),L=c(""),r=c(!1),U=+"300",T=c(p.comment.is_thumbs_up==ce.YES),h=c(p.comment.is_thumbs_down==ce.YES),$=c(p.comment.thumbs_up_count),R=()=>{He({tweet_id:p.comment.post_id,comment_id:p.comment.id}).then(w=>{T.value=!T.value,T.value?($.value++,h.value=!1):$.value--}).catch(w=>{console.log(w)})},e=()=>{Fe({tweet_id:p.comment.post_id,comment_id:p.comment.id}).then(w=>{h.value=!h.value,h.value&&T.value&&($.value--,T.value=!1)}).catch(w=>{console.log(w)})},_=w=>{k.value=w,w?setTimeout(()=>{var M;(M=y.value)==null||M.focus()},10):(r.value=!1,L.value="",l("reset"))},O=()=>{r.value=!0,Ve({comment_id:p.comment.id,at_user_id:p.atUserid,content:L.value}).then(w=>{_(!1),window.$message.success("评论成功"),l("reload")}).catch(w=>{r.value=!1})};return q({switchReply:_}),(w,M)=>{const j=Y,B=ft,V=oe,z=gt;return o(),u("div",is,[v("div",us,[v("span",cs,I(a(ue)(w.comment.created_on)),1),v("div",rs,[a(f).state.userLogined?i("",!0):(o(),u("div",_s,[t(j,{size:"medium"},{default:n(()=>[t(a(re))]),_:1}),v("span",ps,I($.value),1)])),a(f).state.userLogined?(o(),u("div",{key:1,class:"action-item hover",onClick:H(R,["stop"])},[t(j,{size:"medium"},{default:n(()=>[T.value?i("",!0):(o(),P(a(re),{key:0})),T.value?(o(),P(a(ze),{key:1,class:"show"})):i("",!0)]),_:1}),v("span",ms,I($.value>0?$.value:"赞"),1)],8,ds)):i("",!0),a(f).state.userLogined?i("",!0):(o(),u("div",vs,[t(j,{size:"medium"},{default:n(()=>[t(a(_e))]),_:1})])),a(f).state.userLogined?(o(),u("div",{key:3,class:"action-item hover",onClick:H(e,["stop"])},[t(j,{size:"medium"},{default:n(()=>[h.value?i("",!0):(o(),P(a(_e),{key:0})),h.value?(o(),P(a(Ue),{key:1,class:"show"})):i("",!0)]),_:1})],8,hs)):i("",!0),a(f).state.userLogined&&!k.value?(o(),u("span",{key:4,class:"show reply-btn",onClick:M[0]||(M[0]=S=>_(!0))}," 回复 ")):i("",!0),a(f).state.userLogined&&k.value?(o(),u("span",{key:5,class:"hide reply-btn",onClick:M[1]||(M[1]=S=>_(!1))}," 取消 ")):i("",!0)])]),k.value?(o(),u("div",fs,[t(z,null,{default:n(()=>[t(B,{ref_key:"inputInstRef",ref:y,size:"small",placeholder:p.atUsername?"@"+p.atUsername:"请输入回复内容..",maxlength:a(U),value:L.value,"onUpdate:value":M[2]||(M[2]=S=>L.value=S),"show-count":"",clearable:""},null,8,["placeholder","maxlength","value"]),t(V,{type:"primary",size:"small",ghost:"",loading:r.value,onClick:O},{default:n(()=>[x(" 回复 ")]),_:1},8,["loading"])]),_:1})])):i("",!0)])}}});const ys=se(gs,[["__scopeId","data-v-f9af7a93"]]),ks={class:"comment-item"},ws={class:"nickname-wrap"},bs={class:"username-wrap"},$s={class:"opt-wrap"},Cs={class:"timestamp"},xs=["innerHTML"],Is={class:"reply-wrap"},Ts=X({__name:"comment-item",props:{comment:{}},emits:["reload"],setup(A,{emit:q}){const l=A,p=te(),f=Me(),y=c(0),k=c(""),L=c(),r=ae(()=>{let e=Object.assign({texts:[],imgs:[]},l.comment);return e.contents.map(_=>{(+_.type==1||+_.type==2)&&e.texts.push(_),+_.type==3&&e.imgs.push(_)}),e}),U=(e,_)=>{let O=e.target;if(O.dataset.detail){const w=O.dataset.detail.split(":");w.length===2&&(p.commit("refresh"),w[0]==="tag"?window.$message.warning("评论内的无效话题"):f.push({name:"user",query:{s:w[1]}}))}},T=e=>{var _,O;y.value=e.user_id,k.value=((_=e.user)==null?void 0:_.username)||"",(O=L.value)==null||O.switchReply(!0)},h=()=>{q("reload")},$=()=>{y.value=0,k.value=""},R=()=>{Ye({id:r.value.id}).then(e=>{window.$message.success("删除成功"),setTimeout(()=>{h()},50)}).catch(e=>{})};return(e,_)=>{const O=ke,w=ge("router-link"),M=Y,j=oe,B=Re,V=Oe,z=ys,S=ls,K=Se;return o(),u("div",ks,[t(K,{"content-indented":""},qe({avatar:n(()=>[t(O,{round:"",size:30,src:r.value.user.avatar},null,8,["src"])]),header:n(()=>[v("span",ws,[t(w,{onClick:_[0]||(_[0]=H(()=>{},["stop"])),class:"username-link",to:{name:"user",query:{s:r.value.user.username}}},{default:n(()=>[x(I(r.value.user.nickname),1)]),_:1},8,["to"])]),v("span",bs," @"+I(r.value.user.username),1)]),"header-extra":n(()=>[v("div",$s,[v("span",Cs,I(r.value.ip_loc),1),a(p).state.userInfo.is_admin||a(p).state.userInfo.id===r.value.user.id?(o(),P(B,{key:0,"negative-text":"取消","positive-text":"确认",onPositiveClick:R},{trigger:n(()=>[t(j,{quaternary:"",circle:"",size:"tiny",class:"del-btn"},{icon:n(()=>[t(M,null,{default:n(()=>[t(a(Pe))]),_:1})]),_:1})]),default:n(()=>[x(" 是否确认删除? ")]),_:1})):i("",!0)])]),footer:n(()=>[r.value.imgs.length>0?(o(),P(V,{key:0,imgs:r.value.imgs},null,8,["imgs"])):i("",!0),t(z,{ref_key:"replyComposeRef",ref:L,comment:r.value,"at-userid":y.value,"at-username":k.value,onReload:h,onReset:$},null,8,["comment","at-userid","at-username"]),v("div",Is,[(o(!0),u(le,null,ie(r.value.replies,F=>(o(),P(S,{key:F.id,reply:F,"tweet-id":r.value.post_id,onFocusReply:T,onReload:h},null,8,["reply","tweet-id"]))),128))])]),_:2},[r.value.texts.length>0?{name:"description",fn:n(()=>[(o(!0),u(le,null,ie(r.value.texts,F=>(o(),u("span",{key:F.id,class:"comment-text",onClick:_[1]||(_[1]=H(J=>U(J,r.value.id),["stop"])),innerHTML:a(we)(F.content).content},null,8,xs))),128))]),key:"0"}:void 0]),1024)])}}});const Ps=se(Ts,[["__scopeId","data-v-36dac8c8"]]),zs=A=>(Ie("data-v-634e6bfd"),A=A(),Te(),A),Us={key:0,class:"compose-wrap"},Rs={class:"compose-line"},Ss={class:"compose-user"},Ls={class:"compose-line compose-options"},Os={class:"attachment"},Ms={class:"submit-wrap"},As={class:"attachment-list-wrap"},Ds={key:1,class:"compose-wrap"},qs=zs(()=>v("div",{class:"login-wrap"},[v("span",{class:"login-banner"}," 登录后,精彩更多")],-1)),Es={key:0,class:"login-only-wrap"},Ns={key:1,class:"login-wrap"},js=X({__name:"compose-comment",props:{lock:{default:0},postId:{default:0}},emits:["post-success"],setup(A,{emit:q}){const l=A,p=te(),f=c([]),y=c(!1),k=c(!1),L=c(!1),r=c(""),U=c(),T=c("public/image"),h=c([]),$=c([]),R=c("true".toLowerCase()==="true"),e=+"300",_="/v1/attachment",O=c(),w=Nt.debounce(m=>{Je({k:m}).then(g=>{let b=[];g.suggest.map(C=>{b.push({label:C,value:C})}),f.value=b,k.value=!1}).catch(g=>{k.value=!1})},200),M=(m,g)=>{k.value||(k.value=!0,g==="@"&&w(m))},j=m=>{m.length>e?r.value=m.substring(0,e):r.value=m},B=m=>{T.value=m},V=m=>{for(let E=0;E30&&(m[E].name=b.substring(0,18)+"..."+b.substring(b.length-9)+"."+C)}h.value=m},z=async m=>{var g,b;return T.value==="public/image"&&!["image/png","image/jpg","image/jpeg","image/gif"].includes((g=m.file.file)==null?void 0:g.type)?(window.$message.warning("图片仅允许 png/jpg/gif 格式"),!1):T.value==="image"&&((b=m.file.file)==null?void 0:b.size)>10485760?(window.$message.warning("图片大小不能超过10MB"),!1):!0},S=({file:m,event:g})=>{var b;try{let C=JSON.parse((b=g.target)==null?void 0:b.response);C.code===0&&T.value==="public/image"&&$.value.push({id:m.id,content:C.data.content})}catch{window.$message.error("上传失败")}},K=({file:m,event:g})=>{var b;try{let C=JSON.parse((b=g.target)==null?void 0:b.response);if(C.code!==0){let E=C.msg||"上传失败";C.details&&C.details.length>0&&C.details.map(D=>{E+=":"+D}),window.$message.error(E)}}catch{window.$message.error("上传失败")}},F=({file:m})=>{let g=$.value.findIndex(b=>b.id===m.id);g>-1&&$.value.splice(g,1)},J=()=>{y.value=!0},W=()=>{var m;y.value=!1,(m=U.value)==null||m.clear(),h.value=[],r.value="",$.value=[]},s=()=>{if(r.value.trim().length===0){window.$message.warning("请输入内容哦");return}let{users:m}=we(r.value);const g=[];let b=100;g.push({content:r.value,type:2,sort:b}),$.value.map(C=>{b++,g.push({content:C.content,type:3,sort:b})}),L.value=!0,Ke({contents:g,post_id:l.postId,users:Array.from(new Set(m))}).then(C=>{window.$message.success("发布成功"),L.value=!1,q("post-success"),W()}).catch(C=>{L.value=!1})},d=m=>{p.commit("triggerAuth",!0),p.commit("triggerAuthKey",m)};return ye(()=>{O.value="Bearer "+localStorage.getItem("PAOPAO_TOKEN")}),(m,g)=>{const b=ke,C=yt,E=Y,D=oe,Q=kt,pe=wt,de=bt,me=$t,ne=Ct;return o(),u("div",null,[a(p).state.userInfo.id>0?(o(),u("div",Us,[v("div",Rs,[v("div",Ss,[t(b,{round:"",size:30,src:a(p).state.userInfo.avatar},null,8,["src"])]),t(C,{type:"textarea",size:"large",autosize:"",bordered:!1,options:f.value,prefix:["@"],loading:k.value,value:r.value,disabled:l.lock===1,"onUpdate:value":j,onSearch:M,onFocus:J,placeholder:l.lock===1?"泡泡已被锁定,回复功能已关闭":"快来评论两句吧..."},null,8,["options","loading","value","disabled","placeholder"])]),y.value?(o(),P(ne,{key:0,ref_key:"uploadRef",ref:U,abstract:"","list-type":"image",multiple:!0,max:9,action:_,headers:{Authorization:O.value},data:{type:T.value},"file-list":h.value,onBeforeUpload:z,onFinish:S,onError:K,onRemove:F,"onUpdate:fileList":V},{default:n(()=>[v("div",Ls,[v("div",Os,[t(Q,{abstract:""},{default:n(({handleClick:G})=>[t(D,{disabled:h.value.length>0&&T.value==="public/video"||h.value.length===9,onClick:()=>{B("public/image"),G()},quaternary:"",circle:"",type:"primary"},{icon:n(()=>[t(E,{size:"20",color:"var(--primary-color)"},{default:n(()=>[t(a(at))]),_:1})]),_:2},1032,["disabled","onClick"])]),_:1}),t(de,{trigger:"hover",placement:"bottom"},{trigger:n(()=>[t(pe,{class:"text-statistic",type:"circle","show-indicator":!1,status:"success","stroke-width":10,percentage:r.value.length/a(e)*100},null,8,["percentage"])]),default:n(()=>[x(" "+I(r.value.length)+" / "+I(a(e)),1)]),_:1})]),v("div",Ms,[t(D,{quaternary:"",round:"",type:"tertiary",class:"cancel-btn",size:"small",onClick:W},{default:n(()=>[x(" 取消 ")]),_:1}),t(D,{loading:L.value,onClick:s,type:"primary",secondary:"",size:"small",round:""},{default:n(()=>[x(" 发布 ")]),_:1},8,["loading"])])]),v("div",As,[t(me)])]),_:1},8,["headers","data","file-list"])):i("",!0)])):(o(),u("div",Ds,[qs,R.value?i("",!0):(o(),u("div",Es,[t(D,{strong:"",secondary:"",round:"",type:"primary",onClick:g[0]||(g[0]=G=>d("signin"))},{default:n(()=>[x(" 登录 ")]),_:1})])),R.value?(o(),u("div",Ns,[t(D,{strong:"",secondary:"",round:"",type:"primary",onClick:g[1]||(g[1]=G=>d("signin"))},{default:n(()=>[x(" 登录 ")]),_:1}),t(D,{strong:"",secondary:"",round:"",type:"info",onClick:g[2]||(g[2]=G=>d("signup"))},{default:n(()=>[x(" 注册 ")]),_:1})])):i("",!0)]))])}}});const Bs=se(js,[["__scopeId","data-v-634e6bfd"]]),Hs={class:"username-wrap"},Fs={key:0,class:"options"},Vs={key:0},Ys=["innerHTML"],Js={class:"timestamp"},Ks={key:0},Qs={key:1},Ws={class:"opts-wrap"},Gs=["onClick"],Xs={class:"opt-item"},Zs=["onClick"],eo=["onClick"],to=X({__name:"post-detail",props:{post:{}},emits:["reload"],setup(A,{emit:q}){const l=A,p=te(),f=Me(),y=c(!1),k=c(!1),L=c(!1),r=c(!1),U=c(!1),T=c(!1),h=c(!1),$=c(!1),R=c(Z.PUBLIC),e=ae({get:()=>{let s=Object.assign({texts:[],imgs:[],videos:[],links:[],attachments:[],charge_attachments:[]},l.post);return s.contents.map(d=>{(+d.type==1||+d.type==2)&&s.texts.push(d),+d.type==3&&s.imgs.push(d),+d.type==4&&s.videos.push(d),+d.type==6&&s.links.push(d),+d.type==7&&s.attachments.push(d),+d.type==8&&s.charge_attachments.push(d)}),s},set:s=>{l.post.upvote_count=s.upvote_count,l.post.comment_count=s.comment_count,l.post.collection_count=s.collection_count,l.post.is_essence=s.is_essence}}),_=s=>()=>be(Y,null,{default:()=>be(s)}),O=ae(()=>{let s=[{label:"删除",key:"delete",icon:_(dt)}];return e.value.is_lock===0?s.push({label:"锁定",key:"lock",icon:_(mt)}):s.push({label:"解锁",key:"unlock",icon:_(vt)}),p.state.userInfo.is_admin&&(e.value.is_top===0?s.push({label:"置顶",key:"stick",icon:_(Ce)}):s.push({label:"取消置顶",key:"unstick",icon:_(Ce)})),e.value.is_essence===0?s.push({label:"设为亮点",key:"highlight",icon:_(xe)}):s.push({label:"取消亮点",key:"unhighlight",icon:_(xe)}),e.value.visibility===Z.PUBLIC?s.push({label:"公开",key:"vpublic",icon:_(ve),children:[{label:"私密",key:"vprivate",icon:_(he)},{label:"好友可见",key:"vfriend",icon:_(fe)}]}):e.value.visibility===Z.PRIVATE?s.push({label:"私密",key:"vprivate",icon:_(he),children:[{label:"公开",key:"vpublic",icon:_(ve)},{label:"好友可见",key:"vfriend",icon:_(fe)}]}):s.push({label:"好友可见",key:"vfriend",icon:_(fe),children:[{label:"公开",key:"vpublic",icon:_(ve)},{label:"私密",key:"vprivate",icon:_(he)}]}),s}),w=s=>{f.push({name:"post",query:{id:s}})},M=(s,d)=>{if(s.target.dataset.detail){const m=s.target.dataset.detail.split(":");if(m.length===2){p.commit("refresh"),m[0]==="tag"?f.push({name:"home",query:{q:m[1],t:"tag"}}):f.push({name:"user",query:{s:m[1]}});return}}w(d)},j=s=>{switch(s){case"delete":L.value=!0;break;case"lock":case"unlock":r.value=!0;break;case"stick":case"unstick":U.value=!0;break;case"highlight":case"unhighlight":T.value=!0;break;case"vpublic":R.value=0,h.value=!0;break;case"vprivate":R.value=1,h.value=!0;break;case"vfriend":R.value=2,h.value=!0;break}},B=()=>{Ge({id:e.value.id}).then(s=>{window.$message.success("删除成功"),f.replace("/"),setTimeout(()=>{p.commit("refresh")},50)}).catch(s=>{$.value=!1})},V=()=>{Xe({id:e.value.id}).then(s=>{q("reload"),s.lock_status===1?window.$message.success("锁定成功"):window.$message.success("解锁成功")}).catch(s=>{$.value=!1})},z=()=>{Ze({id:e.value.id}).then(s=>{q("reload"),s.top_status===1?window.$message.success("置顶成功"):window.$message.success("取消置顶成功")}).catch(s=>{$.value=!1})},S=()=>{et({id:e.value.id}).then(s=>{e.value={...e.value,is_essence:s.highlight_status},s.highlight_status===1?window.$message.success("设为亮点成功"):window.$message.success("取消亮点成功")}).catch(s=>{$.value=!1})},K=()=>{tt({id:e.value.id,visibility:R.value}).then(s=>{q("reload"),window.$message.success("修改可见性成功")}).catch(s=>{$.value=!1})},F=()=>{st({id:e.value.id}).then(s=>{y.value=s.status,s.status?e.value={...e.value,upvote_count:e.value.upvote_count+1}:e.value={...e.value,upvote_count:e.value.upvote_count-1}}).catch(s=>{console.log(s)})},J=()=>{ot({id:e.value.id}).then(s=>{k.value=s.status,s.status?e.value={...e.value,collection_count:e.value.collection_count+1}:e.value={...e.value,collection_count:e.value.collection_count-1}}).catch(s=>{console.log(s)})},W=()=>{jt(`${window.location.origin}/#/post?id=${e.value.id}`),window.$message.success("链接已复制到剪贴板")};return ye(()=>{p.state.userInfo.id>0&&(Qe({id:e.value.id}).then(s=>{y.value=s.status}).catch(s=>{console.log(s)}),We({id:e.value.id}).then(s=>{k.value=s.status}).catch(s=>{console.log(s)}))}),(s,d)=>{const m=ke,g=ge("router-link"),b=xt,C=oe,E=It,D=Tt,Q=Mt,pe=Oe,de=At,me=Dt,ne=Pt,G=Le,Ae=Se;return o(),u("div",{class:"detail-item",onClick:d[7]||(d[7]=N=>w(e.value.id))},[t(Ae,null,{avatar:n(()=>[t(m,{round:"",size:30,src:e.value.user.avatar},null,8,["src"])]),header:n(()=>[t(g,{onClick:d[0]||(d[0]=H(()=>{},["stop"])),class:"username-link",to:{name:"user",query:{s:e.value.user.username}}},{default:n(()=>[x(I(e.value.user.nickname),1)]),_:1},8,["to"]),v("span",Hs," @"+I(e.value.user.username),1),e.value.is_top?(o(),P(b,{key:0,class:"top-tag",type:"warning",size:"small",round:""},{default:n(()=>[x(" 置顶 ")]),_:1})):i("",!0),e.value.visibility==a(Z).PRIVATE?(o(),P(b,{key:1,class:"top-tag",type:"error",size:"small",round:""},{default:n(()=>[x(" 私密 ")]),_:1})):i("",!0),e.value.visibility==a(Z).FRIEND?(o(),P(b,{key:2,class:"top-tag",type:"info",size:"small",round:""},{default:n(()=>[x(" 好友可见 ")]),_:1})):i("",!0)]),"header-extra":n(()=>[a(p).state.userInfo.is_admin||a(p).state.userInfo.id===e.value.user.id?(o(),u("div",Fs,[t(E,{placement:"bottom-end",trigger:"click",size:"small",options:O.value,onSelect:j},{default:n(()=>[t(C,{quaternary:"",circle:""},{icon:n(()=>[t(a(Y),null,{default:n(()=>[t(a(lt))]),_:1})]),_:1})]),_:1},8,["options"])])):i("",!0),t(D,{show:L.value,"onUpdate:show":d[1]||(d[1]=N=>L.value=N),"mask-closable":!1,preset:"dialog",title:"提示",content:"确定删除该泡泡动态吗?","positive-text":"确认","negative-text":"取消",onPositiveClick:B},null,8,["show"]),t(D,{show:r.value,"onUpdate:show":d[2]||(d[2]=N=>r.value=N),"mask-closable":!1,preset:"dialog",title:"提示",content:"确定"+(e.value.is_lock?"解锁":"锁定")+"该泡泡动态吗?","positive-text":"确认","negative-text":"取消",onPositiveClick:V},null,8,["show","content"]),t(D,{show:U.value,"onUpdate:show":d[3]||(d[3]=N=>U.value=N),"mask-closable":!1,preset:"dialog",title:"提示",content:"确定"+(e.value.is_top?"取消置顶":"置顶")+"该泡泡动态吗?","positive-text":"确认","negative-text":"取消",onPositiveClick:z},null,8,["show","content"]),t(D,{show:T.value,"onUpdate:show":d[4]||(d[4]=N=>T.value=N),"mask-closable":!1,preset:"dialog",title:"提示",content:"确定将该泡泡动态"+(e.value.is_essence?"取消亮点":"设为亮点")+"吗?","positive-text":"确认","negative-text":"取消",onPositiveClick:S},null,8,["show","content"]),t(D,{show:h.value,"onUpdate:show":d[5]||(d[5]=N=>h.value=N),"mask-closable":!1,preset:"dialog",title:"提示",content:"确定将该泡泡动态可见度修改为"+(R.value==0?"公开":R.value==1?"私密":"好友可见")+"吗?","positive-text":"确认","negative-text":"取消",onPositiveClick:K},null,8,["show","content"])]),footer:n(()=>[t(Q,{attachments:e.value.attachments},null,8,["attachments"]),t(Q,{attachments:e.value.charge_attachments,price:e.value.attachment_price},null,8,["attachments","price"]),t(pe,{imgs:e.value.imgs},null,8,["imgs"]),t(de,{videos:e.value.videos,full:!0},null,8,["videos"]),t(me,{links:e.value.links},null,8,["links"]),v("div",Js,[x(" 发布于 "+I(a(ue)(e.value.created_on))+" ",1),e.value.ip_loc?(o(),u("span",Ks,[t(ne,{vertical:""}),x(" "+I(e.value.ip_loc),1)])):i("",!0),!a(p).state.collapsedLeft&&e.value.created_on!=e.value.latest_replied_on?(o(),u("span",Qs,[t(ne,{vertical:""}),x(" 最后回复 "+I(a(ue)(e.value.latest_replied_on)),1)])):i("",!0)])]),action:n(()=>[v("div",Ws,[t(G,{justify:"space-between"},{default:n(()=>[v("div",{class:"opt-item hover",onClick:H(F,["stop"])},[t(a(Y),{size:"20",class:"opt-item-icon"},{default:n(()=>[y.value?i("",!0):(o(),P(a(it),{key:0})),y.value?(o(),P(a(ut),{key:1,color:"red"})):i("",!0)]),_:1}),x(" "+I(e.value.upvote_count),1)],8,Gs),v("div",Xs,[t(a(Y),{size:"20",class:"opt-item-icon"},{default:n(()=>[t(a(ct))]),_:1}),x(" "+I(e.value.comment_count),1)]),v("div",{class:"opt-item hover",onClick:H(J,["stop"])},[t(a(Y),{size:"20",class:"opt-item-icon"},{default:n(()=>[k.value?i("",!0):(o(),P(a(rt),{key:0})),k.value?(o(),P(a(_t),{key:1,color:"#ff7600"})):i("",!0)]),_:1}),x(" "+I(e.value.collection_count),1)],8,Zs),v("div",{class:"opt-item hover",onClick:H(W,["stop"])},[t(a(Y),{size:"20",class:"opt-item-icon"},{default:n(()=>[t(a(pt))]),_:1}),x(" "+I(e.value.share_count),1)],8,eo)]),_:1})])]),default:n(()=>[e.value.texts.length>0?(o(),u("div",Vs,[(o(!0),u(le,null,ie(e.value.texts,N=>(o(),u("span",{key:N.id,class:"post-text",onClick:d[6]||(d[6]=H(De=>M(De,e.value.id),["stop"])),innerHTML:a(we)(N.content).content},null,8,Ys))),128))])):i("",!0)]),_:1})])}}});const so=A=>(Ie("data-v-0d01659f"),A=A(),Te(),A),oo={key:0,class:"detail-wrap"},no={key:1,class:"empty-wrap"},ao={key:0,class:"comment-opts-wrap"},lo=so(()=>v("span",{class:"comment-title-item"},"评论",-1)),io={key:2},uo={key:0,class:"skeleton-wrap"},co={key:1},ro={key:0,class:"empty-wrap"},_o={key:0,class:"load-more-spinner"},po={key:1,class:"load-more-spinner"},mo={key:2,class:"load-more-spinner"},vo={key:3,class:"load-more-spinner"},ee=20,ho=X({__name:"Post",setup(A){const q=qt(),l=c({}),p=c(!1),f=c(!1),y=c([]),k=ae(()=>+q.query.id),L=c("default"),r=c(!0);let U={loading(){},loaded(){},complete(){},error(){}};const T=z=>{L.value=z,z==="default"&&(r.value=!0),B(U)},h=()=>{l.value={id:0},p.value=!0,nt({id:k.value}).then(z=>{p.value=!1,l.value=z,B(U)}).catch(z=>{p.value=!1})};let $=1;const R=c(!1),e=c([]),_=z=>{R.value||$e({id:l.value.id,sort_strategy:"default",page:$,page_size:ee}).then(S=>{z!==null&&(U=z),S.list.length0&&($===1?e.value=S.list:e.value.push(...S.list),y.value=e.value),U.loaded(),f.value=!1}).catch(S=>{f.value=!1,U.error()})};let O=1,w=c(!1);const M=c([]),j=z=>{w.value||$e({id:l.value.id,sort_strategy:"newest",page:O,page_size:ee}).then(S=>{z!==null&&(U=z),S.list.length0&&(O===1?M.value=S.list:M.value.push(...S.list),y.value=M.value),U.loaded(),f.value=!1}).catch(S=>{f.value=!1,U.error()})},B=z=>{k.value<1||(y.value.length===0&&(f.value=!0),L.value==="default"?(y.value=e.value,_(z)):(y.value=M.value,j(z)),f.value=!1)},V=()=>{$=1,R.value=!1,e.value=[],O=1,w.value=!1,M.value=[],B(U)};return ye(()=>{h()}),Ee(k,()=>{k.value>0&&q.name==="post"&&h()}),(z,S)=>{const K=Bt,F=to,J=Ut,W=Rt,s=St,d=Lt,m=Ot,g=Bs,b=Et,C=Ps,E=Le,D=zt;return o(),u("div",null,[t(K,{title:"泡泡详情",back:!0}),t(D,{class:"main-content-wrap",bordered:""},{default:n(()=>[t(s,null,{default:n(()=>[t(W,{show:p.value},{default:n(()=>[l.value.id>1?(o(),u("div",oo,[t(F,{post:l.value,onReload:h},null,8,["post"])])):(o(),u("div",no,[t(J,{size:"large",description:"暂无数据"})]))]),_:1},8,["show"])]),_:1}),l.value.id>0?(o(),u("div",ao,[t(m,{type:"bar","justify-content":"end",size:"small",animated:"","onUpdate:value":T},{prefix:n(()=>[lo]),default:n(()=>[t(d,{name:"default",tab:"默认"}),t(d,{name:"newest",tab:"最新"})]),_:1})])):i("",!0),l.value.id>0?(o(),P(s,{key:1},{default:n(()=>[t(g,{lock:l.value.is_lock,"post-id":l.value.id,onPostSuccess:V},null,8,["lock","post-id"])]),_:1})):i("",!0),l.value.id>0?(o(),u("div",io,[f.value?(o(),u("div",uo,[t(b,{num:5})])):(o(),u("div",co,[y.value.length===0?(o(),u("div",ro,[t(J,{size:"large",description:"暂无评论,快来抢沙发"})])):i("",!0),(o(!0),u(le,null,ie(y.value,Q=>(o(),P(s,{key:Q.id},{default:n(()=>[t(C,{comment:Q,onReload:V},null,8,["comment"])]),_:2},1024))),128))]))])):i("",!0),y.value.length>=ee?(o(),P(E,{key:3,justify:"center"},{default:n(()=>[t(a(Ht),{class:"load-more",slots:{complete:"没有更多数据了",error:"加载出错"},onInfinite:B},{spinner:n(()=>[r.value&&R.value?(o(),u("span",_o)):i("",!0),!r.value&&a(w)?(o(),u("span",po)):i("",!0),r.value&&!R.value?(o(),u("span",mo,"加载评论")):i("",!0),!r.value&&!a(w)?(o(),u("span",vo,"加载评论")):i("",!0)]),_:1})]),_:1})):i("",!0)]),_:1})])}}});const Qo=se(ho,[["__scopeId","data-v-0d01659f"]]);export{Qo as default}; diff --git a/web/dist/assets/Profile-2ea0d06d.css b/web/dist/assets/Profile-2ea0d06d.css new file mode 100644 index 00000000..6ef1ce98 --- /dev/null +++ b/web/dist/assets/Profile-2ea0d06d.css @@ -0,0 +1 @@ +.profile-baseinfo[data-v-8ca59137]{display:flex;padding:16px}.profile-baseinfo .avatar[data-v-8ca59137]{width:72px}.profile-baseinfo .base-info[data-v-8ca59137]{position:relative;margin-left:12px;width:calc(100% - 84px)}.profile-baseinfo .base-info .username[data-v-8ca59137]{line-height:16px;font-size:16px}.profile-baseinfo .base-info .userinfo[data-v-8ca59137]{font-size:14px;line-height:14px;margin-top:10px;opacity:.75}.profile-baseinfo .base-info .userinfo .info-item[data-v-8ca59137]{margin-right:12px}.profile-baseinfo .base-info .top-tag[data-v-8ca59137]{transform:scale(.75)}.profile-tabs-wrap[data-v-8ca59137]{padding:0 16px}.pagination-wrap[data-v-8ca59137]{padding:10px;display:flex;justify-content:center;overflow:hidden}.dark .profile-baseinfo[data-v-8ca59137]{background-color:#18181c}.dark .profile-wrap[data-v-8ca59137],.dark .pagination-wrap[data-v-8ca59137]{background-color:#101014bf} diff --git a/web/dist/assets/Profile-95065114.js b/web/dist/assets/Profile-95065114.js deleted file mode 100644 index cde4a7d3..00000000 --- a/web/dist/assets/Profile-95065114.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as J,a as K}from"./post-item.vue_vue_type_style_index_0_lang-6f0e8ce9.js";import{_ as W}from"./post-skeleton-949f6995.js";import{_ as X}from"./main-nav.vue_vue_type_style_index_0_lang-e28257cc.js";import{u as Y}from"./vuex-473b3783.js";import{b as Z}from"./vue-router-b8e3382f.js";import{B as g,_ as ee}from"./index-a0347e1a.js";import{d as ae,r as u,j as te,w as se,c as i,V as n,_,Q as T,a1 as f,O as z,o as l,a as p,M as q,F as V,a4 as F}from"./@vue-e0e89260.js";import{F as oe,G as ne,o as le,f as re,g as ue,I as ie,H as ce}from"./naive-ui-62663ad7.js";import"./content-5d77464b.js";import"./@vicons-8f91201d.js";import"./paopao-video-player-aa5e8b3f.js";import"./formatTime-cdf4e6f1.js";import"./moment-2ab8298d.js";import"./copy-to-clipboard-1dd3075d.js";import"./toggle-selection-93f4ad84.js";import"./vooks-a50491fd.js";import"./evtd-b614532e.js";import"./axios-4a70c6fc.js";/* empty css */import"./seemly-76b7b838.js";import"./vueuc-59ca65c3.js";import"./@css-render-580d83ec.js";import"./vdirs-b0483831.js";import"./@juggle-41516555.js";import"./css-render-6a5c5852.js";import"./@emotion-8a8e73f6.js";import"./lodash-es-8412e618.js";import"./treemate-25c27bff.js";import"./async-validator-dee29e8b.js";import"./date-fns-975a2d8f.js";const _e={class:"profile-baseinfo"},pe={class:"avatar"},me={class:"base-info"},ve={class:"username"},de={class:"uid"},ge={key:0,class:"skeleton-wrap"},he={key:1},fe={key:0,class:"empty-wrap"},ke={key:1},be={key:2},we={key:1,class:"pagination-wrap"},ye=ae({__name:"Profile",setup(Pe){const s=Y(),m=Z(),t=u(!1),o=u([]),h=u("post"),x=u(+m.query.p||1),B=u(1),S=u(1),$=u(1),C=u(1),a=u(+m.query.p||1),r=u(20),c=u(0),k=()=>{switch(h.value){case"post":b();break;case"comment":w();break;case"highlight":y();break;case"media":P();break;case"star":I();break}},b=()=>{t.value=!0,g({username:s.state.userInfo.username,style:"post",page:a.value,page_size:r.value}).then(e=>{t.value=!1,o.value=e.list||[],c.value=Math.ceil(e.pager.total_rows/r.value),window.scrollTo(0,0)}).catch(e=>{o.value=[],t.value=!1})},w=()=>{t.value=!0,g({username:s.state.userInfo.username,style:"comment",page:a.value,page_size:r.value}).then(e=>{t.value=!1,o.value=e.list||[],c.value=Math.ceil(e.pager.total_rows/r.value),window.scrollTo(0,0)}).catch(e=>{o.value=[],t.value=!1})},y=()=>{t.value=!0,g({username:s.state.userInfo.username,style:"highlight",page:a.value,page_size:r.value}).then(e=>{t.value=!1,o.value=e.list||[],c.value=Math.ceil(e.pager.total_rows/r.value),window.scrollTo(0,0)}).catch(e=>{o.value=[],t.value=!1})},P=()=>{t.value=!0,g({username:s.state.userInfo.username,style:"media",page:a.value,page_size:r.value}).then(e=>{t.value=!1,o.value=e.list||[],c.value=Math.ceil(e.pager.total_rows/r.value),window.scrollTo(0,0)}).catch(e=>{o.value=[],t.value=!1})},I=()=>{t.value=!0,g({username:s.state.userInfo.username,style:"star",page:a.value,page_size:r.value}).then(e=>{t.value=!1,o.value=e.list||[],c.value=Math.ceil(e.pager.total_rows/r.value),window.scrollTo(0,0)}).catch(e=>{o.value=[],t.value=!1})},N=e=>{switch(h.value=e,h.value){case"post":a.value=x.value,b();break;case"comment":a.value=B.value,w();break;case"highlight":a.value=S.value,y();break;case"media":a.value=$.value,P();break;case"star":a.value=C.value,I();break}},D=e=>{switch(a.value=e,h.value){case"post":x.value=e,b();break;case"comment":B.value=a.value,w();break;case"highlight":S.value=a.value,y();break;case"media":$.value=a.value,P();break;case"star":C.value=a.value,I();break}};return te(()=>{k()}),se(()=>({path:m.path,query:m.query,refresh:s.state.refresh}),(e,M)=>{if(e.refresh!==M.refresh){a.value=+m.query.p||1,setTimeout(()=>{k()},0);return}M.path!=="/post"&&e.path==="/profile"&&(a.value=+m.query.p||1,setTimeout(()=>{k()},0))}),(e,M)=>{const H=X,R=le,v=re,j=ue,E=W,G=ie,L=J,U=ce,O=K,Q=oe,A=ne;return l(),i("div",null,[n(H,{title:"主页"}),_(s).state.userInfo.id>0?(l(),T(Q,{key:0,class:"main-content-wrap profile-wrap",bordered:""},{default:f(()=>[p("div",_e,[p("div",pe,[n(R,{size:"large",src:_(s).state.userInfo.avatar},null,8,["src"])]),p("div",me,[p("div",ve,[p("strong",null,q(_(s).state.userInfo.nickname),1),p("span",null," @"+q(_(s).state.userInfo.username),1)]),p("div",de,"UID. "+q(_(s).state.userInfo.id),1)])]),n(j,{class:"profile-tabs-wrap",type:"line",animated:"","onUpdate:value":N},{default:f(()=>[n(v,{name:"post",tab:"泡泡"}),n(v,{name:"comment",tab:"评论"}),n(v,{name:"highlight",tab:"亮点"}),n(v,{name:"media",tab:"图文"}),n(v,{name:"star",tab:"喜欢"})]),_:1}),t.value?(l(),i("div",ge,[n(E,{num:r.value},null,8,["num"])])):(l(),i("div",he,[o.value.length===0?(l(),i("div",fe,[n(G,{size:"large",description:"暂无数据"})])):z("",!0),_(s).state.desktopModelShow?(l(),i("div",ke,[(l(!0),i(V,null,F(o.value,d=>(l(),T(U,{key:d.id},{default:f(()=>[n(L,{post:d},null,8,["post"])]),_:2},1024))),128))])):(l(),i("div",be,[(l(!0),i(V,null,F(o.value,d=>(l(),T(U,{key:d.id},{default:f(()=>[n(O,{post:d},null,8,["post"])]),_:2},1024))),128))]))]))]),_:1})):z("",!0),c.value>0?(l(),i("div",we,[n(A,{page:a.value,"onUpdate:page":D,"page-slot":_(s).state.collapsedRight?5:8,"page-count":c.value},null,8,["page","page-slot","page-count"])])):z("",!0)])}}});const ea=ee(ye,[["__scopeId","data-v-08661398"]]);export{ea as default}; diff --git a/web/dist/assets/Profile-c0f83ebd.js b/web/dist/assets/Profile-c0f83ebd.js new file mode 100644 index 00000000..0b033437 --- /dev/null +++ b/web/dist/assets/Profile-c0f83ebd.js @@ -0,0 +1 @@ +import{_ as Y,a as Z}from"./post-item.vue_vue_type_style_index_0_lang-724e3b2f.js";import{_ as ee}from"./post-skeleton-c0397381.js";import{_ as ae}from"./main-nav.vue_vue_type_style_index_0_lang-db217db0.js";import{d as te,r as c,j as se,w as oe,a3 as ne,c as _,V as n,_ as o,Q as y,a1 as v,O as b,o as r,a as u,M as f,e as C,a2 as D,F,a4 as H}from"./@vue-e0e89260.js";import{u as le}from"./vuex-473b3783.js";import{b as re}from"./vue-router-b8e3382f.js";import{B as k,_ as ue}from"./index-479e9ef6.js";import{b as ie}from"./formatTime-4210fcd1.js";import{F as ce,G as _e,o as pe,O as me,f as ve,g as de,I as fe,H as ge}from"./naive-ui-62663ad7.js";import"./content-ffcf943b.js";import"./@vicons-0524c43e.js";import"./paopao-video-player-aa5e8b3f.js";import"./copy-to-clipboard-1dd3075d.js";import"./toggle-selection-93f4ad84.js";import"./vooks-a50491fd.js";import"./evtd-b614532e.js";import"./axios-4a70c6fc.js";/* empty css */import"./seemly-76b7b838.js";import"./vueuc-59ca65c3.js";import"./@css-render-580d83ec.js";import"./vdirs-b0483831.js";import"./@juggle-41516555.js";import"./css-render-6a5c5852.js";import"./@emotion-8a8e73f6.js";import"./lodash-es-8412e618.js";import"./treemate-25c27bff.js";import"./async-validator-dee29e8b.js";import"./date-fns-975a2d8f.js";import"./moment-2ab8298d.js";const he={class:"profile-baseinfo"},ke={class:"avatar"},we={class:"base-info"},ye={class:"username"},be={class:"userinfo"},Ie={class:"info-item"},Pe={class:"info-item"},Me={class:"userinfo"},Te={class:"info-item"},ze={class:"info-item"},qe={key:0,class:"skeleton-wrap"},Ce={key:1},xe={key:0,class:"empty-wrap"},Be={key:1},Se={key:2},Ve={key:1,class:"pagination-wrap"},$e=te({__name:"Profile",setup(Ne){const a=le(),d=re(),s=c(!1),l=c([]),w=c("post"),x=c(+d.query.p||1),B=c(1),S=c(1),V=c(1),$=c(1),t=c(+d.query.p||1),i=c(20),p=c(0),I=()=>{switch(w.value){case"post":P();break;case"comment":M();break;case"highlight":T();break;case"media":z();break;case"star":q();break}},P=()=>{s.value=!0,k({username:a.state.userInfo.username,style:"post",page:t.value,page_size:i.value}).then(e=>{s.value=!1,l.value=e.list||[],p.value=Math.ceil(e.pager.total_rows/i.value),window.scrollTo(0,0)}).catch(e=>{l.value=[],s.value=!1})},M=()=>{s.value=!0,k({username:a.state.userInfo.username,style:"comment",page:t.value,page_size:i.value}).then(e=>{s.value=!1,l.value=e.list||[],p.value=Math.ceil(e.pager.total_rows/i.value),window.scrollTo(0,0)}).catch(e=>{l.value=[],s.value=!1})},T=()=>{s.value=!0,k({username:a.state.userInfo.username,style:"highlight",page:t.value,page_size:i.value}).then(e=>{s.value=!1,l.value=e.list||[],p.value=Math.ceil(e.pager.total_rows/i.value),window.scrollTo(0,0)}).catch(e=>{l.value=[],s.value=!1})},z=()=>{s.value=!0,k({username:a.state.userInfo.username,style:"media",page:t.value,page_size:i.value}).then(e=>{s.value=!1,l.value=e.list||[],p.value=Math.ceil(e.pager.total_rows/i.value),window.scrollTo(0,0)}).catch(e=>{l.value=[],s.value=!1})},q=()=>{s.value=!0,k({username:a.state.userInfo.username,style:"star",page:t.value,page_size:i.value}).then(e=>{s.value=!1,l.value=e.list||[],p.value=Math.ceil(e.pager.total_rows/i.value),window.scrollTo(0,0)}).catch(e=>{l.value=[],s.value=!1})},O=e=>{switch(w.value=e,w.value){case"post":t.value=x.value,P();break;case"comment":t.value=B.value,M();break;case"highlight":t.value=S.value,T();break;case"media":t.value=V.value,z();break;case"star":t.value=$.value,q();break}},R=e=>{switch(t.value=e,w.value){case"post":x.value=e,P();break;case"comment":B.value=t.value,M();break;case"highlight":S.value=t.value,T();break;case"media":V.value=t.value,z();break;case"star":$.value=t.value,q();break}};return se(()=>{I()}),oe(()=>({path:d.path,query:d.query,refresh:a.state.refresh}),(e,m)=>{if(e.refresh!==m.refresh){t.value=+d.query.p||1,setTimeout(()=>{I()},0);return}m.path!=="/post"&&e.path==="/profile"&&(t.value=+d.query.p||1,setTimeout(()=>{I()},0))}),(e,m)=>{const j=ae,E=pe,G=me,N=ne("router-link"),g=ve,L=de,Q=ee,A=fe,J=Y,U=ge,K=Z,W=ce,X=_e;return r(),_("div",null,[n(j,{title:"主页"}),o(a).state.userInfo.id>0?(r(),y(W,{key:0,class:"main-content-wrap profile-wrap",bordered:""},{default:v(()=>[u("div",he,[u("div",ke,[n(E,{size:72,src:o(a).state.userInfo.avatar},null,8,["src"])]),u("div",we,[u("div",ye,[u("strong",null,f(o(a).state.userInfo.nickname),1),u("span",null," @"+f(o(a).state.userInfo.username),1),o(a).state.userInfo.is_admin?(r(),y(G,{key:0,class:"top-tag",type:"error",size:"small",round:""},{default:v(()=>[C(" 管理员 ")]),_:1})):b("",!0)]),u("div",be,[u("span",Ie,"UID. "+f(o(a).state.userInfo.id),1),u("span",Pe,f(o(ie)(o(a).state.userInfo.created_on))+" 加入",1)]),u("div",Me,[u("span",Te,[n(N,{onClick:m[0]||(m[0]=D(()=>{},["stop"])),class:"following-link",to:{name:"following",query:{s:o(a).state.userInfo.username,n:o(a).state.userInfo.nickname,t:"follows"}}},{default:v(()=>[C(" 关注  "+f(o(a).state.userInfo.follows),1)]),_:1},8,["to"])]),u("span",ze,[n(N,{onClick:m[1]||(m[1]=D(()=>{},["stop"])),class:"following-link",to:{name:"following",query:{s:o(a).state.userInfo.username,n:o(a).state.userInfo.nickname,t:"followings"}}},{default:v(()=>[C(" 粉丝  "+f(o(a).state.userInfo.followings),1)]),_:1},8,["to"])])])])]),n(L,{class:"profile-tabs-wrap",type:"line",animated:"","onUpdate:value":O},{default:v(()=>[n(g,{name:"post",tab:"泡泡"}),n(g,{name:"comment",tab:"评论"}),n(g,{name:"highlight",tab:"亮点"}),n(g,{name:"media",tab:"图文"}),n(g,{name:"star",tab:"喜欢"})]),_:1}),s.value?(r(),_("div",qe,[n(Q,{num:i.value},null,8,["num"])])):(r(),_("div",Ce,[l.value.length===0?(r(),_("div",xe,[n(A,{size:"large",description:"暂无数据"})])):b("",!0),o(a).state.desktopModelShow?(r(),_("div",Be,[(r(!0),_(F,null,H(l.value,h=>(r(),y(U,{key:h.id},{default:v(()=>[n(J,{post:h},null,8,["post"])]),_:2},1024))),128))])):(r(),_("div",Se,[(r(!0),_(F,null,H(l.value,h=>(r(),y(U,{key:h.id},{default:v(()=>[n(K,{post:h},null,8,["post"])]),_:2},1024))),128))]))]))]),_:1})):b("",!0),p.value>0?(r(),_("div",Ve,[n(X,{page:t.value,"onUpdate:page":R,"page-slot":o(a).state.collapsedRight?5:8,"page-count":p.value},null,8,["page","page-slot","page-count"])])):b("",!0)])}}});const pa=ue($e,[["__scopeId","data-v-8ca59137"]]);export{pa as default}; diff --git a/web/dist/assets/Profile-cc270bed.css b/web/dist/assets/Profile-cc270bed.css deleted file mode 100644 index 5ed80845..00000000 --- a/web/dist/assets/Profile-cc270bed.css +++ /dev/null @@ -1 +0,0 @@ -.profile-baseinfo[data-v-08661398]{display:flex;padding:16px}.profile-baseinfo .avatar[data-v-08661398]{width:55px}.profile-baseinfo .base-info[data-v-08661398]{position:relative;width:calc(100% - 55px)}.profile-baseinfo .base-info .username[data-v-08661398]{line-height:16px;font-size:16px}.profile-baseinfo .base-info .uid[data-v-08661398]{font-size:14px;line-height:14px;margin-top:10px;opacity:.75}.profile-tabs-wrap[data-v-08661398]{padding:0 16px}.pagination-wrap[data-v-08661398]{padding:10px;display:flex;justify-content:center;overflow:hidden}.dark .profile-baseinfo[data-v-08661398]{background-color:#18181c}.dark .profile-wrap[data-v-08661398],.dark .pagination-wrap[data-v-08661398]{background-color:#101014bf} diff --git a/web/dist/assets/Setting-0ce0dfa1.js b/web/dist/assets/Setting-0ce0dfa1.js new file mode 100644 index 00000000..cd6c2bd7 --- /dev/null +++ b/web/dist/assets/Setting-0ce0dfa1.js @@ -0,0 +1 @@ +import{_ as we}from"./main-nav.vue_vue_type_style_index_0_lang-db217db0.js";import{d as ye,r as d,E as Z,j as ke,c as g,V as t,a1 as s,Q as b,O as _,o as r,a as m,_ as u,e as c,M as R,z as be,v as Ce,P as q,a2 as B,W as Ie,X as $e}from"./@vue-e0e89260.js";import{u as Pe}from"./vuex-473b3783.js";import{X as H,Y as Se,Z as Ue,$ as Re,a0 as qe,a1 as Be,a2 as Ae,_ as ze}from"./index-479e9ef6.js";import{X as Ne}from"./@vicons-0524c43e.js";import{h as Ke,o as xe,e as De,B as Fe,b as Ve,j as je,S as Ee,$ as Oe,L as Te,a0 as Le,a1 as Me,d as We}from"./naive-ui-62663ad7.js";import"./vue-router-b8e3382f.js";import"./vooks-a50491fd.js";import"./evtd-b614532e.js";import"./axios-4a70c6fc.js";/* empty css */import"./seemly-76b7b838.js";import"./vueuc-59ca65c3.js";import"./@css-render-580d83ec.js";import"./vdirs-b0483831.js";import"./@juggle-41516555.js";import"./css-render-6a5c5852.js";import"./@emotion-8a8e73f6.js";import"./lodash-es-8412e618.js";import"./treemate-25c27bff.js";import"./async-validator-dee29e8b.js";import"./date-fns-975a2d8f.js";const V=A=>(Ie("data-v-a681720e"),A=A(),$e(),A),Xe={class:"base-line avatar"},Ge={class:"base-line"},Je=V(()=>m("span",{class:"base-label"},"昵称",-1)),Qe={key:0},Ye={class:"base-line"},Ze=V(()=>m("span",{class:"base-label"},"用户名",-1)),He={key:0},et={key:1},tt=V(()=>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=V(()=>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(A){const ee="/v1/attachment",te="Bearer "+localStorage.getItem("PAOPAO_TOKEN"),z=d("public/avatar"),$="true".toLowerCase()==="true",ae="false".toLowerCase()==="true",o=Pe(),P=d(!1),N=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(),G=d(),J=d(),Q=d(),a=Z({id:"",b64s:"",imgCaptcha:"",phone:"",phone_captcha:"",password:"",old_password:"",reenteredPassword:""}),i=Z({id:"",b64s:"",imgCaptcha:"",activate_code:""}),se=async n=>{var e,v;return z.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):z.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&&z.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=Q.value)==null||n.validate({trigger:"password-input"}))},ie=n=>{var e;n.preventDefault(),(e=J.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||(N.value=!0,Re({phone:a.phone,captcha:a.phone_captcha}).then(f=>{N.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=>{N.value=!1}))})},de=n=>{var e;n.preventDefault(),(e=G.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&&E()}))})},j=()=>{H().then(n=>{a.id=n.id,a.b64s=n.b64s}).catch(n=>{console.log(n)})},E=()=>{H().then(n=>{i.id=n.id,i.b64s=n.b64s}).catch(n=>{console.log(n)})},ce=()=>{Be({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,Ae({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&&j(),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")),j(),E()}),(n,e)=>{const v=we,f=xe,p=De,D=Fe,h=Ve,ge=je,F=Ke,Y=Ee,w=Oe,he=Te,O=Le,T=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:z.value},onBeforeUpload:se,onFinish:ne},{default:s(()=>[t(p,{size:"small"},{default:s(()=>[c("更改头像")]),_:1})]),_:1},8,["headers","data"])):_("",!0)]),m("div",Ge,[Je,C.value?_("",!0):(r(),g("div",Qe,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(Ne))]),_:1})]),_:1})):_("",!0)]),m("div",Ye,[Ze,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",He,[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(Y,{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(B(()=>{},["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:j},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(T,{gutter:[0,24]},{default:s(()=>[t(O,{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:N.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(Y,{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:G,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(B(()=>{},["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:E},null,8,_t)):_("",!0)])])]),_:1}),t(T,{gutter:[0,24]},{default:s(()=>[t(O,{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:J,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(B(()=>{},["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(B(()=>{},["prevent"]),["enter"]))},null,8,["value"])]),_:1}),t(w,{ref_key:"rPasswordFormItemRef",ref:Q,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(B(()=>{},["prevent"]),["enter"]))},null,8,["value","disabled"])]),_:1},512),t(T,{gutter:[0,24]},{default:s(()=>[t(O,{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 jt=ze(gt,[["__scopeId","data-v-a681720e"]]);export{jt as default}; diff --git a/web/dist/assets/Setting-7301763b.js b/web/dist/assets/Setting-7301763b.js deleted file mode 100644 index 506b557c..00000000 --- a/web/dist/assets/Setting-7301763b.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as we}from"./main-nav.vue_vue_type_style_index_0_lang-e28257cc.js";import{d as ye,r as d,E as Z,j as ke,c as g,V as t,a1 as s,Q as b,O as _,o as r,a as m,_ as u,e as c,M as R,z as be,v as Ce,P as q,a2 as B,W as Ie,X as $e}from"./@vue-e0e89260.js";import{u as Pe}from"./vuex-473b3783.js";import{T as H,U as Ue,V as Se,W as Re,X as qe,Y as Be,Z as Ae,_ as ze}from"./index-a0347e1a.js";import{R as Ne}from"./@vicons-8f91201d.js";import{h as Ke,o as xe,e as De,B as Fe,b as Ve,j as Te,S as je,$ as Ee,L as Oe,a0 as Le,a1 as Me,d as We}from"./naive-ui-62663ad7.js";import"./vue-router-b8e3382f.js";import"./vooks-a50491fd.js";import"./evtd-b614532e.js";import"./axios-4a70c6fc.js";/* empty css */import"./seemly-76b7b838.js";import"./vueuc-59ca65c3.js";import"./@css-render-580d83ec.js";import"./vdirs-b0483831.js";import"./@juggle-41516555.js";import"./css-render-6a5c5852.js";import"./@emotion-8a8e73f6.js";import"./lodash-es-8412e618.js";import"./treemate-25c27bff.js";import"./async-validator-dee29e8b.js";import"./date-fns-975a2d8f.js";const V=A=>(Ie("data-v-a681720e"),A=A(),$e(),A),Xe={class:"base-line avatar"},Ge={class:"base-line"},Je=V(()=>m("span",{class:"base-label"},"昵称",-1)),Qe={key:0},Ye={class:"base-line"},Ze=V(()=>m("span",{class:"base-label"},"用户名",-1)),He={key:0},et={key:1},tt=V(()=>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=V(()=>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(A){const ee="/v1/attachment",te="Bearer "+localStorage.getItem("PAOPAO_TOKEN"),z=d("public/avatar"),$="true".toLowerCase()==="true",ae="false".toLowerCase()==="true",o=Pe(),P=d(!1),N=d(!1),K=d(!1),M=d(),W=d(),C=d(!1),x=d(!1),U=d(!1),S=d(!1),I=d(60),y=d(!1),k=d(!1),X=d(),G=d(),J=d(),Q=d(),a=Z({id:"",b64s:"",imgCaptcha:"",phone:"",phone_captcha:"",password:"",old_password:"",reenteredPassword:""}),i=Z({id:"",b64s:"",imgCaptcha:"",activate_code:""}),se=async n=>{var e,v;return z.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):z.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&&z.value==="public/avatar"&&Ue({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=Q.value)==null||n.validate({trigger:"password-input"}))},ie=n=>{var e;n.preventDefault(),(e=J.value)==null||e.validate(v=>{v||(x.value=!0,Se({password:a.password,old_password:a.old_password}).then(f=>{x.value=!1,U.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||(N.value=!0,Re({phone:a.phone,captcha:a.phone_captcha}).then(f=>{N.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=>{N.value=!1}))})},de=n=>{var e;n.preventDefault(),(e=G.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&&j()}))})},T=()=>{H().then(n=>{a.id=n.id,a.b64s=n.b64s}).catch(n=>{console.log(n)})},j=()=>{H().then(n=>{i.id=n.id,i.b64s=n.b64s}).catch(n=>{console.log(n)})},ce=()=>{Be({nickname:o.state.userInfo.nickname||""}).then(n=>{C.value=!1,window.$message.success("昵称修改成功")}).catch(n=>{C.value=!0})},pe=()=>{if(!(I.value>0&&S.value)){if(a.imgCaptcha===""){window.$message.warning("请输入图片验证码");return}P.value=!0,Ae({phone:a.phone,img_captcha:a.imgCaptcha,img_captcha_id:a.id}).then(n=>{S.value=!0,P.value=!1,window.$message.success("发送成功");let e=setInterval(()=>{I.value--,I.value===0&&(clearInterval(e),I.value=60,S.value=!1)},1e3)}).catch(n=>{P.value=!1,n.code===20012&&T(),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")),T(),j()}),(n,e)=>{const v=we,f=xe,p=De,D=Fe,h=Ve,ge=Te,F=Ke,Y=je,w=Ee,he=Oe,E=Le,O=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:z.value},onBeforeUpload:se,onFinish:ne},{default:s(()=>[t(p,{size:"small"},{default:s(()=>[c("更改头像")]),_:1})]),_:1},8,["headers","data"])):_("",!0)]),m("div",Ge,[Je,C.value?_("",!0):(r(),g("div",Qe,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(Ne))]),_:1})]),_:1})):_("",!0)]),m("div",Ye,[Ze,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",He,[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(Y,{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(B(()=>{},["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:T},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:S.value,loading:P.value,onClick:pe},{default:s(()=>[c(R(I.value>0&&S.value?I.value+"s后重新发送":"发送验证码"),1)]),_:1},8,["disabled","loading"])]),_:1})]),_:1}),t(O,{gutter:[0,24]},{default:s(()=>[t(E,{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:N.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(Y,{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:G,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(B(()=>{},["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:j},null,8,_t)):_("",!0)])])]),_:1}),t(O,{gutter:[0,24]},{default:s(()=>[t(E,{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(" 您已设置密码 "),U.value?_("",!0):(r(),b(p,{key:0,quaternary:"",round:"",type:"success",onClick:e[14]||(e[14]=l=>U.value=!0)},{default:s(()=>[c(" 重置密码 ")]),_:1})),U.value?(r(),g("div",vt,[t(L,{ref_key:"formRef",ref:J,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(B(()=>{},["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(B(()=>{},["prevent"]),["enter"]))},null,8,["value"])]),_:1}),t(w,{ref_key:"rPasswordFormItemRef",ref:Q,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(B(()=>{},["prevent"]),["enter"]))},null,8,["value","disabled"])]),_:1},512),t(O,{gutter:[0,24]},{default:s(()=>[t(E,{span:24},{default:s(()=>[m("div",ft,[t(p,{quaternary:"",round:"",onClick:e[21]||(e[21]=l=>U.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 Tt=ze(gt,[["__scopeId","data-v-a681720e"]]);export{Tt as default}; diff --git a/web/dist/assets/Topic-8dbcebb5.css b/web/dist/assets/Topic-384e019e.css similarity index 67% rename from web/dist/assets/Topic-8dbcebb5.css rename to web/dist/assets/Topic-384e019e.css index 89cc452d..ab7de4e6 100644 --- a/web/dist/assets/Topic-8dbcebb5.css +++ b/web/dist/assets/Topic-384e019e.css @@ -1 +1 @@ -.tag-item .tag-quote{margin-left:12px;font-size:14px;opacity:.75}.tag-item .tag-follow{margin-right:22px}.tag-item .options{margin-left:-32px;margin-bottom:4px;opacity:.55}.tag-item .n-thing .n-thing-header{margin-bottom:0}.tag-item .n-thing .n-thing-avatar-header-wrapper{align-items:center}.tags-wrap[data-v-15794a53]{padding:20px}.dark .tags-wrap[data-v-15794a53]{background-color:#101014bf} +.tag-item .tag-quote{margin-left:12px;font-size:14px;opacity:.75}.tag-item .tag-follow{margin-right:22px}.tag-item .options{margin-left:-32px;margin-bottom:4px;opacity:.55}.tag-item .n-thing .n-thing-header{margin-bottom:0}.tag-item .n-thing .n-thing-avatar-header-wrapper{align-items:center}.tags-wrap[data-v-1fb31ecf]{padding:20px}.dark .tags-wrap[data-v-1fb31ecf]{background-color:#101014bf} diff --git a/web/dist/assets/Topic-e99217d6.js b/web/dist/assets/Topic-7e667c9c.js similarity index 88% rename from web/dist/assets/Topic-e99217d6.js rename to web/dist/assets/Topic-7e667c9c.js index 291ef57b..580c84e4 100644 --- a/web/dist/assets/Topic-e99217d6.js +++ b/web/dist/assets/Topic-7e667c9c.js @@ -1 +1 @@ -import{x as F,y as z,z as I,A as j,_ as E}from"./index-a0347e1a.js";import{v as U}from"./@vicons-8f91201d.js";import{d as $,r as i,n as A,j as q,a3 as x,o as c,c as _,V as n,a1 as s,Q as b,e as V,M as f,O as u,_ as h,w as D,a7 as P,F as Q,a4 as G}from"./@vue-e0e89260.js";import{o as H,O as B,j as J,e as K,P as R,M as W,F as X,f as Y,g as Z,a as ee,k as oe}from"./naive-ui-62663ad7.js";import{_ as te}from"./main-nav.vue_vue_type_style_index_0_lang-e28257cc.js";import{u as ne}from"./vuex-473b3783.js";import"./vue-router-b8e3382f.js";import"./axios-4a70c6fc.js";/* empty css */import"./seemly-76b7b838.js";import"./vueuc-59ca65c3.js";import"./evtd-b614532e.js";import"./@css-render-580d83ec.js";import"./vooks-a50491fd.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=$({__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":I({topic_id:t.tag.id}).then(o=>{t.tag.is_following=1,window.$message.success("关注成功")}).catch(o=>{console.log(o)});break;case"unfollow":z({topic_id:t.tag.id}).then(o=>{t.tag.is_following=0,window.$message.success("取消关注")}).catch(o=>{console.log(o)});break;case"stick":F({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":F({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=H,k=B,a=J,d=K,v=R,p=W;return!e.checkFollowing||e.checkFollowing&&e.tag.is_following===1?(c(),_("div",se,[n(p,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(()=>[V(" #"+f(e.tag.tag),1)]),_:1},8,["to"]),e.showAction?u("",!0):(c(),_("span",ae,"("+f(e.tag.quote_num)+")",1)),e.showAction?(c(),_("span",ce,"("+f(e.tag.quote_num)+")",1)):u("",!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(U))]),_:1})]),_:1})]),_:1},8,["options"])])):u("",!0)]),_:1})])):u("",!0)}}});const _e=$({__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,j({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,p=Y,C=B,L=Z,M=ie,N=ee,O=oe,S=X;return c(),_("div",null,[n(v,{title:"话题"}),n(S,{class:"main-content-wrap tags-wrap",bordered:""},{default:s(()=>[n(L,{type:"line",animated:"","onUpdate:value":k},P({default:s(()=>[n(p,{name:"hot",tab:"热门"}),n(p,{name:"new",tab:"最新"}),h(t).state.userLogined?(c(),b(p,{key:0,name:"follow",tab:"关注"})):u("",!0)]),_:2},[h(t).state.userLogined?{name:"suffix",fn:s(()=>[n(C,{checked:e.value,"onUpdate:checked":d[0]||(d[0]=y=>e.value=y),checkable:""},{default:s(()=>[V(f(w.value),1)]),_:1},8,["checked"])]),key:"0"}:void 0]),1024),n(O,{show:l.value},{default:s(()=>[n(N,null,{default:s(()=>[(c(!0),_(Q,null,G(r.value,y=>(c(),b(M,{tag:y,showAction:h(t).state.userLogined&&e.value,checkFollowing:o.value},null,8,["tag","showAction","checkFollowing"]))),256))]),_:1})]),_:1},8,["show"])]),_:1})])}}});const Me=E(_e,[["__scopeId","data-v-15794a53"]]);export{Me as default}; +import{x as $,y as z,z as I,A as j,_ as E}from"./index-479e9ef6.js";import{v as U}from"./@vicons-0524c43e.js";import{d as F,r as i,n as A,j as q,a3 as x,o as c,c as _,V as n,a1 as s,Q as b,e as V,M as f,O as u,_ as h,w as D,a7 as P,F as Q,a4 as G}from"./@vue-e0e89260.js";import{o as H,O as B,j as J,e as K,P as R,M as W,F as X,f as Y,g as Z,a as ee,k as oe}from"./naive-ui-62663ad7.js";import{_ as te}from"./main-nav.vue_vue_type_style_index_0_lang-db217db0.js";import{u as ne}from"./vuex-473b3783.js";import"./vue-router-b8e3382f.js";import"./axios-4a70c6fc.js";/* empty css */import"./seemly-76b7b838.js";import"./vueuc-59ca65c3.js";import"./evtd-b614532e.js";import"./@css-render-580d83ec.js";import"./vooks-a50491fd.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":I({topic_id:t.tag.id}).then(o=>{t.tag.is_following=1,window.$message.success("关注成功")}).catch(o=>{console.log(o)});break;case"unfollow":z({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=H,k=B,a=J,d=K,v=R,p=W;return!e.checkFollowing||e.checkFollowing&&e.tag.is_following===1?(c(),_("div",se,[n(p,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(()=>[V(" #"+f(e.tag.tag),1)]),_:1},8,["to"]),e.showAction?u("",!0):(c(),_("span",ae,"("+f(e.tag.quote_num)+")",1)),e.showAction?(c(),_("span",ce,"("+f(e.tag.quote_num)+")",1)):u("",!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(U))]),_:1})]),_:1})]),_:1},8,["options"])])):u("",!0)]),_:1})])):u("",!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,j({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,p=Y,C=B,L=Z,M=ie,N=ee,O=oe,S=X;return c(),_("div",null,[n(v,{title:"话题"}),n(S,{class:"main-content-wrap tags-wrap",bordered:""},{default:s(()=>[n(L,{type:"line",animated:"","onUpdate:value":k},P({default:s(()=>[n(p,{name:"hot",tab:"热门"}),n(p,{name:"new",tab:"最新"}),h(t).state.userLogined?(c(),b(p,{key:0,name:"follow",tab:"关注"})):u("",!0)]),_:2},[h(t).state.userLogined?{name:"suffix",fn:s(()=>[n(C,{checked:e.value,"onUpdate:checked":d[0]||(d[0]=y=>e.value=y),checkable:""},{default:s(()=>[V(f(w.value),1)]),_:1},8,["checked"])]),key:"0"}:void 0]),1024),n(O,{show:l.value},{default:s(()=>[n(N,null,{default:s(()=>[(c(!0),_(Q,null,G(r.value,y=>(c(),b(M,{tag:y,showAction:h(t).state.userLogined&&e.value,checkFollowing:o.value},null,8,["tag","showAction","checkFollowing"]))),256))]),_:1})]),_:1},8,["show"])]),_:1})])}}});const Me=E(_e,[["__scopeId","data-v-1fb31ecf"]]);export{Me as default}; diff --git a/web/dist/assets/User-583f8554.js b/web/dist/assets/User-583f8554.js deleted file mode 100644 index 2633ff17..00000000 --- a/web/dist/assets/User-583f8554.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as Fe,a as Te}from"./post-item.vue_vue_type_style_index_0_lang-6f0e8ce9.js";import{_ as Ie}from"./post-skeleton-949f6995.js";import{C as Me,_ as D,D as Se,E as qe,B as S,F as Ce,G as We}from"./index-a0347e1a.js";import{R as Z,K as ee,S as se,b as ae,e as N,i as te,T as Re,F as Be,G as Oe,j as K,o as Ae,O as De,P as Ne,k as Ve,f as Ee,g as He,I as je,H as Ge}from"./naive-ui-62663ad7.js";import{d as V,r as l,o as u,Q as F,a1 as o,a as p,V as a,e as k,M as b,E as Le,n as Ke,w as Qe,j as Je,c as h,_ as w,O as U,F as Q,a4 as J,s as X}from"./@vue-e0e89260.js";import{_ as Xe}from"./main-nav.vue_vue_type_style_index_0_lang-e28257cc.js";import{u as Ye}from"./vuex-473b3783.js";import{b as Ze}from"./vue-router-b8e3382f.js";import{i as es,w as ss,x as Y,y as as,z as ts}from"./@vicons-8f91201d.js";import"./content-5d77464b.js";import"./paopao-video-player-aa5e8b3f.js";import"./formatTime-cdf4e6f1.js";import"./moment-2ab8298d.js";import"./copy-to-clipboard-1dd3075d.js";import"./toggle-selection-93f4ad84.js";import"./axios-4a70c6fc.js";/* empty css */import"./seemly-76b7b838.js";import"./vueuc-59ca65c3.js";import"./evtd-b614532e.js";import"./@css-render-580d83ec.js";import"./vooks-a50491fd.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 ns={class:"whisper-wrap"},os={class:"whisper-line"},ls={class:"whisper-line send-wrap"},is=V({__name:"whisper",props:{show:{type:Boolean,default:!1},user:{}},emits:["success"],setup(q,{emit:P}){const d=q,c=l(""),t=l(!1),s=()=>{P("success")},_=()=>{t.value=!0,Me({user_id:d.user.id,content:c.value}).then(r=>{window.$message.success("发送成功"),t.value=!1,c.value="",s()}).catch(r=>{t.value=!1})};return(r,g)=>{const i=Z,m=ee,n=se,f=ae,x=N,$=te;return u(),F($,{show:r.show,"onUpdate:show":s,class:"whisper-card",preset:"card",size:"small",title:"私信","mask-closable":!1,bordered:!1,style:{width:"360px"}},{default:o(()=>[p("div",ns,[a(n,{"show-icon":!1},{default:o(()=>[k(" 即将发送私信给: "),a(m,{style:{"max-width":"100%"}},{default:o(()=>[a(i,{type:"success"},{default:o(()=>[k(b(r.user.nickname)+"@"+b(r.user.username),1)]),_:1})]),_:1})]),_:1}),p("div",os,[a(f,{type:"textarea",placeholder:"请输入私信内容(请勿发送不和谐内容,否则将会被封号)",autosize:{minRows:5,maxRows:10},value:c.value,"onUpdate:value":g[0]||(g[0]=z=>c.value=z),maxlength:"200","show-count":""},null,8,["value"])]),p("div",ls,[a(x,{strong:"",secondary:"",type:"primary",loading:t.value,onClick:_},{default:o(()=>[k(" 发送 ")]),_:1},8,["loading"])])])]),_:1},8,["show"])}}});const us=D(is,[["__scopeId","data-v-0cbfe47c"]]),cs={class:"whisper-wrap"},rs={class:"whisper-line"},_s={class:"whisper-line send-wrap"},ps=V({__name:"whisper-add-friend",props:{show:{type:Boolean,default:!1},user:{}},emits:["success"],setup(q,{emit:P}){const d=q,c=l(""),t=l(!1),s=()=>{P("success")},_=()=>{t.value=!0,Se({user_id:d.user.id,greetings:c.value}).then(r=>{window.$message.success("发送成功"),t.value=!1,c.value="",s()}).catch(r=>{t.value=!1})};return(r,g)=>{const i=Z,m=ee,n=se,f=ae,x=N,$=te;return u(),F($,{show:r.show,"onUpdate:show":s,class:"whisper-card",preset:"card",size:"small",title:"申请添加朋友","mask-closable":!1,bordered:!1,style:{width:"360px"}},{default:o(()=>[p("div",cs,[a(n,{"show-icon":!1},{default:o(()=>[k(" 发送添加朋友申请给: "),a(m,{style:{"max-width":"100%"}},{default:o(()=>[a(i,{type:"success"},{default:o(()=>[k(b(r.user.nickname)+"@"+b(r.user.username),1)]),_:1})]),_:1})]),_:1}),p("div",rs,[a(f,{type:"textarea",placeholder:"请输入真挚的问候语",autosize:{minRows:5,maxRows:10},value:c.value,"onUpdate:value":g[0]||(g[0]=z=>c.value=z),maxlength:"120","show-count":""},null,8,["value"])]),p("div",_s,[a(x,{strong:"",secondary:"",type:"primary",loading:t.value,onClick:_},{default:o(()=>[k(" 发送 ")]),_:1},8,["loading"])])])]),_:1},8,["show"])}}});const ds=D(ps,[["__scopeId","data-v-60be56a2"]]),ms={key:0,class:"profile-baseinfo"},vs={class:"avatar"},hs={class:"base-info"},gs={class:"username"},fs={class:"uid"},ws={key:0,class:"user-opts"},ks={key:0,class:"skeleton-wrap"},ys={key:1},bs={key:0,class:"empty-wrap"},Ps={key:1},xs={key:2},$s={key:0,class:"pagination-wrap"},zs=V({__name:"User",setup(q){const P=Re(),d=Ye(),c=Ze(),t=l(!1),s=Le({id:0,avatar:"",username:"",nickname:"",is_admin:!1,is_friend:!0,status:1}),_=l(!1),r=l(!1),g=l(!1),i=l([]),m=l(c.query.s||""),n=l(+c.query.p||1),f=l("post"),x=l(+c.query.p||1),$=l(1),z=l(1),E=l(1),H=l(1),v=l(20),y=l(0),ne=()=>{switch(f.value){case"post":C();break;case"comment":W();break;case"highlight":R();break;case"media":B();break;case"star":O();break}},C=()=>{t.value=!0,S({username:m.value,style:"post",page:n.value,page_size:v.value}).then(e=>{t.value=!1,i.value=e.list||[],y.value=Math.ceil(e.pager.total_rows/v.value),window.scrollTo(0,0)}).catch(e=>{i.value=[],t.value=!1})},W=()=>{t.value=!0,S({username:m.value,style:"comment",page:n.value,page_size:v.value}).then(e=>{t.value=!1,i.value=e.list||[],y.value=Math.ceil(e.pager.total_rows/v.value),window.scrollTo(0,0)}).catch(e=>{i.value=[],t.value=!1})},R=()=>{t.value=!0,S({username:m.value,style:"highlight",page:n.value,page_size:v.value}).then(e=>{t.value=!1,i.value=e.list||[],y.value=Math.ceil(e.pager.total_rows/v.value),window.scrollTo(0,0)}).catch(e=>{i.value=[],t.value=!1})},B=()=>{t.value=!0,S({username:m.value,style:"media",page:n.value,page_size:v.value}).then(e=>{t.value=!1,i.value=e.list||[],y.value=Math.ceil(e.pager.total_rows/v.value),window.scrollTo(0,0)}).catch(e=>{i.value=[],t.value=!1})},O=()=>{t.value=!0,S({username:m.value,style:"star",page:n.value,page_size:v.value}).then(e=>{t.value=!1,i.value=e.list||[],y.value=Math.ceil(e.pager.total_rows/v.value),window.scrollTo(0,0)}).catch(e=>{i.value=[],t.value=!1})},oe=e=>{switch(f.value=e,f.value){case"post":n.value=x.value,C();break;case"comment":n.value=$.value,W();break;case"highlight":n.value=z.value,R();break;case"media":n.value=E.value,B();break;case"star":n.value=H.value,O();break}},A=()=>{_.value=!0,qe({username:m.value}).then(e=>{_.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.status=e.status,ne()}).catch(e=>{_.value=!1,console.log(e)})},le=e=>{switch(n.value=e,f.value){case"post":x.value=e,C();break;case"comment":$.value=n.value,W();break;case"highlight":z.value=n.value,R();break;case"media":E.value=n.value,B();break;case"star":H.value=n.value,O();break}},ie=()=>{r.value=!0},ue=()=>{g.value=!0},ce=()=>{r.value=!1},re=()=>{g.value=!1},T=e=>()=>X(K,null,{default:()=>X(e)}),_e=Ke(()=>{let e=[{label:"私信",key:"whisper",icon:T(ss)}];return d.state.userInfo.is_admin&&(s.status===1?e.push({label:"禁言",key:"banned",icon:T(Y)}):e.push({label:"解封",key:"deblocking",icon:T(Y)})),s.is_friend?e.push({label:"删除好友",key:"delete",icon:T(as)}):e.push({label:"添加朋友",key:"requesting",icon:T(ts)}),e}),pe=e=>{switch(e){case"whisper":ie();break;case"delete":de();break;case"requesting":ue();break;case"banned":case"deblocking":me();break}},de=()=>{P.warning({title:"删除好友",content:"将好友 “"+s.nickname+"” 删除,将同时删除 点赞/收藏 列表中关于该朋友的 “好友可见” 推文",positiveText:"确定",negativeText:"取消",onPositiveClick:()=>{_.value=!0,Ce({user_id:s.id}).then(e=>{_.value=!1,s.is_friend=!1,C()}).catch(e=>{_.value=!1,console.log(e)})}})},me=()=>{P.warning({title:"警告",content:"确定对该用户进行"+(s.status===1?"禁言":"解封")+"处理吗?",positiveText:"确定",negativeText:"取消",onPositiveClick:()=>{_.value=!0,We({id:s.id,status:s.status===1?2:1}).then(e=>{_.value=!1,A()}).catch(e=>{_.value=!1,console.log(e)})}})};return Qe(()=>({path:c.path,query:c.query}),(e,j)=>{j.path==="/user"&&e.path==="/user"&&(m.value=c.query.s||"",A())}),Je(()=>{A()}),(e,j)=>{const ve=Xe,he=Ae,G=De,ge=N,fe=Ne,we=us,ke=Ve,I=Ee,ye=He,be=Ie,Pe=je,xe=Fe,L=Ge,$e=Te,ze=Be,Ue=Oe;return u(),h("div",null,[a(ve,{title:"用户详情"}),a(ze,{class:"main-content-wrap profile-wrap",bordered:""},{default:o(()=>[a(ke,{show:_.value},{default:o(()=>[s.id>0?(u(),h("div",ms,[p("div",vs,[a(he,{size:"large",src:s.avatar},null,8,["src"])]),p("div",hs,[p("div",gs,[p("strong",null,b(s.nickname),1),p("span",null," @"+b(s.username),1),w(d).state.userInfo.id>0&&w(d).state.userInfo.username!=s.username&&s.is_friend?(u(),F(G,{key:0,class:"top-tag",type:"info",size:"small",round:""},{default:o(()=>[k(" 好友 ")]),_:1})):U("",!0),s.is_admin?(u(),F(G,{key:1,class:"top-tag",type:"error",size:"small",round:""},{default:o(()=>[k(" 管理员 ")]),_:1})):U("",!0)]),p("div",fs,"UID. "+b(s.id),1)]),w(d).state.userInfo.id>0&&w(d).state.userInfo.username!=s.username?(u(),h("div",ws,[a(fe,{placement:"bottom-end",trigger:"click",size:"small",options:_e.value,onSelect:pe},{default:o(()=>[a(ge,{quaternary:"",circle:""},{icon:o(()=>[a(w(K),null,{default:o(()=>[a(w(es))]),_:1})]),_:1})]),_:1},8,["options"])])):U("",!0)])):U("",!0),a(we,{show:r.value,user:s,onSuccess:ce},null,8,["show","user"]),a(ds,{show:g.value,user:s,onSuccess:re},null,8,["show","user"])]),_:1},8,["show"]),a(ye,{class:"profile-tabs-wrap",type:"line",animated:"","onUpdate:value":oe},{default:o(()=>[a(I,{name:"post",tab:"泡泡"}),a(I,{name:"comment",tab:"评论"}),a(I,{name:"highlight",tab:"亮点"}),a(I,{name:"media",tab:"图文"}),a(I,{name:"star",tab:"喜欢"})]),_:1}),t.value?(u(),h("div",ks,[a(be,{num:v.value},null,8,["num"])])):(u(),h("div",ys,[i.value.length===0?(u(),h("div",bs,[a(Pe,{size:"large",description:"暂无数据"})])):U("",!0),w(d).state.desktopModelShow?(u(),h("div",Ps,[(u(!0),h(Q,null,J(i.value,M=>(u(),F(L,{key:M.id},{default:o(()=>[a(xe,{post:M},null,8,["post"])]),_:2},1024))),128))])):(u(),h("div",xs,[(u(!0),h(Q,null,J(i.value,M=>(u(),F(L,{key:M.id},{default:o(()=>[a($e,{post:M},null,8,["post"])]),_:2},1024))),128))]))]))]),_:1}),y.value>0?(u(),h("div",$s,[a(Ue,{page:n.value,"onUpdate:page":le,"page-slot":w(d).state.collapsedRight?5:8,"page-count":y.value},null,8,["page","page-slot","page-count"])])):U("",!0)])}}});const ta=D(zs,[["__scopeId","data-v-e6276e0d"]]);export{ta as default}; diff --git a/web/dist/assets/User-8220250a.js b/web/dist/assets/User-8220250a.js new file mode 100644 index 00000000..57b6abed --- /dev/null +++ b/web/dist/assets/User-8220250a.js @@ -0,0 +1 @@ +import{_ as Ie,a as Me}from"./post-item.vue_vue_type_style_index_0_lang-724e3b2f.js";import{_ as qe}from"./post-skeleton-c0397381.js";import{C as Se,_ as N,D as We,E as Oe,B as S,F as Be,G as Re,H as De,I as Ae}from"./index-479e9ef6.js";import{R as se,K as ae,S as te,b as oe,e as V,i as ne,T as Ne,F as Ve,G as He,j as Q,o as Ee,O as Ge,P as je,k as Le,f as Ke,g as Qe,I as Je,H as Xe}from"./naive-ui-62663ad7.js";import{d as H,r as i,o as u,Q as F,a1 as o,a as r,V as a,e as g,M as h,E as Ye,n as Ze,w as es,j as ss,a3 as as,c as f,_ as k,O as C,a2 as J,F as X,a4 as Y,s as Z}from"./@vue-e0e89260.js";import{_ as ts}from"./main-nav.vue_vue_type_style_index_0_lang-db217db0.js";import{u as os}from"./vuex-473b3783.js";import{b as ns}from"./vue-router-b8e3382f.js";import{b as ls}from"./formatTime-4210fcd1.js";import{i as is,w as cs,x as ee,y as us,z as rs,D as _s,G as ps}from"./@vicons-0524c43e.js";import"./content-ffcf943b.js";import"./paopao-video-player-aa5e8b3f.js";import"./copy-to-clipboard-1dd3075d.js";import"./toggle-selection-93f4ad84.js";import"./axios-4a70c6fc.js";/* empty css */import"./seemly-76b7b838.js";import"./vueuc-59ca65c3.js";import"./evtd-b614532e.js";import"./@css-render-580d83ec.js";import"./vooks-a50491fd.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 ds={class:"whisper-wrap"},ms={class:"whisper-line"},vs={class:"whisper-line send-wrap"},fs=H({__name:"whisper",props:{show:{type:Boolean,default:!1},user:{}},emits:["success"],setup(W,{emit:b}){const d=W,_=i(""),t=i(!1),s=()=>{b("success")},l=()=>{t.value=!0,Se({user_id:d.user.id,content:_.value}).then(p=>{window.$message.success("发送成功"),t.value=!1,_.value="",s()}).catch(p=>{t.value=!1})};return(p,w)=>{const c=se,m=ae,n=te,y=oe,P=V,U=ne;return u(),F(U,{show:p.show,"onUpdate:show":s,class:"whisper-card",preset:"card",size:"small",title:"私信","mask-closable":!1,bordered:!1,style:{width:"360px"}},{default:o(()=>[r("div",ds,[a(n,{"show-icon":!1},{default:o(()=>[g(" 即将发送私信给: "),a(m,{style:{"max-width":"100%"}},{default:o(()=>[a(c,{type:"success"},{default:o(()=>[g(h(p.user.nickname)+"@"+h(p.user.username),1)]),_:1})]),_:1})]),_:1}),r("div",ms,[a(y,{type:"textarea",placeholder:"请输入私信内容(请勿发送不和谐内容,否则将会被封号)",autosize:{minRows:5,maxRows:10},value:_.value,"onUpdate:value":w[0]||(w[0]=z=>_.value=z),maxlength:"200","show-count":""},null,8,["value"])]),r("div",vs,[a(P,{strong:"",secondary:"",type:"primary",loading:t.value,onClick:l},{default:o(()=>[g(" 发送 ")]),_:1},8,["loading"])])])]),_:1},8,["show"])}}});const hs=N(fs,[["__scopeId","data-v-0cbfe47c"]]),gs={class:"whisper-wrap"},ws={class:"whisper-line"},ks={class:"whisper-line send-wrap"},ys=H({__name:"whisper-add-friend",props:{show:{type:Boolean,default:!1},user:{}},emits:["success"],setup(W,{emit:b}){const d=W,_=i(""),t=i(!1),s=()=>{b("success")},l=()=>{t.value=!0,We({user_id:d.user.id,greetings:_.value}).then(p=>{window.$message.success("发送成功"),t.value=!1,_.value="",s()}).catch(p=>{t.value=!1})};return(p,w)=>{const c=se,m=ae,n=te,y=oe,P=V,U=ne;return u(),F(U,{show:p.show,"onUpdate:show":s,class:"whisper-card",preset:"card",size:"small",title:"申请添加朋友","mask-closable":!1,bordered:!1,style:{width:"360px"}},{default:o(()=>[r("div",gs,[a(n,{"show-icon":!1},{default:o(()=>[g(" 发送添加朋友申请给: "),a(m,{style:{"max-width":"100%"}},{default:o(()=>[a(c,{type:"success"},{default:o(()=>[g(h(p.user.nickname)+"@"+h(p.user.username),1)]),_:1})]),_:1})]),_:1}),r("div",ws,[a(y,{type:"textarea",placeholder:"请输入真挚的问候语",autosize:{minRows:5,maxRows:10},value:_.value,"onUpdate:value":w[0]||(w[0]=z=>_.value=z),maxlength:"120","show-count":""},null,8,["value"])]),r("div",ks,[a(P,{strong:"",secondary:"",type:"primary",loading:t.value,onClick:l},{default:o(()=>[g(" 发送 ")]),_:1},8,["loading"])])])]),_:1},8,["show"])}}});const bs=N(ys,[["__scopeId","data-v-60be56a2"]]),$s={key:0,class:"profile-baseinfo"},xs={class:"avatar"},Ps={class:"base-info"},Us={class:"username"},zs={class:"userinfo"},Ts={class:"info-item"},Cs={class:"info-item"},Fs={class:"userinfo"},Is={class:"info-item"},Ms={class:"info-item"},qs={key:0,class:"user-opts"},Ss={key:0,class:"skeleton-wrap"},Ws={key:1},Os={key:0,class:"empty-wrap"},Bs={key:1},Rs={key:2},Ds={key:0,class:"pagination-wrap"},As=H({__name:"User",setup(W){const b=Ne(),d=os(),_=ns(),t=i(!1),s=Ye({id:0,avatar:"",username:"",nickname:"",is_admin:!1,is_friend:!0,is_following:!1,created_on:0,follows:0,followings:0,status:1}),l=i(!1),p=i(!1),w=i(!1),c=i([]),m=i(_.query.s||""),n=i(+_.query.p||1),y=i("post"),P=i(+_.query.p||1),U=i(1),z=i(1),E=i(1),G=i(1),v=i(20),$=i(0),le=()=>{switch(y.value){case"post":O();break;case"comment":B();break;case"highlight":R();break;case"media":D();break;case"star":A();break}},O=()=>{t.value=!0,S({username:m.value,style:"post",page:n.value,page_size:v.value}).then(e=>{t.value=!1,c.value=e.list||[],$.value=Math.ceil(e.pager.total_rows/v.value),window.scrollTo(0,0)}).catch(e=>{c.value=[],t.value=!1})},B=()=>{t.value=!0,S({username:m.value,style:"comment",page:n.value,page_size:v.value}).then(e=>{t.value=!1,c.value=e.list||[],$.value=Math.ceil(e.pager.total_rows/v.value),window.scrollTo(0,0)}).catch(e=>{c.value=[],t.value=!1})},R=()=>{t.value=!0,S({username:m.value,style:"highlight",page:n.value,page_size:v.value}).then(e=>{t.value=!1,c.value=e.list||[],$.value=Math.ceil(e.pager.total_rows/v.value),window.scrollTo(0,0)}).catch(e=>{c.value=[],t.value=!1})},D=()=>{t.value=!0,S({username:m.value,style:"media",page:n.value,page_size:v.value}).then(e=>{t.value=!1,c.value=e.list||[],$.value=Math.ceil(e.pager.total_rows/v.value),window.scrollTo(0,0)}).catch(e=>{c.value=[],t.value=!1})},A=()=>{t.value=!0,S({username:m.value,style:"star",page:n.value,page_size:v.value}).then(e=>{t.value=!1,c.value=e.list||[],$.value=Math.ceil(e.pager.total_rows/v.value),window.scrollTo(0,0)}).catch(e=>{c.value=[],t.value=!1})},ie=e=>{switch(y.value=e,y.value){case"post":n.value=P.value,O();break;case"comment":n.value=U.value,B();break;case"highlight":n.value=z.value,R();break;case"media":n.value=E.value,D();break;case"star":n.value=G.value,A();break}},I=()=>{l.value=!0,Oe({username:m.value}).then(e=>{l.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,le()}).catch(e=>{l.value=!1,console.log(e)})},ce=e=>{switch(n.value=e,y.value){case"post":P.value=e,O();break;case"comment":U.value=n.value,B();break;case"highlight":z.value=n.value,R();break;case"media":E.value=n.value,D();break;case"star":G.value=n.value,A();break}},ue=()=>{p.value=!0},re=()=>{w.value=!0},_e=()=>{p.value=!1},pe=()=>{w.value=!1},x=e=>()=>Z(Q,null,{default:()=>Z(e)}),de=Ze(()=>{let e=[{label:"私信",key:"whisper",icon:x(cs)}];return d.state.userInfo.is_admin&&(s.status===1?e.push({label:"禁言",key:"banned",icon:x(ee)}):e.push({label:"解封",key:"deblocking",icon:x(ee)})),s.is_following?e.push({label:"取消关注",key:"unfollow",icon:x(us)}):e.push({label:"关注",key:"follow",icon:x(rs)}),s.is_friend?e.push({label:"删除好友",key:"delete",icon:x(_s)}):e.push({label:"添加朋友",key:"requesting",icon:x(ps)}),e}),me=e=>{switch(e){case"whisper":ue();break;case"delete":ve();break;case"requesting":re();break;case"follow":case"unfollow":fe();break;case"banned":case"deblocking":he();break}},ve=()=>{b.warning({title:"删除好友",content:"将好友 “"+s.nickname+"” 删除,将同时删除 点赞/收藏 列表中关于该朋友的 “好友可见” 推文",positiveText:"确定",negativeText:"取消",onPositiveClick:()=>{l.value=!0,Be({user_id:s.id}).then(e=>{l.value=!1,s.is_friend=!1,O()}).catch(e=>{l.value=!1,console.log(e)})}})},fe=()=>{b.success({title:"提示",content:"确定"+(s.is_following?"取消关注":"关注")+"该用户吗?",positiveText:"确定",negativeText:"取消",onPositiveClick:()=>{l.value=!0,s.is_following?Re({user_id:s.id}).then(e=>{l.value=!1,window.$message.success("取消关注成功"),I()}).catch(e=>{l.value=!1,console.log(e)}):De({user_id:s.id}).then(e=>{l.value=!1,window.$message.success("关注成功"),I()}).catch(e=>{l.value=!1,console.log(e)})}})},he=()=>{b.warning({title:"警告",content:"确定对该用户进行"+(s.status===1?"禁言":"解封")+"处理吗?",positiveText:"确定",negativeText:"取消",onPositiveClick:()=>{l.value=!0,Ae({id:s.id,status:s.status===1?2:1}).then(e=>{l.value=!1,s.status===1?window.$message.success("禁言成功"):window.$message.success("解封成功"),I()}).catch(e=>{l.value=!1,console.log(e)})}})};return es(()=>({path:_.path,query:_.query}),(e,T)=>{T.path==="/user"&&e.path==="/user"&&(m.value=_.query.s||"",I())}),ss(()=>{I()}),(e,T)=>{const ge=ts,we=Ee,j=Ge,L=as("router-link"),ke=V,ye=je,be=hs,$e=Le,M=Ke,xe=Qe,Pe=qe,Ue=Je,ze=Ie,K=Xe,Te=Me,Ce=Ve,Fe=He;return u(),f("div",null,[a(ge,{title:"用户详情"}),a(Ce,{class:"main-content-wrap profile-wrap",bordered:""},{default:o(()=>[a($e,{show:l.value},{default:o(()=>[s.id>0?(u(),f("div",$s,[r("div",xs,[a(we,{size:72,src:s.avatar},null,8,["src"])]),r("div",Ps,[r("div",Us,[r("strong",null,h(s.nickname),1),r("span",null," @"+h(s.username),1),k(d).state.userInfo.id>0&&k(d).state.userInfo.username!=s.username&&s.is_friend?(u(),F(j,{key:0,class:"top-tag",type:"info",size:"small",round:""},{default:o(()=>[g(" 好友 ")]),_:1})):C("",!0),s.is_admin?(u(),F(j,{key:1,class:"top-tag",type:"error",size:"small",round:""},{default:o(()=>[g(" 管理员 ")]),_:1})):C("",!0)]),r("div",zs,[r("span",Ts,"UID. "+h(s.id),1),r("span",Cs,h(k(ls)(s.created_on))+" 加入",1)]),r("div",Fs,[r("span",Is,[a(L,{onClick:T[0]||(T[0]=J(()=>{},["stop"])),class:"following-link",to:{name:"following",query:{s:s.username,n:s.nickname,t:"follows"}}},{default:o(()=>[g(" 关注  "+h(s.follows),1)]),_:1},8,["to"])]),r("span",Ms,[a(L,{onClick:T[1]||(T[1]=J(()=>{},["stop"])),class:"following-link",to:{name:"following",query:{s:s.username,n:s.nickname,t:"followings"}}},{default:o(()=>[g(" 粉丝  "+h(s.followings),1)]),_:1},8,["to"])])])]),k(d).state.userInfo.id>0&&k(d).state.userInfo.username!=s.username?(u(),f("div",qs,[a(ye,{placement:"bottom-end",trigger:"click",size:"small",options:de.value,onSelect:me},{default:o(()=>[a(ke,{quaternary:"",circle:""},{icon:o(()=>[a(k(Q),null,{default:o(()=>[a(k(is))]),_:1})]),_:1})]),_:1},8,["options"])])):C("",!0)])):C("",!0),a(be,{show:p.value,user:s,onSuccess:_e},null,8,["show","user"]),a(bs,{show:w.value,user:s,onSuccess:pe},null,8,["show","user"])]),_:1},8,["show"]),a(xe,{class:"profile-tabs-wrap",type:"line",animated:"","onUpdate:value":ie},{default:o(()=>[a(M,{name:"post",tab:"泡泡"}),a(M,{name:"comment",tab:"评论"}),a(M,{name:"highlight",tab:"亮点"}),a(M,{name:"media",tab:"图文"}),a(M,{name:"star",tab:"喜欢"})]),_:1}),t.value?(u(),f("div",Ss,[a(Pe,{num:v.value},null,8,["num"])])):(u(),f("div",Ws,[c.value.length===0?(u(),f("div",Os,[a(Ue,{size:"large",description:"暂无数据"})])):C("",!0),k(d).state.desktopModelShow?(u(),f("div",Bs,[(u(!0),f(X,null,Y(c.value,q=>(u(),F(K,{key:q.id},{default:o(()=>[a(ze,{post:q},null,8,["post"])]),_:2},1024))),128))])):(u(),f("div",Rs,[(u(!0),f(X,null,Y(c.value,q=>(u(),F(K,{key:q.id},{default:o(()=>[a(Te,{post:q},null,8,["post"])]),_:2},1024))),128))]))]))]),_:1}),$.value>0?(u(),f("div",Ds,[a(Fe,{page:n.value,"onUpdate:page":ce,"page-slot":k(d).state.collapsedRight?5:8,"page-count":$.value},null,8,["page","page-slot","page-count"])])):C("",!0)])}}});const ha=N(As,[["__scopeId","data-v-5e39b9c4"]]);export{ha as default}; diff --git a/web/dist/assets/User-a7efd346.css b/web/dist/assets/User-a7efd346.css new file mode 100644 index 00000000..cc2a1ae4 --- /dev/null +++ b/web/dist/assets/User-a7efd346.css @@ -0,0 +1 @@ +.whisper-wrap .whisper-line[data-v-0cbfe47c]{margin-top:10px}.whisper-wrap .whisper-line.send-wrap .n-button[data-v-0cbfe47c]{width:100%}.dark .whisper-wrap[data-v-0cbfe47c]{background-color:#101014bf}.whisper-wrap .whisper-line[data-v-60be56a2]{margin-top:10px}.whisper-wrap .whisper-line.send-wrap .n-button[data-v-60be56a2]{width:100%}.dark .whisper-wrap[data-v-60be56a2]{background-color:#101014bf}.profile-tabs-wrap[data-v-5e39b9c4]{padding:0 16px}.profile-baseinfo[data-v-5e39b9c4]{display:flex;padding:16px}.profile-baseinfo .avatar[data-v-5e39b9c4]{width:72px}.profile-baseinfo .base-info[data-v-5e39b9c4]{position:relative;margin-left:12px;width:calc(100% - 84px)}.profile-baseinfo .base-info .username[data-v-5e39b9c4]{line-height:16px;font-size:16px}.profile-baseinfo .base-info .userinfo[data-v-5e39b9c4]{font-size:14px;line-height:14px;margin-top:10px;opacity:.75}.profile-baseinfo .base-info .userinfo .info-item[data-v-5e39b9c4]{margin-right:12px}.profile-baseinfo .base-info .top-tag[data-v-5e39b9c4]{transform:scale(.75)}.profile-baseinfo .user-opts[data-v-5e39b9c4]{position:absolute;top:16px;right:16px;opacity:.75}.pagination-wrap[data-v-5e39b9c4]{padding:10px;display:flex;justify-content:center;overflow:hidden}.dark .profile-baseinfo[data-v-5e39b9c4]{background-color:#18181c}.dark .profile-wrap[data-v-5e39b9c4],.dark .pagination-wrap[data-v-5e39b9c4]{background-color:#101014bf} diff --git a/web/dist/assets/User-fb70c280.css b/web/dist/assets/User-fb70c280.css deleted file mode 100644 index 03dbab1d..00000000 --- a/web/dist/assets/User-fb70c280.css +++ /dev/null @@ -1 +0,0 @@ -.whisper-wrap .whisper-line[data-v-0cbfe47c]{margin-top:10px}.whisper-wrap .whisper-line.send-wrap .n-button[data-v-0cbfe47c]{width:100%}.dark .whisper-wrap[data-v-0cbfe47c]{background-color:#101014bf}.whisper-wrap .whisper-line[data-v-60be56a2]{margin-top:10px}.whisper-wrap .whisper-line.send-wrap .n-button[data-v-60be56a2]{width:100%}.dark .whisper-wrap[data-v-60be56a2]{background-color:#101014bf}.profile-tabs-wrap[data-v-e6276e0d]{padding:0 16px}.profile-baseinfo[data-v-e6276e0d]{display:flex;padding:16px}.profile-baseinfo .avatar[data-v-e6276e0d]{width:55px}.profile-baseinfo .base-info[data-v-e6276e0d]{position:relative;width:calc(100% - 55px)}.profile-baseinfo .base-info .username[data-v-e6276e0d]{line-height:16px;font-size:16px}.profile-baseinfo .base-info .uid[data-v-e6276e0d]{font-size:14px;line-height:14px;margin-top:10px;opacity:.75}.profile-baseinfo .base-info .top-tag[data-v-e6276e0d]{transform:scale(.75)}.profile-baseinfo .user-opts[data-v-e6276e0d]{position:absolute;top:16px;right:16px;opacity:.75}.pagination-wrap[data-v-e6276e0d]{padding:10px;display:flex;justify-content:center;overflow:hidden}.dark .profile-baseinfo[data-v-e6276e0d]{background-color:#18181c}.dark .profile-wrap[data-v-e6276e0d],.dark .pagination-wrap[data-v-e6276e0d]{background-color:#101014bf} diff --git a/web/dist/assets/Wallet-c8cff951.js b/web/dist/assets/Wallet-c8cff951.js deleted file mode 100644 index 89317cfa..00000000 --- a/web/dist/assets/Wallet-c8cff951.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as X}from"./post-skeleton-949f6995.js";import{_ as Y}from"./main-nav.vue_vue_type_style_index_0_lang-e28257cc.js";import{d as Z,r as c,j as J,c as _,V as e,a1 as o,o as n,_ as y,O as w,a,e as k,F as N,a4 as $,z as ee,v as te,M as r,Q as q,L as oe,a2 as ae,W as ne,X as se}from"./@vue-e0e89260.js";import{u as le}from"./vuex-473b3783.js";import{b as ce}from"./vue-router-b8e3382f.js";import{b as ie}from"./qrcode-9719fc56.js";import{P as _e,Q as re,R as ue,S as pe,_ as de}from"./index-a0347e1a.js";import{a as me}from"./formatTime-cdf4e6f1.js";import{Q as ge}from"./@vicons-8f91201d.js";import{F as ve,i as he,Y as fe,Z as ye,e as we,a as ke,G as be,I as Se,j as xe,l as Ce,h as Ie,H as Re}from"./naive-ui-62663ad7.js";import"./vooks-a50491fd.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-59ca65c3.js";import"./@css-render-580d83ec.js";import"./vdirs-b0483831.js";import"./@juggle-41516555.js";import"./css-render-6a5c5852.js";import"./@emotion-8a8e73f6.js";import"./lodash-es-8412e618.js";import"./treemate-25c27bff.js";import"./async-validator-dee29e8b.js";import"./date-fns-975a2d8f.js";import"./moment-2ab8298d.js";const P=m=>(ne("data-v-870bd246"),m=m(),se(),m),Ae={class:"balance-wrap"},ze={class:"balance-line"},Ne={class:"balance-opts"},$e={key:0,class:"pagination-wrap"},qe={key:0,class:"skeleton-wrap"},Pe={key:1},We={key:0,class:"empty-wrap"},Be={class:"bill-line"},Fe={key:0,class:"amount-options"},Le={key:1,style:{"margin-top":"10px"}},Oe={class:"qrcode-wrap"},Te=P(()=>a("canvas",{id:"qrcode-container"},null,-1)),Ve={class:"pay-tips"},Ee={class:"pay-sub-tips"},Me=P(()=>a("span",{style:{"margin-left":"6px"}}," 支付结果实时同步中... ",-1)),Qe=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([]),S=c(+W.query.p||1),x=c(20),C=c(0),B=c([100,200,300,500,1e3,3e3,5e3,1e4,5e4]),R=()=>{h.value=!0,re({page:S.value,page_size:x.value}).then(s=>{h.value=!1,b.value=s.list,C.value=Math.ceil(s.pager.total_rows/x.value),window.scrollTo(0,0)}).catch(s=>{h.value=!1})},F=s=>{S.value=s,R()},A=()=>{const s=localStorage.getItem("PAOPAO_TOKEN")||"";s?_e(s).then(l=>{i.commit("updateUserinfo",l),i.commit("triggerAuth",!1),R()}).catch(l=>{i.commit("triggerAuth",!0),i.commit("userLogout")}):(i.commit("triggerAuth",!0),i.commit("userLogout"))},L=()=>{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 I=setInterval(()=>{pe({id:l.id}).then(d=>{d.status==="TRADE_SUCCESS"&&(clearInterval(I),window.$message.success("充值成功"),g.value=!1,p.value="",A())}).catch(d=>{console.log(d)})},2e3)}).catch(l=>{v.value=!1})},T=()=>{i.state.userInfo.balance==0?window.$message.warning("您暂无可提现资金"):window.$message.warning("该功能即将开放")};return J(()=>{A()}),(s,l)=>{const I=Y,d=fe,V=ye,f=we,z=ke,E=be,M=X,Q=Se,U=Re,D=ve,j=xe,G=Ce,H=Ie,K=he;return n(),_("div",null,[e(I,{title:"钱包"}),e(D,{class:"main-content-wrap",bordered:""},{footer:o(()=>[C.value>1?(n(),_("div",$e,[e(E,{page:S.value,"onUpdate:page":F,"page-slot":y(i).state.collapsedRight?5:8,"page-count":C.value},null,8,["page","page-slot","page-count"])])):w("",!0)]),default:o(()=>[a("div",Ae,[a("div",ze,[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}),a("div",Ne,[e(z,{vertical:""},{default:o(()=>[e(f,{size:"small",secondary:"",type:"primary",onClick:L},{default:o(()=>[k(" 充值 ")]),_:1}),e(f,{size:"small",secondary:"",type:"tertiary",onClick:T},{default:o(()=>[k(" 提现 ")]),_:1})]),_:1})])])]),h.value?(n(),_("div",qe,[e(M,{num:x.value},null,8,["num"])])):(n(),_("div",Pe,[b.value.length===0?(n(),_("div",We,[e(Q,{size:"large",description:"暂无数据"})])):w("",!0),(n(!0),_(N,null,$(b.value,t=>(n(),q(U,{key:t.id},{default:o(()=>[a("div",Be,[a("div",null,"NO."+r(t.id),1),a("div",null,r(t.reason),1),a("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),a("div",null,r(y(me)(t.created_on)),1)])]),_:2},1024))),128))]))]),_:1}),e(K,{show:g.value,"onUpdate:show":l[0]||(l[0]=t=>g.value=t)},{default:o(()=>[e(H,{bordered:!1,title:"请选择充值金额",role:"dialog","aria-modal":"true",style:{width:"100%","max-width":"330px"}},{default:o(()=>[p.value.length===0?(n(),_("div",Fe,[e(z,{align:"baseline"},{default:o(()=>[(n(!0),_(N,null,$(B.value,t=>(n(),q(f,{key:t,size:"small",secondary:"",type:u.value===t?"info":"default",onClick:ae(Ue=>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?(n(),_("div",Le,[e(f,{loading:v.value,strong:"",secondary:"",type:"info",style:{width:"100%"},onClick:O},{icon:o(()=>[e(j,null,{default:o(()=>[e(y(ge))]),_:1})]),default:o(()=>[k(" 前往支付 ")]),_:1},8,["loading"])])):w("",!0),ee(a("div",Oe,[Te,a("div",Ve," 请使用支付宝扫码支付"+r((u.value/100).toFixed(2))+"元 ",1),a("div",Ee,[e(G,{value:100,type:"info",dot:"",processing:""}),Me])],512),[[te,p.value.length>0]])]),_:1})]),_:1},8,["show"])])}}});const yt=de(Qe,[["__scopeId","data-v-870bd246"]]);export{yt as default}; diff --git a/web/dist/assets/Wallet-fd7ec151.js b/web/dist/assets/Wallet-fd7ec151.js new file mode 100644 index 00000000..5f7f4a8a --- /dev/null +++ b/web/dist/assets/Wallet-fd7ec151.js @@ -0,0 +1 @@ +import{_ as X}from"./post-skeleton-c0397381.js";import{_ as Y}from"./main-nav.vue_vue_type_style_index_0_lang-db217db0.js";import{d as Z,r as c,j as J,c as _,V as e,a1 as o,o as n,_ as y,O as w,a,e as k,F as N,a4 as W,z as ee,v as te,M as r,Q as $,L as oe,a2 as ae,W as ne,X as se}from"./@vue-e0e89260.js";import{u as le}from"./vuex-473b3783.js";import{b as ce}from"./vue-router-b8e3382f.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-479e9ef6.js";import{a as me}from"./formatTime-4210fcd1.js";import{U as ge}from"./@vicons-0524c43e.js";import{F as ve,i as he,Y as fe,Z as ye,e as we,a as ke,G as be,I as xe,j as Ce,l as Ie,h as Se,H as Re}from"./naive-ui-62663ad7.js";import"./vooks-a50491fd.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-59ca65c3.js";import"./@css-render-580d83ec.js";import"./vdirs-b0483831.js";import"./@juggle-41516555.js";import"./css-render-6a5c5852.js";import"./@emotion-8a8e73f6.js";import"./lodash-es-8412e618.js";import"./treemate-25c27bff.js";import"./async-validator-dee29e8b.js";import"./date-fns-975a2d8f.js";import"./moment-2ab8298d.js";const q=m=>(ne("data-v-870bd246"),m=m(),se(),m),Ae={class:"balance-wrap"},ze={class:"balance-line"},Ne={class:"balance-opts"},We={key:0,class:"pagination-wrap"},$e={key:0,class:"skeleton-wrap"},qe={key:1},Te={key:0,class:"empty-wrap"},Ue={class:"bill-line"},Ve={key:0,class:"amount-options"},Be={key:1,style:{"margin-top":"10px"}},Fe={class:"qrcode-wrap"},Le=q(()=>a("canvas",{id:"qrcode-container"},null,-1)),Oe={class:"pay-tips"},Pe={class:"pay-sub-tips"},Ee=q(()=>a("span",{style:{"margin-left":"6px"}}," 支付结果实时同步中... ",-1)),Me=Z({__name:"Wallet",setup(m){const i=le(),T=ce(),g=c(!1),u=c(100),v=c(!1),p=c(""),h=c(!1),b=c([]),x=c(+T.query.p||1),C=c(20),I=c(0),U=c([100,200,300,500,1e3,3e3,5e3,1e4,5e4]),R=()=>{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})},V=s=>{x.value=s,R()},A=()=>{const s=localStorage.getItem("PAOPAO_TOKEN")||"";s?_e(s).then(l=>{i.commit("updateUserinfo",l),i.commit("triggerAuth",!1),R()}).catch(l=>{i.commit("triggerAuth",!0),i.commit("userLogout")}):(i.commit("triggerAuth",!0),i.commit("userLogout"))},B=()=>{g.value=!0},F=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="",A())}).catch(d=>{console.log(d)})},2e3)}).catch(l=>{v.value=!1})},L=()=>{i.state.userInfo.balance==0?window.$message.warning("您暂无可提现资金"):window.$message.warning("该功能即将开放")};return J(()=>{A()}),(s,l)=>{const S=Y,d=fe,O=ye,f=we,z=ke,P=be,E=X,M=xe,D=Re,j=ve,Q=Ce,G=Ie,H=Se,K=he;return n(),_("div",null,[e(S,{title:"钱包"}),e(j,{class:"main-content-wrap",bordered:""},{footer:o(()=>[I.value>1?(n(),_("div",We,[e(P,{page:x.value,"onUpdate:page":V,"page-slot":y(i).state.collapsedRight?5:8,"page-count":I.value},null,8,["page","page-slot","page-count"])])):w("",!0)]),default:o(()=>[a("div",Ae,[a("div",ze,[e(O,{label:"账户余额 (元)"},{default:o(()=>[e(d,{from:0,to:(y(i).state.userInfo.balance||0)/100,duration:500,precision:2},null,8,["to"])]),_:1}),a("div",Ne,[e(z,{vertical:""},{default:o(()=>[e(f,{size:"small",secondary:"",type:"primary",onClick:B},{default:o(()=>[k(" 充值 ")]),_:1}),e(f,{size:"small",secondary:"",type:"tertiary",onClick:L},{default:o(()=>[k(" 提现 ")]),_:1})]),_:1})])])]),h.value?(n(),_("div",$e,[e(E,{num:C.value},null,8,["num"])])):(n(),_("div",qe,[b.value.length===0?(n(),_("div",Te,[e(M,{size:"large",description:"暂无数据"})])):w("",!0),(n(!0),_(N,null,W(b.value,t=>(n(),$(D,{key:t.id},{default:o(()=>[a("div",Ue,[a("div",null,"NO."+r(t.id),1),a("div",null,r(t.reason),1),a("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),a("div",null,r(y(me)(t.created_on)),1)])]),_:2},1024))),128))]))]),_:1}),e(K,{show:g.value,"onUpdate:show":l[0]||(l[0]=t=>g.value=t)},{default:o(()=>[e(H,{bordered:!1,title:"请选择充值金额",role:"dialog","aria-modal":"true",style:{width:"100%","max-width":"330px"}},{default:o(()=>[p.value.length===0?(n(),_("div",Ve,[e(z,{align:"baseline"},{default:o(()=>[(n(!0),_(N,null,W(U.value,t=>(n(),$(f,{key:t,size:"small",secondary:"",type:u.value===t?"info":"default",onClick:ae(De=>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?(n(),_("div",Be,[e(f,{loading:v.value,strong:"",secondary:"",type:"info",style:{width:"100%"},onClick:F},{icon:o(()=>[e(Q,null,{default:o(()=>[e(y(ge))]),_:1})]),default:o(()=>[k(" 前往支付 ")]),_:1},8,["loading"])])):w("",!0),ee(a("div",Fe,[Le,a("div",Oe," 请使用支付宝扫码支付"+r((u.value/100).toFixed(2))+"元 ",1),a("div",Pe,[e(G,{value:100,type:"info",dot:"",processing:""}),Ee])],512),[[te,p.value.length>0]])]),_:1})]),_:1},8,["show"])])}}});const yt=de(Me,[["__scopeId","data-v-870bd246"]]);export{yt as default}; diff --git a/web/dist/assets/content-5d77464b.js b/web/dist/assets/content-5d77464b.js deleted file mode 100644 index 0385dbfa..00000000 --- a/web/dist/assets/content-5d77464b.js +++ /dev/null @@ -1 +0,0 @@ -import{d as h,o as e,c as r,F as a,a4 as m,V as s,a1 as o,_ as c,a as C,a2 as k,M as I,Q as d,O as g,r as j,e as B,s as b}from"./@vue-e0e89260.js";import{N as D,O as M}from"./@vicons-8f91201d.js";import{j as $,V as N,W as V,m as O,X as z,e as F,i as L}from"./naive-ui-62663ad7.js";import{_ as A,M as T,N as U}from"./index-a0347e1a.js";import{e as P}from"./paopao-video-player-aa5e8b3f.js";const R={class:"link-wrap"},Q={class:"link-txt-wrap"},S=["href"],W={class:"link-txt"},X=h({__name:"post-link",props:{links:{default:()=>[]}},setup(y){const l=y;return(p,u)=>{const x=$;return e(),r("div",R,[(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(D))]),_:1}),C("div",Q,[C("a",{href:n.content,class:"hash-link",target:"_blank",onClick:u[0]||(u[0]=k(()=>{},["stop"]))},[C("span",W,I(n.content),1)],8,S)])]))),128))])}}});const ot=A(X,[["__scopeId","data-v-36eef76b"]]),Z={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=N,n=V;return l.videos.length>0?(e(),r("div",Z,[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(P),{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)}}}),q={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=O,_=N,f=V,w=z;return e(),r("div",q,[[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 G={class:"attachment-wrap"},H=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=F,i=L;return e(),r("div",G,[(e(!0),r(a,null,m(_.attachments,E=>(e(),r("div",{class:"attach-item",key:E.id},[s(t,{onClick:k(J=>n(E),["stop"]),type:"primary",size:"tiny",dashed:""},{icon:o(()=>[s(w,null,{default:o(()=>[s(c(M))]),_:1})]),default:o(()=>[B(" "+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=A(H,[["__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-ffcf943b.js b/web/dist/assets/content-ffcf943b.js new file mode 100644 index 00000000..7af99e71 --- /dev/null +++ b/web/dist/assets/content-ffcf943b.js @@ -0,0 +1 @@ +import{d as h,o as e,c as r,F as a,a4 as m,V as s,a1 as o,_ as c,a as C,a2 as k,M as I,Q as d,O as g,r as j,e as D,s as b}from"./@vue-e0e89260.js";import{Q as N,R as O}from"./@vicons-0524c43e.js";import{j as $,V,W as A,m as z,X as F,e as L,i as M}from"./naive-ui-62663ad7.js";import{_ as B,O as P,P as R}from"./index-479e9ef6.js";import{e as T}from"./paopao-video-player-aa5e8b3f.js";const U={class:"link-wrap"},Q={class:"link-txt-wrap"},S=["href"],W={class:"link-txt"},X=h({__name:"post-link",props:{links:{default:()=>[]}},setup(y){const l=y;return(p,u)=>{const x=$;return e(),r("div",U,[(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(N))]),_:1}),C("div",Q,[C("a",{href:n.content,class:"hash-link",target:"_blank",onClick:u[0]||(u[0]=k(()=>{},["stop"]))},[C("span",W,I(n.content),1)],8,S)])]))),128))])}}});const ot=B(X,[["__scopeId","data-v-36eef76b"]]),Z={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=V,n=A;return l.videos.length>0?(e(),r("div",Z,[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(T),{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)}}}),q={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,_=V,f=A,w=F;return e(),r("div",q,[[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 G={class:"attachment-wrap"},H=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)+"元")]),P({id:x.value}).then(f=>{f.paid&&(u.value=()=>b("div",{},[b("p",{},"此次下载您已支付或无需付费,请确认下载")]))}).catch(f=>{p.value=!1}))},v=()=>{R({id:x.value}).then(_=>{window.open(_.signed_url.replace("http://","https://"),"_blank")}).catch(_=>{console.log(_)})};return(_,f)=>{const w=$,t=L,i=M;return e(),r("div",G,[(e(!0),r(a,null,m(_.attachments,E=>(e(),r("div",{class:"attach-item",key:E.id},[s(t,{onClick:k(J=>n(E),["stop"]),type:"primary",size:"tiny",dashed:""},{icon:o(()=>[s(w,null,{default:o(()=>[s(c(O))]),_:1})]),default:o(()=>[D(" "+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=B(H,[["__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/formatTime-cdf4e6f1.js b/web/dist/assets/formatTime-4210fcd1.js similarity index 54% rename from web/dist/assets/formatTime-cdf4e6f1.js rename to web/dist/assets/formatTime-4210fcd1.js index 13c2c4d8..7aaf7fa8 100644 --- a/web/dist/assets/formatTime-cdf4e6f1.js +++ b/web/dist/assets/formatTime-4210fcd1.js @@ -1 +1 @@ -import{h as r}from"./moment-2ab8298d.js";r.locale("zh-cn");const f=e=>r.unix(e).fromNow(),a=e=>{let t=r.unix(e),o=r();return t.year()!=o.year()?t.utc(!0).format("YYYY-MM-DD HH:mm"):r().diff(t,"month")>3?t.utc(!0).format("MM-DD HH:mm"):t.fromNow()},n=e=>{let t=r.unix(e),o=r();return t.year()!=o.year()?t.utc(!0).format("YYYY-MM-DD"):r().diff(t,"month")>3?t.utc(!0).format("MM-DD"):t.fromNow()};export{f as a,n as b,a as f}; +import{h as r}from"./moment-2ab8298d.js";r.locale("zh-cn");const a=e=>r.unix(e).fromNow(),f=e=>{let t=r.unix(e),o=r();return t.year()!=o.year()?t.utc(!0).format("YYYY-MM-DD HH:mm"):r().diff(t,"month")>3?t.utc(!0).format("MM-DD HH:mm"):t.fromNow()},u=e=>{let t=r.unix(e),o=r();return t.year()!=o.year()?t.utc(!0).format("YYYY-MM-DD"):r().diff(t,"month")>3?t.utc(!0).format("MM-DD"):t.fromNow()},n=e=>r.unix(e).utc(!0).format("YYYY年MM月");export{a,n as b,u as c,f}; diff --git a/web/dist/assets/index-c5cff9e7.css b/web/dist/assets/index-274d7c87.css similarity index 81% rename from web/dist/assets/index-c5cff9e7.css rename to web/dist/assets/index-274d7c87.css index 9526b802..7776688c 100644 --- a/web/dist/assets/index-c5cff9e7.css +++ b/web/dist/assets/index-274d7c87.css @@ -1 +1 @@ -.auth-wrap[data-v-053dfa44]{margin-top:-30px}.dark .auth-wrap[data-v-053dfa44]{background-color:#101014bf}.rightbar-wrap[data-v-f4a84024]{width:240px;position:fixed;left:calc(50% + var(--content-main) / 2 + 10px)}.rightbar-wrap .search-wrap[data-v-f4a84024]{margin:12px 0}.rightbar-wrap .hot-tag-item[data-v-f4a84024]{line-height:2;position:relative}.rightbar-wrap .hot-tag-item .hash-link[data-v-f4a84024]{width:calc(100% - 60px);text-overflow:ellipsis;white-space:nowrap;overflow:hidden;display:block}.rightbar-wrap .hot-tag-item .post-num[data-v-f4a84024]{position:absolute;right:0;top:0;width:60px;text-align:right;line-height:2;opacity:.5}.rightbar-wrap .hottopic-wrap[data-v-f4a84024]{margin-bottom:10px}.rightbar-wrap .copyright-wrap .copyright[data-v-f4a84024]{font-size:12px;opacity:.75}.rightbar-wrap .copyright-wrap .hash-link[data-v-f4a84024]{font-size:12px}.dark .hottopic-wrap[data-v-f4a84024],.dark .copyright-wrap[data-v-f4a84024]{background-color:#18181c}.sidebar-wrap{z-index:99;width:200px;height:100vh;position:fixed;right:calc(50% + var(--content-main) / 2 + 10px);padding:12px 0;box-sizing:border-box}.sidebar-wrap .n-menu .n-menu-item-content:before{border-radius:21px}.logo-wrap{display:flex;justify-content:flex-start;margin-bottom:12px}.logo-wrap .logo-img{margin-left:24px}.logo-wrap .logo-img:hover{cursor:pointer}.user-wrap{display:flex;align-items:center;position:absolute;bottom:12px;left:12px;right:12px}.user-wrap .user-mini-wrap{display:none}.user-wrap .user-avatar{margin-right:8px}.user-wrap .user-info{display:flex;flex-direction:column}.user-wrap .user-info .nickname{font-size:16px;font-weight:700;line-height:16px;height:16px;margin-bottom:2px;display:flex;align-items:center}.user-wrap .user-info .nickname .nickname-txt{max-width:90px;text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.user-wrap .user-info .nickname .logout{margin-left:6px}.user-wrap .user-info .username{font-size:14px;line-height:16px;height:16px;width:120px;text-overflow:ellipsis;overflow:hidden;white-space:nowrap;opacity:.75}.user-wrap .login-only-wrap{display:flex;justify-content:center;width:100%}.user-wrap .login-only-wrap button{margin:0 4px;width:80%}.user-wrap .login-wrap{display:flex;justify-content:center;width:100%}.user-wrap .login-wrap button{margin:0 4px}.auth-card .n-card-header{z-index:999}@media screen and (max-width: 821px){.sidebar-wrap{width:200px;right:calc(100% - 200px)}.logo-wrap .logo-img{margin-left:12px!important}.user-wrap .user-avatar,.user-wrap .user-info,.user-wrap .login-only-wrap,.user-wrap .login-wrap{margin-bottom:32px}}:root{--content-main: 600px}.app-container{margin:0}.app-container .app-wrap{width:100%;margin:0 auto}.main-wrap{min-height:100vh;display:flex;flex-direction:row;justify-content:center}.main-wrap .content-wrap{width:100%;max-width:var(--content-main);position:relative}.main-wrap .main-content-wrap{margin:0;border-top:none;border-radius:0}.main-wrap .main-content-wrap .n-list-item{padding:0}.empty-wrap{min-height:300px;display:flex;align-items:center;justify-content:center}.hash-link,.user-link{color:#18a058;text-decoration:none;cursor:pointer}.hash-link:hover,.user-link:hover{opacity:.8}.beian-link{color:#333;text-decoration:none}.beian-link:hover{opacity:.75}.username-link{color:#000;color:none;text-decoration:none;cursor:pointer}.username-link:hover{text-decoration:underline}.dark .hash-link,.dark .user-link{color:#63e2b7}.dark .username-link{color:#eee}.dark .beian-link{color:#ddd}@media screen and (max-width: 821px){.content-wrap{top:0;position:absolute!important}} +.auth-wrap[data-v-053dfa44]{margin-top:-30px}.dark .auth-wrap[data-v-053dfa44]{background-color:#101014bf}.rightbar-wrap[data-v-f4a84024]{width:240px;position:fixed;left:calc(50% + var(--content-main) / 2 + 10px)}.rightbar-wrap .search-wrap[data-v-f4a84024]{margin:12px 0}.rightbar-wrap .hot-tag-item[data-v-f4a84024]{line-height:2;position:relative}.rightbar-wrap .hot-tag-item .hash-link[data-v-f4a84024]{width:calc(100% - 60px);text-overflow:ellipsis;white-space:nowrap;overflow:hidden;display:block}.rightbar-wrap .hot-tag-item .post-num[data-v-f4a84024]{position:absolute;right:0;top:0;width:60px;text-align:right;line-height:2;opacity:.5}.rightbar-wrap .hottopic-wrap[data-v-f4a84024]{margin-bottom:10px}.rightbar-wrap .copyright-wrap .copyright[data-v-f4a84024]{font-size:12px;opacity:.75}.rightbar-wrap .copyright-wrap .hash-link[data-v-f4a84024]{font-size:12px}.dark .hottopic-wrap[data-v-f4a84024],.dark .copyright-wrap[data-v-f4a84024]{background-color:#18181c}.sidebar-wrap{z-index:99;width:200px;height:100vh;position:fixed;right:calc(50% + var(--content-main) / 2 + 10px);padding:12px 0;box-sizing:border-box}.sidebar-wrap .n-menu .n-menu-item-content:before{border-radius:21px}.logo-wrap{display:flex;justify-content:flex-start;margin-bottom:12px}.logo-wrap .logo-img{margin-left:24px}.logo-wrap .logo-img:hover{cursor:pointer}.user-wrap{display:flex;align-items:center;position:absolute;bottom:12px;left:12px;right:12px}.user-wrap .user-mini-wrap{display:none}.user-wrap .user-avatar{margin-right:8px}.user-wrap .user-info{display:flex;flex-direction:column}.user-wrap .user-info .nickname{font-size:16px;font-weight:700;line-height:16px;height:16px;margin-bottom:2px;display:flex;align-items:center}.user-wrap .user-info .nickname .nickname-txt{max-width:90px;text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.user-wrap .user-info .nickname .logout{margin-left:6px}.user-wrap .user-info .username{font-size:14px;line-height:16px;height:16px;width:120px;text-overflow:ellipsis;overflow:hidden;white-space:nowrap;opacity:.75}.user-wrap .login-only-wrap{display:flex;justify-content:center;width:100%}.user-wrap .login-only-wrap button{margin:0 4px;width:80%}.user-wrap .login-wrap{display:flex;justify-content:center;width:100%}.user-wrap .login-wrap button{margin:0 4px}.auth-card .n-card-header{z-index:999}@media screen and (max-width: 821px){.sidebar-wrap{width:200px;right:calc(100% - 200px)}.logo-wrap .logo-img{margin-left:12px!important}.user-wrap .user-avatar,.user-wrap .user-info,.user-wrap .login-only-wrap,.user-wrap .login-wrap{margin-bottom:32px}}:root{--content-main: 600px}.app-container{margin:0}.app-container .app-wrap{width:100%;margin:0 auto}.main-wrap{min-height:100vh;display:flex;flex-direction:row;justify-content:center}.main-wrap .content-wrap{width:100%;max-width:var(--content-main);position:relative}.main-wrap .main-content-wrap{margin:0;border-top:none;border-radius:0}.main-wrap .main-content-wrap .n-list-item{padding:0}.empty-wrap{min-height:300px;display:flex;align-items:center;justify-content:center}.following-link{color:#000;color:none;text-decoration:none;cursor:pointer;opacity:.75}.following-link:hover{opacity:.8}.hash-link,.user-link{color:#18a058;text-decoration:none;cursor:pointer}.hash-link:hover,.user-link:hover{opacity:.8}.beian-link{color:#333;text-decoration:none}.beian-link:hover{opacity:.75}.username-link{color:#000;color:none;text-decoration:none;cursor:pointer}.username-link:hover{text-decoration:underline}.dark .hash-link,.dark .user-link{color:#63e2b7}.dark .following-link,.dark .username-link{color:#eee}.dark .beian-link{color:#ddd}@media screen and (max-width: 821px){.content-wrap{top:0;position:absolute!important}} diff --git a/web/dist/assets/index-479e9ef6.js b/web/dist/assets/index-479e9ef6.js new file mode 100644 index 00000000..2985753c --- /dev/null +++ b/web/dist/assets/index-479e9ef6.js @@ -0,0 +1 @@ +import{d as z,r as E,E as J,j,o as v,Q as N,a1 as a,a as k,V as s,c as T,e as S,P as q,a2 as D,O as U,_ as h,n as Q,w as H,a3 as ae,F as X,a4 as Y,M as I,s as P,a5 as he,R as Z,L as ge,a6 as fe}from"./@vue-e0e89260.js";import{c as ve,a as we,u as le,b as ye}from"./vue-router-b8e3382f.js";import{c as ke,u as B}from"./vuex-473b3783.js";import{a as be}from"./axios-4a70c6fc.js";import{_ as Pe,N as Le,a as ue,b as ie,c as Oe,d as Ae,e as ce,f as Te,g as Ee,h as de,i as Re,j as F,k as $e,u as Ce,l as Ie,m as Se,n as Ue,o as Me,p as Ke,q as qe,r as De,s as Ne,t as xe}from"./naive-ui-62663ad7.js";import{S as Fe,M as Ve,L as ze,C as Be,B as We,P as He,W as je,a as Qe,H as ee,b as te,c as oe}from"./@vicons-0524c43e.js";/* empty css */import"./seemly-76b7b838.js";import"./vueuc-59ca65c3.js";import"./evtd-b614532e.js";import"./@css-render-580d83ec.js";import"./vooks-a50491fd.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 i of document.querySelectorAll('link[rel="modulepreload"]'))c(i);new MutationObserver(i=>{for(const n of i)if(n.type==="childList")for(const m of n.addedNodes)m.tagName==="LINK"&&m.rel==="modulepreload"&&c(m)}).observe(document,{childList:!0,subtree:!0});function l(i){const n={};return i.integrity&&(n.integrity=i.integrity),i.referrerPolicy&&(n.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?n.credentials="include":i.crossOrigin==="anonymous"?n.credentials="omit":n.credentials="same-origin",n}function c(i){if(i.ep)return;i.ep=!0;const n=l(i);fetch(i.href,n)}})();const Ge="modulepreload",Je=function(e){return"/"+e},se={},A=function(t,l,c){if(!l||l.length===0)return t();const i=document.getElementsByTagName("link");return Promise.all(l.map(n=>{if(n=Je(n),n in se)return;se[n]=!0;const m=n.endsWith(".css"),d=m?'[rel="stylesheet"]':"";if(!!c)for(let b=i.length-1;b>=0;b--){const _=i[b];if(_.href===n&&(!m||_.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${n}"]${d}`))return;const g=document.createElement("link");if(g.rel=m?"stylesheet":Ge,m||(g.as="script",g.crossOrigin=""),g.href=n,document.head.appendChild(g),m)return new Promise((b,_)=>{g.addEventListener("load",b),g.addEventListener("error",()=>_(new Error(`Unable to preload CSS for ${n}`)))})})).then(()=>t()).catch(n=>{const m=new Event("vite:preloadError",{cancelable:!0});if(m.payload=n,window.dispatchEvent(m),!m.defaultPrevented)throw n})},Xe=[{path:"/",name:"home",meta:{title:"广场",keepAlive:!0},component:()=>A(()=>import("./Home-cf2e8d24.js"),["assets/Home-cf2e8d24.js","assets/post-item.vue_vue_type_style_index_0_lang-724e3b2f.js","assets/content-ffcf943b.js","assets/@vue-e0e89260.js","assets/@vicons-0524c43e.js","assets/naive-ui-62663ad7.js","assets/seemly-76b7b838.js","assets/vueuc-59ca65c3.js","assets/evtd-b614532e.js","assets/@css-render-580d83ec.js","assets/vooks-a50491fd.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-aa5e8b3f.js","assets/content-2fda112b.css","assets/vuex-473b3783.js","assets/vue-router-b8e3382f.js","assets/formatTime-4210fcd1.js","assets/moment-2ab8298d.js","assets/copy-to-clipboard-1dd3075d.js","assets/toggle-selection-93f4ad84.js","assets/post-item-593ff254.css","assets/post-skeleton-c0397381.js","assets/post-skeleton-f1900002.css","assets/lodash-94eb5868.js","assets/IEnum-a180d93e.js","assets/main-nav.vue_vue_type_style_index_0_lang-db217db0.js","assets/main-nav-569a7b0c.css","assets/axios-4a70c6fc.js","assets/Home-c075a37e.css","assets/vfonts-7afd136d.css"])},{path:"/post",name:"post",meta:{title:"泡泡详情"},component:()=>A(()=>import("./Post-89906b13.js"),["assets/Post-89906b13.js","assets/@vue-e0e89260.js","assets/vuex-473b3783.js","assets/formatTime-4210fcd1.js","assets/moment-2ab8298d.js","assets/IEnum-a180d93e.js","assets/@vicons-0524c43e.js","assets/naive-ui-62663ad7.js","assets/seemly-76b7b838.js","assets/vueuc-59ca65c3.js","assets/evtd-b614532e.js","assets/@css-render-580d83ec.js","assets/vooks-a50491fd.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-ffcf943b.js","assets/paopao-video-player-aa5e8b3f.js","assets/content-2fda112b.css","assets/vue-router-b8e3382f.js","assets/post-skeleton-c0397381.js","assets/post-skeleton-f1900002.css","assets/lodash-94eb5868.js","assets/copy-to-clipboard-1dd3075d.js","assets/toggle-selection-93f4ad84.js","assets/main-nav.vue_vue_type_style_index_0_lang-db217db0.js","assets/main-nav-569a7b0c.css","assets/v3-infinite-loading-e5c2e8bf.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:()=>A(()=>import("./Topic-7e667c9c.js"),["assets/Topic-7e667c9c.js","assets/@vicons-0524c43e.js","assets/@vue-e0e89260.js","assets/naive-ui-62663ad7.js","assets/seemly-76b7b838.js","assets/vueuc-59ca65c3.js","assets/evtd-b614532e.js","assets/@css-render-580d83ec.js","assets/vooks-a50491fd.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-db217db0.js","assets/vuex-473b3783.js","assets/vue-router-b8e3382f.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:()=>A(()=>import("./Anouncement-d8a4b6a4.js"),["assets/Anouncement-d8a4b6a4.js","assets/post-skeleton-c0397381.js","assets/naive-ui-62663ad7.js","assets/seemly-76b7b838.js","assets/@vue-e0e89260.js","assets/vueuc-59ca65c3.js","assets/evtd-b614532e.js","assets/@css-render-580d83ec.js","assets/vooks-a50491fd.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-db217db0.js","assets/vuex-473b3783.js","assets/vue-router-b8e3382f.js","assets/@vicons-0524c43e.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:()=>A(()=>import("./Profile-c0f83ebd.js"),["assets/Profile-c0f83ebd.js","assets/post-item.vue_vue_type_style_index_0_lang-724e3b2f.js","assets/content-ffcf943b.js","assets/@vue-e0e89260.js","assets/@vicons-0524c43e.js","assets/naive-ui-62663ad7.js","assets/seemly-76b7b838.js","assets/vueuc-59ca65c3.js","assets/evtd-b614532e.js","assets/@css-render-580d83ec.js","assets/vooks-a50491fd.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-aa5e8b3f.js","assets/content-2fda112b.css","assets/vuex-473b3783.js","assets/vue-router-b8e3382f.js","assets/formatTime-4210fcd1.js","assets/moment-2ab8298d.js","assets/copy-to-clipboard-1dd3075d.js","assets/toggle-selection-93f4ad84.js","assets/post-item-593ff254.css","assets/post-skeleton-c0397381.js","assets/post-skeleton-f1900002.css","assets/main-nav.vue_vue_type_style_index_0_lang-db217db0.js","assets/main-nav-569a7b0c.css","assets/axios-4a70c6fc.js","assets/Profile-2ea0d06d.css","assets/vfonts-7afd136d.css"])},{path:"/u",name:"user",meta:{title:"用户详情"},component:()=>A(()=>import("./User-8220250a.js"),["assets/User-8220250a.js","assets/post-item.vue_vue_type_style_index_0_lang-724e3b2f.js","assets/content-ffcf943b.js","assets/@vue-e0e89260.js","assets/@vicons-0524c43e.js","assets/naive-ui-62663ad7.js","assets/seemly-76b7b838.js","assets/vueuc-59ca65c3.js","assets/evtd-b614532e.js","assets/@css-render-580d83ec.js","assets/vooks-a50491fd.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-aa5e8b3f.js","assets/content-2fda112b.css","assets/vuex-473b3783.js","assets/vue-router-b8e3382f.js","assets/formatTime-4210fcd1.js","assets/moment-2ab8298d.js","assets/copy-to-clipboard-1dd3075d.js","assets/toggle-selection-93f4ad84.js","assets/post-item-593ff254.css","assets/post-skeleton-c0397381.js","assets/post-skeleton-f1900002.css","assets/main-nav.vue_vue_type_style_index_0_lang-db217db0.js","assets/main-nav-569a7b0c.css","assets/axios-4a70c6fc.js","assets/User-a7efd346.css","assets/vfonts-7afd136d.css"])},{path:"/messages",name:"messages",meta:{title:"消息"},component:()=>A(()=>import("./Messages-0ab7f8c3.js"),["assets/Messages-0ab7f8c3.js","assets/@vue-e0e89260.js","assets/vue-router-b8e3382f.js","assets/formatTime-4210fcd1.js","assets/moment-2ab8298d.js","assets/@vicons-0524c43e.js","assets/naive-ui-62663ad7.js","assets/seemly-76b7b838.js","assets/vueuc-59ca65c3.js","assets/evtd-b614532e.js","assets/@css-render-580d83ec.js","assets/vooks-a50491fd.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-db217db0.js","assets/vuex-473b3783.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:()=>A(()=>import("./Collection-0ddbbc4b.js"),["assets/Collection-0ddbbc4b.js","assets/post-item.vue_vue_type_style_index_0_lang-724e3b2f.js","assets/content-ffcf943b.js","assets/@vue-e0e89260.js","assets/@vicons-0524c43e.js","assets/naive-ui-62663ad7.js","assets/seemly-76b7b838.js","assets/vueuc-59ca65c3.js","assets/evtd-b614532e.js","assets/@css-render-580d83ec.js","assets/vooks-a50491fd.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-aa5e8b3f.js","assets/content-2fda112b.css","assets/vuex-473b3783.js","assets/vue-router-b8e3382f.js","assets/formatTime-4210fcd1.js","assets/moment-2ab8298d.js","assets/copy-to-clipboard-1dd3075d.js","assets/toggle-selection-93f4ad84.js","assets/post-item-593ff254.css","assets/post-skeleton-c0397381.js","assets/post-skeleton-f1900002.css","assets/main-nav.vue_vue_type_style_index_0_lang-db217db0.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:()=>A(()=>import("./Contacts-1f6995dc.js"),["assets/Contacts-1f6995dc.js","assets/vue-router-b8e3382f.js","assets/@vue-e0e89260.js","assets/naive-ui-62663ad7.js","assets/seemly-76b7b838.js","assets/vueuc-59ca65c3.js","assets/evtd-b614532e.js","assets/@css-render-580d83ec.js","assets/vooks-a50491fd.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-c0397381.js","assets/post-skeleton-f1900002.css","assets/main-nav.vue_vue_type_style_index_0_lang-db217db0.js","assets/vuex-473b3783.js","assets/@vicons-0524c43e.js","assets/main-nav-569a7b0c.css","assets/axios-4a70c6fc.js","assets/Contacts-890605de.css","assets/vfonts-7afd136d.css"])},{path:"/following",name:"following",meta:{title:"关注"},component:()=>A(()=>import("./Following-61c6e03a.js"),["assets/Following-61c6e03a.js","assets/vue-router-b8e3382f.js","assets/@vue-e0e89260.js","assets/naive-ui-62663ad7.js","assets/seemly-76b7b838.js","assets/vueuc-59ca65c3.js","assets/evtd-b614532e.js","assets/@css-render-580d83ec.js","assets/vooks-a50491fd.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-c0397381.js","assets/post-skeleton-f1900002.css","assets/main-nav.vue_vue_type_style_index_0_lang-db217db0.js","assets/vuex-473b3783.js","assets/@vicons-0524c43e.js","assets/main-nav-569a7b0c.css","assets/axios-4a70c6fc.js","assets/Following-6d2abd0f.css","assets/vfonts-7afd136d.css"])},{path:"/wallet",name:"wallet",meta:{title:"钱包"},component:()=>A(()=>import("./Wallet-fd7ec151.js"),["assets/Wallet-fd7ec151.js","assets/post-skeleton-c0397381.js","assets/naive-ui-62663ad7.js","assets/seemly-76b7b838.js","assets/@vue-e0e89260.js","assets/vueuc-59ca65c3.js","assets/evtd-b614532e.js","assets/@css-render-580d83ec.js","assets/vooks-a50491fd.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-db217db0.js","assets/vuex-473b3783.js","assets/vue-router-b8e3382f.js","assets/@vicons-0524c43e.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:()=>A(()=>import("./Setting-0ce0dfa1.js"),["assets/Setting-0ce0dfa1.js","assets/main-nav.vue_vue_type_style_index_0_lang-db217db0.js","assets/vuex-473b3783.js","assets/@vue-e0e89260.js","assets/vue-router-b8e3382f.js","assets/vooks-a50491fd.js","assets/evtd-b614532e.js","assets/@vicons-0524c43e.js","assets/naive-ui-62663ad7.js","assets/seemly-76b7b838.js","assets/vueuc-59ca65c3.js","assets/@css-render-580d83ec.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:()=>A(()=>import("./404-5924d4b9.js"),["assets/404-5924d4b9.js","assets/main-nav.vue_vue_type_style_index_0_lang-db217db0.js","assets/vuex-473b3783.js","assets/@vue-e0e89260.js","assets/vue-router-b8e3382f.js","assets/vooks-a50491fd.js","assets/evtd-b614532e.js","assets/@vicons-0524c43e.js","assets/naive-ui-62663ad7.js","assets/seemly-76b7b838.js","assets/vueuc-59ca65c3.js","assets/@css-render-580d83ec.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"}],pe=ve({history:we(),routes:Xe});pe.beforeEach((e,t,l)=>{document.title=`${e.meta.title} | 泡泡 - 一个清新文艺的微社区`,l()});const Ye=ke({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:{}}),G=be.create({baseURL:"",timeout:3e4});G.interceptors.request.use(e=>(localStorage.getItem("PAOPAO_TOKEN")&&(e.headers.Authorization="Bearer "+localStorage.getItem("PAOPAO_TOKEN")),e),e=>Promise.reject(e));G.interceptors.response.use(e=>{const{data:t={},code:l=0}=(e==null?void 0:e.data)||{};if(+l==0)return t||{};Promise.reject((e==null?void 0:e.data)||{})},(e={})=>{var l;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(((l=t==null?void 0:t.data)==null?void 0:l.msg)||"请求失败"),Promise.reject((t==null?void 0:t.data)||{})});function o(e){return G(e)}const ne=e=>o({method:"post",url:"/v1/auth/login",data:e}),Ze=e=>o({method:"post",url:"/v1/auth/register",data:e}),W=(e="")=>o({method:"get",url:"/v1/user/info",headers:{Authorization:`Bearer ${e}`}}),et={class:"auth-wrap"},tt={key:0},ot=z({__name:"auth",setup(e){const t=E("true".toLowerCase()==="true"),l=B(),c=E(!1),i=E(),n=J({username:"",password:""}),m=E(),d=J({username:"",password:"",repassword:""}),M={username:{required:!0,message:"请输入账户名"},password:{required:!0,message:"请输入密码"},repassword:[{required:!0,message:"请输入密码"},{validator:(_,u)=>!!d.password&&d.password.startsWith(u)&&d.password.length>=u.length,message:"两次密码输入不一致",trigger:"input"}]},g=_=>{var u;_.preventDefault(),_.stopPropagation(),(u=i.value)==null||u.validate(L=>{L||(c.value=!0,ne({username:n.username,password:n.password}).then(p=>{const O=(p==null?void 0:p.token)||"";return localStorage.setItem("PAOPAO_TOKEN",O),W(O)}).then(p=>{window.$message.success("登录成功"),c.value=!1,l.commit("updateUserinfo",p),l.commit("triggerAuth",!1),l.commit("refresh"),n.username="",n.password=""}).catch(p=>{c.value=!1}))})},b=_=>{var u;_.preventDefault(),_.stopPropagation(),(u=m.value)==null||u.validate(L=>{L||(c.value=!0,Ze({username:d.username,password:d.password}).then(p=>ne({username:d.username,password:d.password})).then(p=>{const O=(p==null?void 0:p.token)||"";return localStorage.setItem("PAOPAO_TOKEN",O),W(O)}).then(p=>{window.$message.success("注册成功"),c.value=!1,l.commit("updateUserinfo",p),l.commit("triggerAuth",!1),d.username="",d.password="",d.repassword=""}).catch(p=>{c.value=!1}))})};return j(()=>{const _=localStorage.getItem("PAOPAO_TOKEN")||"";_?W(_).then(u=>{l.commit("updateUserinfo",u),l.commit("triggerAuth",!1)}).catch(u=>{l.commit("userLogout")}):l.commit("userLogout")}),(_,u)=>{const L=Pe,p=Le,O=ue,r=ie,w=Oe,y=Ae,$=ce,x=Te,C=Ee,K=de,V=Re;return v(),N(V,{show:h(l).state.authModalShow,"onUpdate:show":u[7]||(u[7]=f=>h(l).state.authModalShow=f),class:"auth-card",preset:"card",size:"small","mask-closable":!1,bordered:!1,style:{width:"360px"}},{default:a(()=>[k("div",et,[s(K,{bordered:!1},{default:a(()=>[t.value?U("",!0):(v(),T("div",tt,[s(O,{justify:"center"},{default:a(()=>[s(p,null,{default:a(()=>[s(L,{type:"success"},{default:a(()=>[S("账号登录")]),_:1})]),_:1})]),_:1}),s(y,{ref_key:"loginRef",ref:i,model:n,rules:{username:{required:!0,message:"请输入账户名"},password:{required:!0,message:"请输入密码"}}},{default:a(()=>[s(w,{label:"账户",path:"username"},{default:a(()=>[s(r,{value:n.username,"onUpdate:value":u[0]||(u[0]=f=>n.username=f),placeholder:"请输入用户名",onKeyup:q(D(g,["prevent"]),["enter"])},null,8,["value","onKeyup"])]),_:1}),s(w,{label:"密码",path:"password"},{default:a(()=>[s(r,{type:"password","show-password-on":"mousedown",value:n.password,"onUpdate:value":u[1]||(u[1]=f=>n.password=f),placeholder:"请输入账户密码",onKeyup:q(D(g,["prevent"]),["enter"])},null,8,["value","onKeyup"])]),_:1})]),_:1},8,["model"]),s($,{type:"primary",block:"",secondary:"",strong:"",loading:c.value,onClick:g},{default:a(()=>[S(" 登录 ")]),_:1},8,["loading"])])),t.value?(v(),N(C,{key:1,"default-value":h(l).state.authModelTab,size:"large","justify-content":"space-evenly"},{default:a(()=>[s(x,{name:"signin",tab:"登录"},{default:a(()=>[s(y,{ref_key:"loginRef",ref:i,model:n,rules:{username:{required:!0,message:"请输入账户名"},password:{required:!0,message:"请输入密码"}}},{default:a(()=>[s(w,{label:"账户",path:"username"},{default:a(()=>[s(r,{value:n.username,"onUpdate:value":u[2]||(u[2]=f=>n.username=f),placeholder:"请输入用户名",onKeyup:q(D(g,["prevent"]),["enter"])},null,8,["value","onKeyup"])]),_:1}),s(w,{label:"密码",path:"password"},{default:a(()=>[s(r,{type:"password","show-password-on":"mousedown",value:n.password,"onUpdate:value":u[3]||(u[3]=f=>n.password=f),placeholder:"请输入账户密码",onKeyup:q(D(g,["prevent"]),["enter"])},null,8,["value","onKeyup"])]),_:1})]),_:1},8,["model"]),s($,{type:"primary",block:"",secondary:"",strong:"",loading:c.value,onClick:g},{default:a(()=>[S(" 登录 ")]),_:1},8,["loading"])]),_:1}),s(x,{name:"signup",tab:"注册"},{default:a(()=>[s(y,{ref_key:"registerRef",ref:m,model:d,rules:M},{default:a(()=>[s(w,{label:"用户名",path:"username"},{default:a(()=>[s(r,{value:d.username,"onUpdate:value":u[4]||(u[4]=f=>d.username=f),placeholder:"用户名注册后无法修改"},null,8,["value"])]),_:1}),s(w,{label:"密码",path:"password"},{default:a(()=>[s(r,{type:"password","show-password-on":"mousedown",placeholder:"密码不少于6位",value:d.password,"onUpdate:value":u[5]||(u[5]=f=>d.password=f),onKeyup:q(D(b,["prevent"]),["enter"])},null,8,["value","onKeyup"])]),_:1}),s(w,{label:"重复密码",path:"repassword"},{default:a(()=>[s(r,{type:"password","show-password-on":"mousedown",placeholder:"请再次输入密码",value:d.repassword,"onUpdate:value":u[6]||(u[6]=f=>d.repassword=f),onKeyup:q(D(b,["prevent"]),["enter"])},null,8,["value","onKeyup"])]),_:1})]),_:1},8,["model"]),s($,{type:"primary",block:"",secondary:"",strong:"",loading:c.value,onClick:b},{default:a(()=>[S(" 注册 ")]),_:1},8,["loading"])]),_:1})]),_:1},8,["default-value"])):U("",!0)]),_:1})])]),_:1},8,["show"])}}});const me=(e,t)=>{const l=e.__vccOpts||e;for(const[c,i]of t)l[c]=i;return l},st=me(ot,[["__scopeId","data-v-053dfa44"]]),Xt=e=>o({method:"get",url:"/v1/posts",params:e}),nt=e=>o({method:"get",url:"/v1/tags",params:e}),Yt=e=>o({method:"get",url:"/v1/post",params:e}),Zt=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}),io=e=>o({method:"post",url:"/v1/post/highlight",data:e}),co=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}),ko=e=>o({method:"post",url:"/v1/topic/follow",data:e}),bo=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"},it={class:"copyright"},ct=["href"],dt=["href"],pt=z({__name:"rightbar",setup(e){const t=E([]),l=E([]),c=E(!1),i=E(""),n=B(),m=le(),d="2023 paopao.info",M="Roc's Me",g="",b="泡泡(PaoPao)开源社区",_="https://www.paopao.info",u=+"6",L=+"12",p=()=>{c.value=!0,nt({type:"hot_extral",num:L,extral_num:u}).then(y=>{t.value=y.topics,l.value=y.extral_topics??[],w.value=!0,c.value=!1}).catch(y=>{c.value=!1})},O=y=>y>=1e3?(y/1e3).toFixed(1)+"k":y,r=()=>{m.push({name:"home",query:{q:i.value}})},w=Q({get:()=>n.state.userLogined&&l.value.length!==0,set:y=>{}});return H(()=>({refreshTopicFollow:n.state.refreshTopicFollow,userLogined:n.state.userLogined}),(y,$)=>{(y.refreshTopicFollow!==$.refreshTopicFollow||y.userLogined)&&p()}),j(()=>{p()}),(y,$)=>{const x=F,C=ie,K=ae("router-link"),V=$e,f=de,_e=ue;return h(n).state.collapsedRight?U("",!0):(v(),T("div",rt,[k("div",at,[s(C,{round:"",clearable:"",placeholder:"搜一搜...",value:i.value,"onUpdate:value":$[0]||($[0]=R=>i.value=R),onKeyup:q(D(r,["prevent"]),["enter"])},{prefix:a(()=>[s(x,{component:h(Fe)},null,8,["component"])]),_:1},8,["value","onKeyup"])]),w.value?(v(),N(f,{key:0,class:"hottopic-wrap",title:"关注话题",embedded:"",bordered:!1,size:"small"},{default:a(()=>[s(V,{show:c.value},{default:a(()=>[(v(!0),T(X,null,Y(l.value,R=>(v(),T("div",{class:"hot-tag-item",key:R.id},[s(K,{class:"hash-link",to:{name:"home",query:{q:R.tag,t:"tag"}}},{default:a(()=>[S(" #"+I(R.tag),1)]),_:2},1032,["to"]),k("div",lt,I(O(R.quote_num)),1)]))),128))]),_:1},8,["show"])]),_:1})):U("",!0),s(f,{class:"hottopic-wrap",title:"热门话题",embedded:"",bordered:!1,size:"small"},{default:a(()=>[s(V,{show:c.value},{default:a(()=>[(v(!0),T(X,null,Y(t.value,R=>(v(),T("div",{class:"hot-tag-item",key:R.id},[s(K,{class:"hash-link",to:{name:"home",query:{q:R.tag,t:"tag"}}},{default:a(()=>[S(" #"+I(R.tag),1)]),_:2},1032,["to"]),k("div",ut,I(O(R.quote_num)),1)]))),128))]),_:1},8,["show"])]),_:1}),s(f,{class:"copyright-wrap",embedded:"",bordered:!1,size:"small"},{default:a(()=>[k("div",it,"© "+I(h(d)),1),k("div",null,[s(_e,null,{default:a(()=>[k("a",{href:h(g),target:"_blank",class:"hash-link"},I(h(M)),9,ct),k("a",{href:h(_),target:"_blank",class:"hash-link"},I(h(b)),9,dt)]),_:1})])]),_:1})]))}}});const mt=me(pt,[["__scopeId","data-v-f4a84024"]]),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}),Ko=e=>o({method:"post",url:"/v1/user/password",data:e}),qo=e=>o({method:"post",url:"/v1/user/nickname",data:e}),Do=e=>o({method:"post",url:"/v1/user/avatar",data:e}),re=(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}),Bo=e=>o({method:"get",url:"/v1/user/wallet/bills",params:e}),Wo=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}),Qo=e=>o({method:"get",url:"/v1/suggest/tags",params:e}),Go=e=>o({method:"get",url:"/v1/attachment/precheck",params:e}),Jo=e=>o({method:"get",url:"/v1/attachment",params:e}),Xo=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"},kt={class:"username"},bt={class:"user-mini-wrap"},Pt={key:1,class:"user-wrap"},Lt={key:0,class:"login-only-wrap"},Ot={key:1,class:"login-wrap"},At=z({__name:"sidebar",setup(e){const t=B(),l=ye(),c=le(),i=E(!1),n=E(l.name||""),m=E(),d=E("true".toLowerCase()==="true"),M=+"5000";H(l,()=>{n.value=l.name}),H(t.state,()=>{t.state.userInfo.id>0?m.value||(re().then(r=>{i.value=r.count>0}).catch(r=>{console.log(r)}),m.value=setInterval(()=>{re().then(r=>{i.value=r.count>0}).catch(r=>{console.log(r)})},M)):m.value&&clearInterval(m.value)}),j(()=>{window.onresize=()=>{t.commit("triggerCollapsedLeft",document.body.clientWidth<=821),t.commit("triggerCollapsedRight",document.body.clientWidth<=821)}});const g=Q(()=>{const r=[{label:"广场",key:"home",icon:()=>P(ee),href:"/"},{label:"话题",key:"topic",icon:()=>P(te),href:"/topic"}];return"false".toLowerCase()==="true"&&r.push({label:"公告",key:"anouncement",icon:()=>P(Ve),href:"/anouncement"}),r.push({label:"主页",key:"profile",icon:()=>P(ze),href:"/profile"}),r.push({label:"消息",key:"messages",icon:()=>P(Be),href:"/messages"}),r.push({label:"收藏",key:"collection",icon:()=>P(We),href:"/collection"}),r.push({label:"好友",key:"contacts",icon:()=>P(He),href:"/contacts"}),"false".toLocaleLowerCase()==="true"&&r.push({label:"钱包",key:"wallet",icon:()=>P(je),href:"/wallet"}),r.push({label:"设置",key:"setting",icon:()=>P(Qe),href:"/setting"}),t.state.userInfo.id>0?r:[{label:"广场",key:"home",icon:()=>P(ee),href:"/"},{label:"话题",key:"topic",icon:()=>P(te),href:"/topic"}]}),b=r=>"href"in r?P("div",{},r.label):r.label,_=r=>r.key==="messages"?P(Ie,{dot:!0,show:i.value,processing:!0},{default:()=>P(F,{color:r.key===n.value?"var(--n-item-icon-color-active)":"var(--n-item-icon-color)"},{default:r.icon})}):P(F,null,{default:r.icon}),u=(r,w={})=>{n.value=r,c.push({name:r})},L=()=>{l.path==="/"&&t.commit("refresh"),u("home")},p=r=>{t.commit("triggerAuth",!0),t.commit("triggerAuthKey",r)},O=()=>{t.commit("userLogout"),t.commit("refresh"),L()};return window.$store=t,window.$message=Ce(),(r,w)=>{const y=Se,$=Ue,x=Me,C=ce;return v(),T("div",ht,[k("div",gt,[s(y,{class:"logo-img",width:"36",src:h(_t),"preview-disabled":!0,onClick:L},null,8,["src"])]),s($,{accordion:!0,"icon-size":24,options:g.value,"render-label":b,"render-icon":_,value:n.value,"onUpdate:value":u},null,8,["options","value"]),h(t).state.userInfo.id>0?(v(),T("div",ft,[s(x,{class:"user-avatar",round:"",size:34,src:h(t).state.userInfo.avatar},null,8,["src"]),k("div",vt,[k("div",wt,[k("span",yt,I(h(t).state.userInfo.nickname),1),s(C,{class:"logout",quaternary:"",circle:"",size:"tiny",onClick:O},{icon:a(()=>[s(h(F),null,{default:a(()=>[s(h(oe))]),_:1})]),_:1})]),k("div",kt,"@"+I(h(t).state.userInfo.username),1)]),k("div",bt,[s(C,{class:"logout",quaternary:"",circle:"",onClick:O},{icon:a(()=>[s(h(F),{size:24},{default:a(()=>[s(h(oe))]),_:1})]),_:1})])])):(v(),T("div",Pt,[d.value?U("",!0):(v(),T("div",Lt,[s(C,{strong:"",secondary:"",round:"",type:"primary",onClick:w[0]||(w[0]=K=>p("signin"))},{default:a(()=>[S(" 登录 ")]),_:1})])),d.value?(v(),T("div",Ot,[s(C,{strong:"",secondary:"",round:"",type:"primary",onClick:w[1]||(w[1]=K=>p("signin"))},{default:a(()=>[S(" 登录 ")]),_:1}),s(C,{strong:"",secondary:"",round:"",type:"info",onClick:w[2]||(w[2]=K=>p("signup"))},{default:a(()=>[S(" 注册 ")]),_:1})])):U("",!0)]))])}}});const Tt={"has-sider":"",class:"main-wrap",position:"static"},Et={key:0},Rt={class:"content-wrap"},$t=z({__name:"App",setup(e){const t=B(),l=Q(()=>t.state.theme==="dark"?qe:null);return(c,i)=>{const n=At,m=ae("router-view"),d=mt,M=st,g=De,b=Ne,_=xe,u=Ke;return v(),N(u,{theme:l.value},{default:a(()=>[s(b,null,{default:a(()=>[s(g,null,{default:a(()=>{var L;return[k("div",{class:ge(["app-container",{dark:((L=l.value)==null?void 0:L.name)==="dark",mobile:!h(t).state.desktopModelShow}])},[k("div",Tt,[h(t).state.desktopModelShow?(v(),T("div",Et,[s(n)])):U("",!0),k("div",Rt,[s(m,{class:"app-wrap"},{default:a(({Component:p})=>[(v(),N(he,null,[c.$route.meta.keepAlive?(v(),N(Z(p),{key:0})):U("",!0)],1024)),c.$route.meta.keepAlive?U("",!0):(v(),N(Z(p),{key:0}))]),_:1})]),s(d)]),s(M)],2)]}),_:1})]),_:1}),s(_)]),_:1},8,["theme"])}}});fe($t).use(pe).use(Ye).mount("#app");export{Uo as $,nt as A,zo as B,Oo as C,Ao as D,Vo as E,So as F,Ro as G,Eo as H,Xo as I,To as J,Io as K,xo as L,No as M,Fo as N,Go as O,Jo as P,no as Q,$o as R,Co as S,W as T,Bo as U,Wo as V,Ho as W,Po as X,Do as Y,Ko as Z,me as _,Qo as a,Mo as a0,qo as a1,Lo as a2,At as a3,Xt as b,ro as c,ho as d,wo as e,po as f,jo as g,mo as h,vo as i,fo as j,go as k,Zt as l,to as m,ao as n,lo as o,io as p,eo as q,oo as r,uo as s,_o as t,Yt as u,co as v,so as w,yo as x,bo as y,ko as z}; diff --git a/web/dist/assets/index-a0347e1a.js b/web/dist/assets/index-a0347e1a.js deleted file mode 100644 index 57212cb9..00000000 --- a/web/dist/assets/index-a0347e1a.js +++ /dev/null @@ -1 +0,0 @@ -import{d as z,r as R,E as J,j,o as v,Q as D,a1 as a,a as k,V as s,c as T,e as S,P as q,a2 as N,O as M,_ as h,n as Q,w as H,a3 as ae,F as X,a4 as Y,M as I,s as P,a5 as he,R as Z,L as ge,a6 as fe}from"./@vue-e0e89260.js";import{c as ve,a as we,u as le,b as ye}from"./vue-router-b8e3382f.js";import{c as ke,u as B}from"./vuex-473b3783.js";import{a as be}from"./axios-4a70c6fc.js";import{_ as Pe,N as Le,a as ue,b as ce,c as Oe,d as Ae,e as ie,f as Te,g as Re,h as de,i as Ee,j as F,k as Ce,u as $e,l as Ie,m as Se,n as Me,o as Ue,p as Ke,q as qe,r as Ne,s as De,t as xe}from"./naive-ui-62663ad7.js";import{S as Fe,M as Ve,L as ze,C as Be,B as We,P as He,W as je,a as Qe,H as ee,b as te,c as oe}from"./@vicons-8f91201d.js";/* empty css */import"./seemly-76b7b838.js";import"./vueuc-59ca65c3.js";import"./evtd-b614532e.js";import"./@css-render-580d83ec.js";import"./vooks-a50491fd.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 m of n.addedNodes)m.tagName==="LINK"&&m.rel==="modulepreload"&&i(m)}).observe(document,{childList:!0,subtree:!0});function l(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=l(c);fetch(c.href,n)}})();const Ge="modulepreload",Je=function(e){return"/"+e},se={},A=function(t,l,i){if(!l||l.length===0)return t();const c=document.getElementsByTagName("link");return Promise.all(l.map(n=>{if(n=Je(n),n in se)return;se[n]=!0;const m=n.endsWith(".css"),d=m?'[rel="stylesheet"]':"";if(!!i)for(let b=c.length-1;b>=0;b--){const _=c[b];if(_.href===n&&(!m||_.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${n}"]${d}`))return;const g=document.createElement("link");if(g.rel=m?"stylesheet":Ge,m||(g.as="script",g.crossOrigin=""),g.href=n,document.head.appendChild(g),m)return new Promise((b,_)=>{g.addEventListener("load",b),g.addEventListener("error",()=>_(new Error(`Unable to preload CSS for ${n}`)))})})).then(()=>t()).catch(n=>{const m=new Event("vite:preloadError",{cancelable:!0});if(m.payload=n,window.dispatchEvent(m),!m.defaultPrevented)throw n})},Xe=[{path:"/",name:"home",meta:{title:"广场",keepAlive:!0},component:()=>A(()=>import("./Home-52e33bab.js"),["assets/Home-52e33bab.js","assets/post-item.vue_vue_type_style_index_0_lang-6f0e8ce9.js","assets/content-5d77464b.js","assets/@vue-e0e89260.js","assets/@vicons-8f91201d.js","assets/naive-ui-62663ad7.js","assets/seemly-76b7b838.js","assets/vueuc-59ca65c3.js","assets/evtd-b614532e.js","assets/@css-render-580d83ec.js","assets/vooks-a50491fd.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-aa5e8b3f.js","assets/content-2fda112b.css","assets/vuex-473b3783.js","assets/vue-router-b8e3382f.js","assets/formatTime-cdf4e6f1.js","assets/moment-2ab8298d.js","assets/copy-to-clipboard-1dd3075d.js","assets/toggle-selection-93f4ad84.js","assets/post-item-593ff254.css","assets/post-skeleton-949f6995.js","assets/post-skeleton-f1900002.css","assets/lodash-94eb5868.js","assets/IEnum-a180d93e.js","assets/main-nav.vue_vue_type_style_index_0_lang-e28257cc.js","assets/main-nav-569a7b0c.css","assets/axios-4a70c6fc.js","assets/Home-c075a37e.css","assets/vfonts-7afd136d.css"])},{path:"/post",name:"post",meta:{title:"话题详情"},component:()=>A(()=>import("./Post-bbb54718.js"),["assets/Post-bbb54718.js","assets/@vue-e0e89260.js","assets/vuex-473b3783.js","assets/formatTime-cdf4e6f1.js","assets/moment-2ab8298d.js","assets/IEnum-a180d93e.js","assets/@vicons-8f91201d.js","assets/naive-ui-62663ad7.js","assets/seemly-76b7b838.js","assets/vueuc-59ca65c3.js","assets/evtd-b614532e.js","assets/@css-render-580d83ec.js","assets/vooks-a50491fd.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-5d77464b.js","assets/paopao-video-player-aa5e8b3f.js","assets/content-2fda112b.css","assets/vue-router-b8e3382f.js","assets/post-skeleton-949f6995.js","assets/post-skeleton-f1900002.css","assets/lodash-94eb5868.js","assets/copy-to-clipboard-1dd3075d.js","assets/toggle-selection-93f4ad84.js","assets/main-nav.vue_vue_type_style_index_0_lang-e28257cc.js","assets/main-nav-569a7b0c.css","assets/v3-infinite-loading-e5c2e8bf.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:()=>A(()=>import("./Topic-e99217d6.js"),["assets/Topic-e99217d6.js","assets/@vicons-8f91201d.js","assets/@vue-e0e89260.js","assets/naive-ui-62663ad7.js","assets/seemly-76b7b838.js","assets/vueuc-59ca65c3.js","assets/evtd-b614532e.js","assets/@css-render-580d83ec.js","assets/vooks-a50491fd.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-e28257cc.js","assets/vuex-473b3783.js","assets/vue-router-b8e3382f.js","assets/main-nav-569a7b0c.css","assets/axios-4a70c6fc.js","assets/Topic-8dbcebb5.css","assets/vfonts-7afd136d.css"])},{path:"/anouncement",name:"anouncement",meta:{title:"公告"},component:()=>A(()=>import("./Anouncement-f7d9f626.js"),["assets/Anouncement-f7d9f626.js","assets/post-skeleton-949f6995.js","assets/naive-ui-62663ad7.js","assets/seemly-76b7b838.js","assets/@vue-e0e89260.js","assets/vueuc-59ca65c3.js","assets/evtd-b614532e.js","assets/@css-render-580d83ec.js","assets/vooks-a50491fd.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-e28257cc.js","assets/vuex-473b3783.js","assets/vue-router-b8e3382f.js","assets/@vicons-8f91201d.js","assets/main-nav-569a7b0c.css","assets/formatTime-cdf4e6f1.js","assets/moment-2ab8298d.js","assets/axios-4a70c6fc.js","assets/Anouncement-662e2d95.css","assets/vfonts-7afd136d.css"])},{path:"/profile",name:"profile",meta:{title:"主页"},component:()=>A(()=>import("./Profile-95065114.js"),["assets/Profile-95065114.js","assets/post-item.vue_vue_type_style_index_0_lang-6f0e8ce9.js","assets/content-5d77464b.js","assets/@vue-e0e89260.js","assets/@vicons-8f91201d.js","assets/naive-ui-62663ad7.js","assets/seemly-76b7b838.js","assets/vueuc-59ca65c3.js","assets/evtd-b614532e.js","assets/@css-render-580d83ec.js","assets/vooks-a50491fd.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-aa5e8b3f.js","assets/content-2fda112b.css","assets/vuex-473b3783.js","assets/vue-router-b8e3382f.js","assets/formatTime-cdf4e6f1.js","assets/moment-2ab8298d.js","assets/copy-to-clipboard-1dd3075d.js","assets/toggle-selection-93f4ad84.js","assets/post-item-593ff254.css","assets/post-skeleton-949f6995.js","assets/post-skeleton-f1900002.css","assets/main-nav.vue_vue_type_style_index_0_lang-e28257cc.js","assets/main-nav-569a7b0c.css","assets/axios-4a70c6fc.js","assets/Profile-cc270bed.css","assets/vfonts-7afd136d.css"])},{path:"/u",name:"user",meta:{title:"用户详情"},component:()=>A(()=>import("./User-583f8554.js"),["assets/User-583f8554.js","assets/post-item.vue_vue_type_style_index_0_lang-6f0e8ce9.js","assets/content-5d77464b.js","assets/@vue-e0e89260.js","assets/@vicons-8f91201d.js","assets/naive-ui-62663ad7.js","assets/seemly-76b7b838.js","assets/vueuc-59ca65c3.js","assets/evtd-b614532e.js","assets/@css-render-580d83ec.js","assets/vooks-a50491fd.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-aa5e8b3f.js","assets/content-2fda112b.css","assets/vuex-473b3783.js","assets/vue-router-b8e3382f.js","assets/formatTime-cdf4e6f1.js","assets/moment-2ab8298d.js","assets/copy-to-clipboard-1dd3075d.js","assets/toggle-selection-93f4ad84.js","assets/post-item-593ff254.css","assets/post-skeleton-949f6995.js","assets/post-skeleton-f1900002.css","assets/main-nav.vue_vue_type_style_index_0_lang-e28257cc.js","assets/main-nav-569a7b0c.css","assets/axios-4a70c6fc.js","assets/User-fb70c280.css","assets/vfonts-7afd136d.css"])},{path:"/messages",name:"messages",meta:{title:"消息"},component:()=>A(()=>import("./Messages-943c32f0.js"),["assets/Messages-943c32f0.js","assets/@vue-e0e89260.js","assets/vue-router-b8e3382f.js","assets/formatTime-cdf4e6f1.js","assets/moment-2ab8298d.js","assets/@vicons-8f91201d.js","assets/naive-ui-62663ad7.js","assets/seemly-76b7b838.js","assets/vueuc-59ca65c3.js","assets/evtd-b614532e.js","assets/@css-render-580d83ec.js","assets/vooks-a50491fd.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-e28257cc.js","assets/vuex-473b3783.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:()=>A(()=>import("./Collection-17e15f34.js"),["assets/Collection-17e15f34.js","assets/post-item.vue_vue_type_style_index_0_lang-6f0e8ce9.js","assets/content-5d77464b.js","assets/@vue-e0e89260.js","assets/@vicons-8f91201d.js","assets/naive-ui-62663ad7.js","assets/seemly-76b7b838.js","assets/vueuc-59ca65c3.js","assets/evtd-b614532e.js","assets/@css-render-580d83ec.js","assets/vooks-a50491fd.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-aa5e8b3f.js","assets/content-2fda112b.css","assets/vuex-473b3783.js","assets/vue-router-b8e3382f.js","assets/formatTime-cdf4e6f1.js","assets/moment-2ab8298d.js","assets/copy-to-clipboard-1dd3075d.js","assets/toggle-selection-93f4ad84.js","assets/post-item-593ff254.css","assets/post-skeleton-949f6995.js","assets/post-skeleton-f1900002.css","assets/main-nav.vue_vue_type_style_index_0_lang-e28257cc.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:()=>A(()=>import("./Contacts-23e8ea1b.js"),["assets/Contacts-23e8ea1b.js","assets/vue-router-b8e3382f.js","assets/@vue-e0e89260.js","assets/naive-ui-62663ad7.js","assets/seemly-76b7b838.js","assets/vueuc-59ca65c3.js","assets/evtd-b614532e.js","assets/@css-render-580d83ec.js","assets/vooks-a50491fd.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-949f6995.js","assets/post-skeleton-f1900002.css","assets/main-nav.vue_vue_type_style_index_0_lang-e28257cc.js","assets/vuex-473b3783.js","assets/@vicons-8f91201d.js","assets/main-nav-569a7b0c.css","assets/axios-4a70c6fc.js","assets/Contacts-890605de.css","assets/vfonts-7afd136d.css"])},{path:"/wallet",name:"wallet",meta:{title:"钱包"},component:()=>A(()=>import("./Wallet-c8cff951.js"),["assets/Wallet-c8cff951.js","assets/post-skeleton-949f6995.js","assets/naive-ui-62663ad7.js","assets/seemly-76b7b838.js","assets/@vue-e0e89260.js","assets/vueuc-59ca65c3.js","assets/evtd-b614532e.js","assets/@css-render-580d83ec.js","assets/vooks-a50491fd.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-e28257cc.js","assets/vuex-473b3783.js","assets/vue-router-b8e3382f.js","assets/@vicons-8f91201d.js","assets/main-nav-569a7b0c.css","assets/qrcode-9719fc56.js","assets/encode-utf8-f813de00.js","assets/dijkstrajs-f906a09e.js","assets/formatTime-cdf4e6f1.js","assets/moment-2ab8298d.js","assets/axios-4a70c6fc.js","assets/Wallet-77044929.css","assets/vfonts-7afd136d.css"])},{path:"/setting",name:"setting",meta:{title:"设置"},component:()=>A(()=>import("./Setting-7301763b.js"),["assets/Setting-7301763b.js","assets/main-nav.vue_vue_type_style_index_0_lang-e28257cc.js","assets/vuex-473b3783.js","assets/@vue-e0e89260.js","assets/vue-router-b8e3382f.js","assets/vooks-a50491fd.js","assets/evtd-b614532e.js","assets/@vicons-8f91201d.js","assets/naive-ui-62663ad7.js","assets/seemly-76b7b838.js","assets/vueuc-59ca65c3.js","assets/@css-render-580d83ec.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:()=>A(()=>import("./404-fd003fab.js"),["assets/404-fd003fab.js","assets/main-nav.vue_vue_type_style_index_0_lang-e28257cc.js","assets/vuex-473b3783.js","assets/@vue-e0e89260.js","assets/vue-router-b8e3382f.js","assets/vooks-a50491fd.js","assets/evtd-b614532e.js","assets/@vicons-8f91201d.js","assets/naive-ui-62663ad7.js","assets/seemly-76b7b838.js","assets/vueuc-59ca65c3.js","assets/@css-render-580d83ec.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"}],pe=ve({history:we(),routes:Xe});pe.beforeEach((e,t,l)=>{document.title=`${e.meta.title} | 泡泡 - 一个清新文艺的微社区`,l()});const Ye=ke({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:""}},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:""},e.userLogined=!1}},actions:{},modules:{}}),G=be.create({baseURL:"",timeout:3e4});G.interceptors.request.use(e=>(localStorage.getItem("PAOPAO_TOKEN")&&(e.headers.Authorization="Bearer "+localStorage.getItem("PAOPAO_TOKEN")),e),e=>Promise.reject(e));G.interceptors.response.use(e=>{const{data:t={},code:l=0}=(e==null?void 0:e.data)||{};if(+l==0)return t||{};Promise.reject((e==null?void 0:e.data)||{})},(e={})=>{var l;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(((l=t==null?void 0:t.data)==null?void 0:l.msg)||"请求失败"),Promise.reject((t==null?void 0:t.data)||{})});function o(e){return G(e)}const ne=e=>o({method:"post",url:"/v1/auth/login",data:e}),Ze=e=>o({method:"post",url:"/v1/auth/register",data:e}),W=(e="")=>o({method:"get",url:"/v1/user/info",headers:{Authorization:`Bearer ${e}`}}),et={class:"auth-wrap"},tt={key:0},ot=z({__name:"auth",setup(e){const t=R("true".toLowerCase()==="true"),l=B(),i=R(!1),c=R(),n=J({username:"",password:""}),m=R(),d=J({username:"",password:"",repassword:""}),U={username:{required:!0,message:"请输入账户名"},password:{required:!0,message:"请输入密码"},repassword:[{required:!0,message:"请输入密码"},{validator:(_,u)=>!!d.password&&d.password.startsWith(u)&&d.password.length>=u.length,message:"两次密码输入不一致",trigger:"input"}]},g=_=>{var u;_.preventDefault(),_.stopPropagation(),(u=c.value)==null||u.validate(L=>{L||(i.value=!0,ne({username:n.username,password:n.password}).then(p=>{const O=(p==null?void 0:p.token)||"";return localStorage.setItem("PAOPAO_TOKEN",O),W(O)}).then(p=>{window.$message.success("登录成功"),i.value=!1,l.commit("updateUserinfo",p),l.commit("triggerAuth",!1),l.commit("refresh"),n.username="",n.password=""}).catch(p=>{i.value=!1}))})},b=_=>{var u;_.preventDefault(),_.stopPropagation(),(u=m.value)==null||u.validate(L=>{L||(i.value=!0,Ze({username:d.username,password:d.password}).then(p=>ne({username:d.username,password:d.password})).then(p=>{const O=(p==null?void 0:p.token)||"";return localStorage.setItem("PAOPAO_TOKEN",O),W(O)}).then(p=>{window.$message.success("注册成功"),i.value=!1,l.commit("updateUserinfo",p),l.commit("triggerAuth",!1),d.username="",d.password="",d.repassword=""}).catch(p=>{i.value=!1}))})};return j(()=>{const _=localStorage.getItem("PAOPAO_TOKEN")||"";_?W(_).then(u=>{l.commit("updateUserinfo",u),l.commit("triggerAuth",!1)}).catch(u=>{l.commit("userLogout")}):l.commit("userLogout")}),(_,u)=>{const L=Pe,p=Le,O=ue,r=ce,w=Oe,y=Ae,C=ie,x=Te,$=Re,K=de,V=Ee;return v(),D(V,{show:h(l).state.authModalShow,"onUpdate:show":u[7]||(u[7]=f=>h(l).state.authModalShow=f),class:"auth-card",preset:"card",size:"small","mask-closable":!1,bordered:!1,style:{width:"360px"}},{default:a(()=>[k("div",et,[s(K,{bordered:!1},{default:a(()=>[t.value?M("",!0):(v(),T("div",tt,[s(O,{justify:"center"},{default:a(()=>[s(p,null,{default:a(()=>[s(L,{type:"success"},{default:a(()=>[S("账号登录")]),_:1})]),_:1})]),_:1}),s(y,{ref_key:"loginRef",ref:c,model:n,rules:{username:{required:!0,message:"请输入账户名"},password:{required:!0,message:"请输入密码"}}},{default:a(()=>[s(w,{label:"账户",path:"username"},{default:a(()=>[s(r,{value:n.username,"onUpdate:value":u[0]||(u[0]=f=>n.username=f),placeholder:"请输入用户名",onKeyup:q(N(g,["prevent"]),["enter"])},null,8,["value","onKeyup"])]),_:1}),s(w,{label:"密码",path:"password"},{default:a(()=>[s(r,{type:"password","show-password-on":"mousedown",value:n.password,"onUpdate:value":u[1]||(u[1]=f=>n.password=f),placeholder:"请输入账户密码",onKeyup:q(N(g,["prevent"]),["enter"])},null,8,["value","onKeyup"])]),_:1})]),_:1},8,["model"]),s(C,{type:"primary",block:"",secondary:"",strong:"",loading:i.value,onClick:g},{default:a(()=>[S(" 登录 ")]),_:1},8,["loading"])])),t.value?(v(),D($,{key:1,"default-value":h(l).state.authModelTab,size:"large","justify-content":"space-evenly"},{default:a(()=>[s(x,{name:"signin",tab:"登录"},{default:a(()=>[s(y,{ref_key:"loginRef",ref:c,model:n,rules:{username:{required:!0,message:"请输入账户名"},password:{required:!0,message:"请输入密码"}}},{default:a(()=>[s(w,{label:"账户",path:"username"},{default:a(()=>[s(r,{value:n.username,"onUpdate:value":u[2]||(u[2]=f=>n.username=f),placeholder:"请输入用户名",onKeyup:q(N(g,["prevent"]),["enter"])},null,8,["value","onKeyup"])]),_:1}),s(w,{label:"密码",path:"password"},{default:a(()=>[s(r,{type:"password","show-password-on":"mousedown",value:n.password,"onUpdate:value":u[3]||(u[3]=f=>n.password=f),placeholder:"请输入账户密码",onKeyup:q(N(g,["prevent"]),["enter"])},null,8,["value","onKeyup"])]),_:1})]),_:1},8,["model"]),s(C,{type:"primary",block:"",secondary:"",strong:"",loading:i.value,onClick:g},{default:a(()=>[S(" 登录 ")]),_:1},8,["loading"])]),_:1}),s(x,{name:"signup",tab:"注册"},{default:a(()=>[s(y,{ref_key:"registerRef",ref:m,model:d,rules:U},{default:a(()=>[s(w,{label:"用户名",path:"username"},{default:a(()=>[s(r,{value:d.username,"onUpdate:value":u[4]||(u[4]=f=>d.username=f),placeholder:"用户名注册后无法修改"},null,8,["value"])]),_:1}),s(w,{label:"密码",path:"password"},{default:a(()=>[s(r,{type:"password","show-password-on":"mousedown",placeholder:"密码不少于6位",value:d.password,"onUpdate:value":u[5]||(u[5]=f=>d.password=f),onKeyup:q(N(b,["prevent"]),["enter"])},null,8,["value","onKeyup"])]),_:1}),s(w,{label:"重复密码",path:"repassword"},{default:a(()=>[s(r,{type:"password","show-password-on":"mousedown",placeholder:"请再次输入密码",value:d.repassword,"onUpdate:value":u[6]||(u[6]=f=>d.repassword=f),onKeyup:q(N(b,["prevent"]),["enter"])},null,8,["value","onKeyup"])]),_:1})]),_:1},8,["model"]),s(C,{type:"primary",block:"",secondary:"",strong:"",loading:i.value,onClick:b},{default:a(()=>[S(" 注册 ")]),_:1},8,["loading"])]),_:1})]),_:1},8,["default-value"])):M("",!0)]),_:1})])]),_:1},8,["show"])}}});const me=(e,t)=>{const l=e.__vccOpts||e;for(const[i,c]of t)l[i]=c;return l},st=me(ot,[["__scopeId","data-v-053dfa44"]]),Xt=e=>o({method:"get",url:"/v1/posts",params:e}),nt=e=>o({method:"get",url:"/v1/tags",params:e}),Yt=e=>o({method:"get",url:"/v1/post",params:e}),Zt=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}),ko=e=>o({method:"post",url:"/v1/topic/follow",data:e}),bo=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=z({__name:"rightbar",setup(e){const t=R([]),l=R([]),i=R(!1),c=R(""),n=B(),m=le(),d="2023 paopao.info",U="Roc's Me",g="",b="泡泡(PaoPao)开源社区",_="https://www.paopao.info",u=+"6",L=+"12",p=()=>{i.value=!0,nt({type:"hot_extral",num:L,extral_num:u}).then(y=>{t.value=y.topics,l.value=y.extral_topics??[],w.value=!0,i.value=!1}).catch(y=>{i.value=!1})},O=y=>y>=1e3?(y/1e3).toFixed(1)+"k":y,r=()=>{m.push({name:"home",query:{q:c.value}})},w=Q({get:()=>n.state.userLogined&&l.value.length!==0,set:y=>{}});return H(()=>({refreshTopicFollow:n.state.refreshTopicFollow,userLogined:n.state.userLogined}),(y,C)=>{(y.refreshTopicFollow!==C.refreshTopicFollow||y.userLogined)&&p()}),j(()=>{p()}),(y,C)=>{const x=F,$=ce,K=ae("router-link"),V=Ce,f=de,_e=ue;return h(n).state.collapsedRight?M("",!0):(v(),T("div",rt,[k("div",at,[s($,{round:"",clearable:"",placeholder:"搜一搜...",value:c.value,"onUpdate:value":C[0]||(C[0]=E=>c.value=E),onKeyup:q(N(r,["prevent"]),["enter"])},{prefix:a(()=>[s(x,{component:h(Fe)},null,8,["component"])]),_:1},8,["value","onKeyup"])]),w.value?(v(),D(f,{key:0,class:"hottopic-wrap",title:"关注话题",embedded:"",bordered:!1,size:"small"},{default:a(()=>[s(V,{show:i.value},{default:a(()=>[(v(!0),T(X,null,Y(l.value,E=>(v(),T("div",{class:"hot-tag-item",key:E.id},[s(K,{class:"hash-link",to:{name:"home",query:{q:E.tag,t:"tag"}}},{default:a(()=>[S(" #"+I(E.tag),1)]),_:2},1032,["to"]),k("div",lt,I(O(E.quote_num)),1)]))),128))]),_:1},8,["show"])]),_:1})):M("",!0),s(f,{class:"hottopic-wrap",title:"热门话题",embedded:"",bordered:!1,size:"small"},{default:a(()=>[s(V,{show:i.value},{default:a(()=>[(v(!0),T(X,null,Y(t.value,E=>(v(),T("div",{class:"hot-tag-item",key:E.id},[s(K,{class:"hash-link",to:{name:"home",query:{q:E.tag,t:"tag"}}},{default:a(()=>[S(" #"+I(E.tag),1)]),_:2},1032,["to"]),k("div",ut,I(O(E.quote_num)),1)]))),128))]),_:1},8,["show"])]),_:1}),s(f,{class:"copyright-wrap",embedded:"",bordered:!1,size:"small"},{default:a(()=>[k("div",ct,"© "+I(h(d)),1),k("div",null,[s(_e,null,{default:a(()=>[k("a",{href:h(g),target:"_blank",class:"hash-link"},I(h(U)),9,it),k("a",{href:h(_),target:"_blank",class:"hash-link"},I(h(b)),9,dt)]),_:1})])]),_:1})]))}}});const mt=me(pt,[["__scopeId","data-v-f4a84024"]]),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}),Ro=e=>o({method:"post",url:"/v1/friend/reject",data:e}),Eo=e=>o({method:"post",url:"/v1/friend/delete",data:e}),Co=e=>o({method:"post",url:"/v1/user/phone",data:e}),$o=e=>o({method:"post",url:"/v1/user/activate",data:e}),Io=e=>o({method:"post",url:"/v1/user/password",data:e}),So=e=>o({method:"post",url:"/v1/user/nickname",data:e}),Mo=e=>o({method:"post",url:"/v1/user/avatar",data:e}),re=(e={})=>o({method:"get",url:"/v1/user/msgcount/unread",params:e}),Uo=e=>o({method:"get",url:"/v1/user/messages",params:e}),Ko=e=>o({method:"post",url:"/v1/user/message/read",data:e}),qo=e=>o({method:"get",url:"/v1/user/collections",params:e}),No=e=>o({method:"get",url:"/v1/user/profile",params:e}),Do=e=>o({method:"get",url:"/v1/user/posts",params:e}),xo=e=>o({method:"get",url:"/v1/user/wallet/bills",params:e}),Fo=e=>o({method:"post",url:"/v1/user/recharge",data:e}),Vo=e=>o({method:"get",url:"/v1/user/recharge",params:e}),zo=e=>o({method:"get",url:"/v1/suggest/users",params:e}),Bo=e=>o({method:"get",url:"/v1/suggest/tags",params:e}),Wo=e=>o({method:"get",url:"/v1/attachment/precheck",params:e}),Ho=e=>o({method:"get",url:"/v1/attachment",params:e}),jo=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"},kt={class:"username"},bt={class:"user-mini-wrap"},Pt={key:1,class:"user-wrap"},Lt={key:0,class:"login-only-wrap"},Ot={key:1,class:"login-wrap"},At=z({__name:"sidebar",setup(e){const t=B(),l=ye(),i=le(),c=R(!1),n=R(l.name||""),m=R(),d=R("true".toLowerCase()==="true"),U=+"5000";H(l,()=>{n.value=l.name}),H(t.state,()=>{t.state.userInfo.id>0?m.value||(re().then(r=>{c.value=r.count>0}).catch(r=>{console.log(r)}),m.value=setInterval(()=>{re().then(r=>{c.value=r.count>0}).catch(r=>{console.log(r)})},U)):m.value&&clearInterval(m.value)}),j(()=>{window.onresize=()=>{t.commit("triggerCollapsedLeft",document.body.clientWidth<=821),t.commit("triggerCollapsedRight",document.body.clientWidth<=821)}});const g=Q(()=>{const r=[{label:"广场",key:"home",icon:()=>P(ee),href:"/"},{label:"话题",key:"topic",icon:()=>P(te),href:"/topic"}];return"false".toLowerCase()==="true"&&r.push({label:"公告",key:"anouncement",icon:()=>P(Ve),href:"/anouncement"}),r.push({label:"主页",key:"profile",icon:()=>P(ze),href:"/profile"}),r.push({label:"消息",key:"messages",icon:()=>P(Be),href:"/messages"}),r.push({label:"收藏",key:"collection",icon:()=>P(We),href:"/collection"}),r.push({label:"好友",key:"contacts",icon:()=>P(He),href:"/contacts"}),"false".toLocaleLowerCase()==="true"&&r.push({label:"钱包",key:"wallet",icon:()=>P(je),href:"/wallet"}),r.push({label:"设置",key:"setting",icon:()=>P(Qe),href:"/setting"}),t.state.userInfo.id>0?r:[{label:"广场",key:"home",icon:()=>P(ee),href:"/"},{label:"话题",key:"topic",icon:()=>P(te),href:"/topic"}]}),b=r=>"href"in r?P("div",{},r.label):r.label,_=r=>r.key==="messages"?P(Ie,{dot:!0,show:c.value,processing:!0},{default:()=>P(F,{color:r.key===n.value?"var(--n-item-icon-color-active)":"var(--n-item-icon-color)"},{default:r.icon})}):P(F,null,{default:r.icon}),u=(r,w={})=>{n.value=r,i.push({name:r})},L=()=>{l.path==="/"&&t.commit("refresh"),u("home")},p=r=>{t.commit("triggerAuth",!0),t.commit("triggerAuthKey",r)},O=()=>{t.commit("userLogout"),t.commit("refresh"),L()};return window.$store=t,window.$message=$e(),(r,w)=>{const y=Se,C=Me,x=Ue,$=ie;return v(),T("div",ht,[k("div",gt,[s(y,{class:"logo-img",width:"36",src:h(_t),"preview-disabled":!0,onClick:L},null,8,["src"])]),s(C,{accordion:!0,"icon-size":24,options:g.value,"render-label":b,"render-icon":_,value:n.value,"onUpdate:value":u},null,8,["options","value"]),h(t).state.userInfo.id>0?(v(),T("div",ft,[s(x,{class:"user-avatar",round:"",size:34,src:h(t).state.userInfo.avatar},null,8,["src"]),k("div",vt,[k("div",wt,[k("span",yt,I(h(t).state.userInfo.nickname),1),s($,{class:"logout",quaternary:"",circle:"",size:"tiny",onClick:O},{icon:a(()=>[s(h(F),null,{default:a(()=>[s(h(oe))]),_:1})]),_:1})]),k("div",kt,"@"+I(h(t).state.userInfo.username),1)]),k("div",bt,[s($,{class:"logout",quaternary:"",circle:"",onClick:O},{icon:a(()=>[s(h(F),{size:24},{default:a(()=>[s(h(oe))]),_:1})]),_:1})])])):(v(),T("div",Pt,[d.value?M("",!0):(v(),T("div",Lt,[s($,{strong:"",secondary:"",round:"",type:"primary",onClick:w[0]||(w[0]=K=>p("signin"))},{default:a(()=>[S(" 登录 ")]),_:1})])),d.value?(v(),T("div",Ot,[s($,{strong:"",secondary:"",round:"",type:"primary",onClick:w[1]||(w[1]=K=>p("signin"))},{default:a(()=>[S(" 登录 ")]),_:1}),s($,{strong:"",secondary:"",round:"",type:"info",onClick:w[2]||(w[2]=K=>p("signup"))},{default:a(()=>[S(" 注册 ")]),_:1})])):M("",!0)]))])}}});const Tt={"has-sider":"",class:"main-wrap",position:"static"},Rt={key:0},Et={class:"content-wrap"},Ct=z({__name:"App",setup(e){const t=B(),l=Q(()=>t.state.theme==="dark"?qe:null);return(i,c)=>{const n=At,m=ae("router-view"),d=mt,U=st,g=Ne,b=De,_=xe,u=Ke;return v(),D(u,{theme:l.value},{default:a(()=>[s(b,null,{default:a(()=>[s(g,null,{default:a(()=>{var L;return[k("div",{class:ge(["app-container",{dark:((L=l.value)==null?void 0:L.name)==="dark",mobile:!h(t).state.desktopModelShow}])},[k("div",Tt,[h(t).state.desktopModelShow?(v(),T("div",Rt,[s(n)])):M("",!0),k("div",Et,[s(m,{class:"app-wrap"},{default:a(({Component:p})=>[(v(),D(he,null,[i.$route.meta.keepAlive?(v(),D(Z(p),{key:0})):M("",!0)],1024)),i.$route.meta.keepAlive?M("",!0):(v(),D(Z(p),{key:0}))]),_:1})]),s(d)]),s(U)],2)]}),_:1})]),_:1}),s(_)]),_:1},8,["theme"])}}});fe(Ct).use(pe).use(Ye).mount("#app");export{At as $,nt as A,Do as B,Oo as C,Ao as D,No as E,Eo as F,jo as G,To as H,Ro as I,Ko as J,Uo as K,qo as L,Wo as M,Ho as N,no as O,W as P,xo as Q,Fo as R,Vo as S,Po as T,Mo as U,Io as V,Co as W,$o as X,So as Y,Lo as Z,me as _,Bo as a,Xt as b,ro as c,ho as d,wo as e,po as f,zo as g,mo as h,vo as i,fo as j,go as k,Zt as l,to as m,ao as n,lo as o,co as p,eo as q,oo as r,uo as s,_o as t,Yt as u,io as v,so as w,yo as x,bo as y,ko as z}; diff --git a/web/dist/assets/main-nav.vue_vue_type_style_index_0_lang-db217db0.js b/web/dist/assets/main-nav.vue_vue_type_style_index_0_lang-db217db0.js new file mode 100644 index 00000000..4aa17f13 --- /dev/null +++ b/web/dist/assets/main-nav.vue_vue_type_style_index_0_lang-db217db0.js @@ -0,0 +1 @@ +import{a3 as E}from"./index-479e9ef6.js";import{u as S}from"./vuex-473b3783.js";import{u as z}from"./vue-router-b8e3382f.js";import{j as A}from"./vooks-a50491fd.js";import{Y as C,Z as N,_ as P,$ as D}from"./@vicons-0524c43e.js";import{a3 as R,a4 as V,j as I,e as j,a5 as x,h as H}from"./naive-ui-62663ad7.js";import{d as $,r as h,j as q,o as a,c as f,_ as o,V as e,a1 as t,O as c,a as F,Q as _,e as L,M as U,F as Q}from"./@vue-e0e89260.js";const Y={key:0},Z={class:"navbar"},oe=$({__name:"main-nav",props:{title:{default:""},back:{type:Boolean,default:!1},theme:{type:Boolean,default:!0}},setup(g){const i=g,n=S(),m=z(),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 q(()=>{localStorage.getItem("PAOPAO_THEME")||u(A()==="dark")}),(s,d)=>{const y=E,b=R,O=V,r=I,p=j,M=x,T=H;return a(),f(Q,null,[o(n).state.drawerModelShow?(a(),f("div",Y,[e(O,{show:l.value,"onUpdate:show":d[0]||(d[0]=B=>l.value=B),width:212,placement:k.value,resizable:""},{default:t(()=>[e(b,null,{default:t(()=>[e(y)]),_:1})]),_:1},8,["show","placement"])])):c("",!0),e(T,{size:"small",bordered:!0,class:"nav-title-card"},{header:t(()=>[F("div",Z,[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-e28257cc.js b/web/dist/assets/main-nav.vue_vue_type_style_index_0_lang-e28257cc.js deleted file mode 100644 index 0eff8799..00000000 --- a/web/dist/assets/main-nav.vue_vue_type_style_index_0_lang-e28257cc.js +++ /dev/null @@ -1 +0,0 @@ -import{$ as E}from"./index-a0347e1a.js";import{u as S}from"./vuex-473b3783.js";import{u as z}from"./vue-router-b8e3382f.js";import{j as A}from"./vooks-a50491fd.js";import{U as C,X as N,Y as P,Z as D}from"./@vicons-8f91201d.js";import{a3 as R,a4 as V,j as I,e as j,a5 as x,h as H}from"./naive-ui-62663ad7.js";import{d as U,r as h,j as $,o as a,c as f,_ as o,V as e,a1 as t,O as c,a as q,Q as _,e as F,M as L,F as Q}from"./@vue-e0e89260.js";const X={key:0},Y={class:"navbar"},oe=U({__name:"main-nav",props:{title:{default:""},back:{type:Boolean,default:!1},theme:{type:Boolean,default:!0}},setup(g){const i=g,n=S(),m=z(),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(A()==="dark")}),(s,d)=>{const y=E,b=R,O=V,r=I,p=j,M=x,T=H;return a(),f(Q,null,[o(n).state.drawerModelShow?(a(),f("div",X,[e(O,{show:l.value,"onUpdate:show":d[0]||(d[0]=B=>l.value=B),width:212,placement:k.value,resizable:""},{default:t(()=>[e(b,null,{default:t(()=>[e(y)]),_:1})]),_:1},8,["show","placement"])])):c("",!0),e(T,{size:"small",bordered:!0,class:"nav-title-card"},{header:t(()=>[q("div",Y,[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),F(" "+L(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-6f0e8ce9.js b/web/dist/assets/post-item.vue_vue_type_style_index_0_lang-724e3b2f.js similarity index 97% rename from web/dist/assets/post-item.vue_vue_type_style_index_0_lang-6f0e8ce9.js rename to web/dist/assets/post-item.vue_vue_type_style_index_0_lang-724e3b2f.js index 50149d0c..fc6995d1 100644 --- a/web/dist/assets/post-item.vue_vue_type_style_index_0_lang-6f0e8ce9.js +++ b/web/dist/assets/post-item.vue_vue_type_style_index_0_lang-724e3b2f.js @@ -1 +1 @@ -import{p as B,a as N,_ as V,b as D,c as I}from"./content-5d77464b.js";import{d as F,n as P,a3 as A,o as i,c as k,V as o,a7 as E,a1 as s,a as u,F as Q,a4 as R,a2 as f,_ as p,e as _,M as m,Q as r,O as c,s as S}from"./@vue-e0e89260.js";import{u as G}from"./vuex-473b3783.js";import{u as J}from"./vue-router-b8e3382f.js";import{b as K}from"./formatTime-cdf4e6f1.js";import{a as oe}from"./copy-to-clipboard-1dd3075d.js";import{i as ie,j as U,l as W,m as X,o as le}from"./@vicons-8f91201d.js";import{j as y,o as Y,O as Z,e as ue,P as re,a as ee,M as te}from"./naive-ui-62663ad7.js";const ce={class:"post-item"},pe={class:"nickname-wrap"},_e={class:"username-wrap"},me={class:"timestamp-mobile"},de={class:"item-header-extra"},ve=["innerHTML"],he={class:"opt-item"},ge={class:"opt-item"},He=F({__name:"mobile-post-item",props:{post:{}},setup(C){const q=C,h=J(),T=G(),t=l=>()=>S(y,null,{default:()=>S(l)}),x=P(()=>[{label:"复制链接",key:"copyTweetLink",icon:t(le)}]),O=async l=>{switch(l){case"copyTweetLink":oe(`${window.location.origin}/#/post?id=${e.value.id}`),window.$message.success("链接已复制到剪贴板");break}},e=P(()=>{let l=Object.assign({texts:[],imgs:[],videos:[],links:[],attachments:[],charge_attachments:[]},q.post);return l.contents.map(n=>{(+n.type==1||+n.type==2)&&l.texts.push(n),+n.type==3&&l.imgs.push(n),+n.type==4&&l.videos.push(n),+n.type==6&&l.links.push(n),+n.type==7&&l.attachments.push(n),+n.type==8&&l.charge_attachments.push(n)}),l}),a=l=>{h.push({name:"post",query:{id:l}})},v=(l,n)=>{if(l.target.dataset.detail){const d=l.target.dataset.detail.split(":");if(d.length===2){T.commit("refresh"),d[0]==="tag"?h.push({name:"home",query:{q:d[1],t:"tag"}}):h.push({name:"user",query:{s:d[1]}});return}}a(n)};return(l,n)=>{const d=Y,M=A("router-link"),w=Z,L=ue,$=re,b=N,j=V,g=D,H=I,se=ee,ae=te;return i(),k("div",ce,[o(ae,{"content-indented":""},E({avatar:s(()=>[o(d,{round:"",size:30,src:e.value.user.avatar},null,8,["src"])]),header:s(()=>[u("span",pe,[o(M,{onClick:n[0]||(n[0]=f(()=>{},["stop"])),class:"username-link",to:{name:"user",query:{s:e.value.user.username}}},{default:s(()=>[_(m(e.value.user.nickname),1)]),_:1},8,["to"])]),u("span",_e," @"+m(e.value.user.username),1),e.value.is_top?(i(),r(w,{key:0,class:"top-tag",type:"warning",size:"small",round:""},{default:s(()=>[_(" 置顶 ")]),_:1})):c("",!0),e.value.visibility==1?(i(),r(w,{key:1,class:"top-tag",type:"error",size:"small",round:""},{default:s(()=>[_(" 私密 ")]),_:1})):c("",!0),e.value.visibility==2?(i(),r(w,{key:2,class:"top-tag",type:"info",size:"small",round:""},{default:s(()=>[_(" 好友可见 ")]),_:1})):c("",!0),u("div",null,[u("span",me,m(p(K)(e.value.created_on))+" "+m(e.value.ip_loc),1)])]),"header-extra":s(()=>[u("div",de,[o($,{placement:"bottom-end",trigger:"click",size:"small",options:x.value,onSelect:O},{default:s(()=>[o(L,{quaternary:"",circle:""},{icon:s(()=>[o(p(y),null,{default:s(()=>[o(p(ie))]),_:1})]),_:1})]),_:1},8,["options"])])]),footer:s(()=>[e.value.attachments.length>0?(i(),r(b,{key:0,attachments:e.value.attachments},null,8,["attachments"])):c("",!0),e.value.charge_attachments.length>0?(i(),r(b,{key:1,attachments:e.value.charge_attachments,price:e.value.attachment_price},null,8,["attachments","price"])):c("",!0),e.value.imgs.length>0?(i(),r(j,{key:2,imgs:e.value.imgs},null,8,["imgs"])):c("",!0),e.value.videos.length>0?(i(),r(g,{key:3,videos:e.value.videos},null,8,["videos"])):c("",!0),e.value.links.length>0?(i(),r(H,{key:4,links:e.value.links},null,8,["links"])):c("",!0)]),action:s(()=>[o(se,{justify:"space-between"},{default:s(()=>[u("div",he,[o(p(y),{size:"18",class:"opt-item-icon"},{default:s(()=>[o(p(U))]),_:1}),_(" "+m(e.value.upvote_count),1)]),u("div",{class:"opt-item",onClick:n[3]||(n[3]=f(z=>a(e.value.id),["stop"]))},[o(p(y),{size:"18",class:"opt-item-icon"},{default:s(()=>[o(p(W))]),_:1}),_(" "+m(e.value.comment_count),1)]),u("div",ge,[o(p(y),{size:"18",class:"opt-item-icon"},{default:s(()=>[o(p(X))]),_:1}),_(" "+m(e.value.collection_count),1)])]),_:1})]),_:2},[e.value.texts.length>0?{name:"description",fn:s(()=>[u("div",{onClick:n[2]||(n[2]=z=>a(e.value.id))},[(i(!0),k(Q,null,R(e.value.texts,z=>(i(),k("span",{key:z.id,class:"post-text",onClick:n[1]||(n[1]=f(ne=>v(ne,e.value.id),["stop"])),innerHTML:p(B)(z.content).content},null,8,ve))),128))])]),key:"0"}:void 0]),1024)])}}});const ye={class:"nickname-wrap"},ke={class:"username-wrap"},fe={class:"item-header-extra"},xe={class:"timestamp"},we=["innerHTML"],$e={class:"opt-item"},be={class:"opt-item"},Pe=F({__name:"post-item",props:{post:{}},setup(C){const q=C,h=J(),T=G(),t=P(()=>{let e=Object.assign({texts:[],imgs:[],videos:[],links:[],attachments:[],charge_attachments:[]},q.post);return e.contents.map(a=>{(+a.type==1||+a.type==2)&&e.texts.push(a),+a.type==3&&e.imgs.push(a),+a.type==4&&e.videos.push(a),+a.type==6&&e.links.push(a),+a.type==7&&e.attachments.push(a),+a.type==8&&e.charge_attachments.push(a)}),e}),x=e=>{h.push({name:"post",query:{id:e}})},O=(e,a)=>{if(e.target.dataset.detail){const v=e.target.dataset.detail.split(":");if(v.length===2){T.commit("refresh"),v[0]==="tag"?h.push({name:"home",query:{q:v[1],t:"tag"}}):h.push({name:"user",query:{s:v[1]}});return}}x(a)};return(e,a)=>{const v=Y,l=A("router-link"),n=Z,d=N,M=V,w=D,L=I,$=y,b=ee,j=te;return i(),k("div",{class:"post-item",onClick:a[3]||(a[3]=g=>x(t.value.id))},[o(j,{"content-indented":""},E({avatar:s(()=>[o(v,{round:"",size:30,src:t.value.user.avatar},null,8,["src"])]),header:s(()=>[u("span",ye,[o(l,{onClick:a[0]||(a[0]=f(()=>{},["stop"])),class:"username-link",to:{name:"user",query:{s:t.value.user.username}}},{default:s(()=>[_(m(t.value.user.nickname),1)]),_:1},8,["to"])]),u("span",ke," @"+m(t.value.user.username),1),t.value.is_top?(i(),r(n,{key:0,class:"top-tag",type:"warning",size:"small",round:""},{default:s(()=>[_(" 置顶 ")]),_:1})):c("",!0),t.value.visibility==1?(i(),r(n,{key:1,class:"top-tag",type:"error",size:"small",round:""},{default:s(()=>[_(" 私密 ")]),_:1})):c("",!0),t.value.visibility==2?(i(),r(n,{key:2,class:"top-tag",type:"info",size:"small",round:""},{default:s(()=>[_(" 好友可见 ")]),_:1})):c("",!0)]),"header-extra":s(()=>[u("div",fe,[u("span",xe,m(t.value.ip_loc?t.value.ip_loc+" · ":t.value.ip_loc)+" "+m(p(K)(t.value.created_on)),1)])]),footer:s(()=>[t.value.attachments.length>0?(i(),r(d,{key:0,attachments:t.value.attachments},null,8,["attachments"])):c("",!0),t.value.charge_attachments.length>0?(i(),r(d,{key:1,attachments:t.value.charge_attachments,price:t.value.attachment_price},null,8,["attachments","price"])):c("",!0),t.value.imgs.length>0?(i(),r(M,{key:2,imgs:t.value.imgs},null,8,["imgs"])):c("",!0),t.value.videos.length>0?(i(),r(w,{key:3,videos:t.value.videos},null,8,["videos"])):c("",!0),t.value.links.length>0?(i(),r(L,{key:4,links:t.value.links},null,8,["links"])):c("",!0)]),action:s(()=>[o(b,{justify:"space-between"},{default:s(()=>[u("div",$e,[o($,{size:"18",class:"opt-item-icon"},{default:s(()=>[o(p(U))]),_:1}),_(" "+m(t.value.upvote_count),1)]),u("div",{class:"opt-item",onClick:a[2]||(a[2]=f(g=>x(t.value.id),["stop"]))},[o($,{size:"18",class:"opt-item-icon"},{default:s(()=>[o(p(W))]),_:1}),_(" "+m(t.value.comment_count),1)]),u("div",be,[o($,{size:"18",class:"opt-item-icon"},{default:s(()=>[o(p(X))]),_:1}),_(" "+m(t.value.collection_count),1)])]),_:1})]),_:2},[t.value.texts.length>0?{name:"description",fn:s(()=>[(i(!0),k(Q,null,R(t.value.texts,g=>(i(),k("span",{key:g.id,class:"post-text",onClick:a[1]||(a[1]=f(H=>O(H,t.value.id),["stop"])),innerHTML:p(B)(g.content).content},null,8,we))),128))]),key:"0"}:void 0]),1024)])}}});export{Pe as _,He as a}; +import{p as B,a as N,_ as V,b as D,c as I}from"./content-ffcf943b.js";import{d as F,n as P,a3 as A,o as i,c as k,V as o,a7 as E,a1 as s,a as u,F as Q,a4 as R,a2 as f,_ as p,e as _,M as m,Q as r,O as c,s as S}from"./@vue-e0e89260.js";import{u as G}from"./vuex-473b3783.js";import{u as J}from"./vue-router-b8e3382f.js";import{c as K}from"./formatTime-4210fcd1.js";import{a as oe}from"./copy-to-clipboard-1dd3075d.js";import{i as ie,j as U,l as W,m as X,o as le}from"./@vicons-0524c43e.js";import{j as y,o as Y,O as Z,e as ue,P as re,a as ee,M as te}from"./naive-ui-62663ad7.js";const ce={class:"post-item"},pe={class:"nickname-wrap"},_e={class:"username-wrap"},me={class:"timestamp-mobile"},de={class:"item-header-extra"},ve=["innerHTML"],he={class:"opt-item"},ge={class:"opt-item"},He=F({__name:"mobile-post-item",props:{post:{}},setup(C){const q=C,h=J(),T=G(),t=l=>()=>S(y,null,{default:()=>S(l)}),x=P(()=>[{label:"复制链接",key:"copyTweetLink",icon:t(le)}]),O=async l=>{switch(l){case"copyTweetLink":oe(`${window.location.origin}/#/post?id=${e.value.id}`),window.$message.success("链接已复制到剪贴板");break}},e=P(()=>{let l=Object.assign({texts:[],imgs:[],videos:[],links:[],attachments:[],charge_attachments:[]},q.post);return l.contents.map(n=>{(+n.type==1||+n.type==2)&&l.texts.push(n),+n.type==3&&l.imgs.push(n),+n.type==4&&l.videos.push(n),+n.type==6&&l.links.push(n),+n.type==7&&l.attachments.push(n),+n.type==8&&l.charge_attachments.push(n)}),l}),a=l=>{h.push({name:"post",query:{id:l}})},v=(l,n)=>{if(l.target.dataset.detail){const d=l.target.dataset.detail.split(":");if(d.length===2){T.commit("refresh"),d[0]==="tag"?h.push({name:"home",query:{q:d[1],t:"tag"}}):h.push({name:"user",query:{s:d[1]}});return}}a(n)};return(l,n)=>{const d=Y,M=A("router-link"),w=Z,L=ue,$=re,b=N,j=V,g=D,H=I,se=ee,ae=te;return i(),k("div",ce,[o(ae,{"content-indented":""},E({avatar:s(()=>[o(d,{round:"",size:30,src:e.value.user.avatar},null,8,["src"])]),header:s(()=>[u("span",pe,[o(M,{onClick:n[0]||(n[0]=f(()=>{},["stop"])),class:"username-link",to:{name:"user",query:{s:e.value.user.username}}},{default:s(()=>[_(m(e.value.user.nickname),1)]),_:1},8,["to"])]),u("span",_e," @"+m(e.value.user.username),1),e.value.is_top?(i(),r(w,{key:0,class:"top-tag",type:"warning",size:"small",round:""},{default:s(()=>[_(" 置顶 ")]),_:1})):c("",!0),e.value.visibility==1?(i(),r(w,{key:1,class:"top-tag",type:"error",size:"small",round:""},{default:s(()=>[_(" 私密 ")]),_:1})):c("",!0),e.value.visibility==2?(i(),r(w,{key:2,class:"top-tag",type:"info",size:"small",round:""},{default:s(()=>[_(" 好友可见 ")]),_:1})):c("",!0),u("div",null,[u("span",me,m(p(K)(e.value.created_on))+" "+m(e.value.ip_loc),1)])]),"header-extra":s(()=>[u("div",de,[o($,{placement:"bottom-end",trigger:"click",size:"small",options:x.value,onSelect:O},{default:s(()=>[o(L,{quaternary:"",circle:""},{icon:s(()=>[o(p(y),null,{default:s(()=>[o(p(ie))]),_:1})]),_:1})]),_:1},8,["options"])])]),footer:s(()=>[e.value.attachments.length>0?(i(),r(b,{key:0,attachments:e.value.attachments},null,8,["attachments"])):c("",!0),e.value.charge_attachments.length>0?(i(),r(b,{key:1,attachments:e.value.charge_attachments,price:e.value.attachment_price},null,8,["attachments","price"])):c("",!0),e.value.imgs.length>0?(i(),r(j,{key:2,imgs:e.value.imgs},null,8,["imgs"])):c("",!0),e.value.videos.length>0?(i(),r(g,{key:3,videos:e.value.videos},null,8,["videos"])):c("",!0),e.value.links.length>0?(i(),r(H,{key:4,links:e.value.links},null,8,["links"])):c("",!0)]),action:s(()=>[o(se,{justify:"space-between"},{default:s(()=>[u("div",he,[o(p(y),{size:"18",class:"opt-item-icon"},{default:s(()=>[o(p(U))]),_:1}),_(" "+m(e.value.upvote_count),1)]),u("div",{class:"opt-item",onClick:n[3]||(n[3]=f(z=>a(e.value.id),["stop"]))},[o(p(y),{size:"18",class:"opt-item-icon"},{default:s(()=>[o(p(W))]),_:1}),_(" "+m(e.value.comment_count),1)]),u("div",ge,[o(p(y),{size:"18",class:"opt-item-icon"},{default:s(()=>[o(p(X))]),_:1}),_(" "+m(e.value.collection_count),1)])]),_:1})]),_:2},[e.value.texts.length>0?{name:"description",fn:s(()=>[u("div",{onClick:n[2]||(n[2]=z=>a(e.value.id))},[(i(!0),k(Q,null,R(e.value.texts,z=>(i(),k("span",{key:z.id,class:"post-text",onClick:n[1]||(n[1]=f(ne=>v(ne,e.value.id),["stop"])),innerHTML:p(B)(z.content).content},null,8,ve))),128))])]),key:"0"}:void 0]),1024)])}}});const ye={class:"nickname-wrap"},ke={class:"username-wrap"},fe={class:"item-header-extra"},xe={class:"timestamp"},we=["innerHTML"],$e={class:"opt-item"},be={class:"opt-item"},Pe=F({__name:"post-item",props:{post:{}},setup(C){const q=C,h=J(),T=G(),t=P(()=>{let e=Object.assign({texts:[],imgs:[],videos:[],links:[],attachments:[],charge_attachments:[]},q.post);return e.contents.map(a=>{(+a.type==1||+a.type==2)&&e.texts.push(a),+a.type==3&&e.imgs.push(a),+a.type==4&&e.videos.push(a),+a.type==6&&e.links.push(a),+a.type==7&&e.attachments.push(a),+a.type==8&&e.charge_attachments.push(a)}),e}),x=e=>{h.push({name:"post",query:{id:e}})},O=(e,a)=>{if(e.target.dataset.detail){const v=e.target.dataset.detail.split(":");if(v.length===2){T.commit("refresh"),v[0]==="tag"?h.push({name:"home",query:{q:v[1],t:"tag"}}):h.push({name:"user",query:{s:v[1]}});return}}x(a)};return(e,a)=>{const v=Y,l=A("router-link"),n=Z,d=N,M=V,w=D,L=I,$=y,b=ee,j=te;return i(),k("div",{class:"post-item",onClick:a[3]||(a[3]=g=>x(t.value.id))},[o(j,{"content-indented":""},E({avatar:s(()=>[o(v,{round:"",size:30,src:t.value.user.avatar},null,8,["src"])]),header:s(()=>[u("span",ye,[o(l,{onClick:a[0]||(a[0]=f(()=>{},["stop"])),class:"username-link",to:{name:"user",query:{s:t.value.user.username}}},{default:s(()=>[_(m(t.value.user.nickname),1)]),_:1},8,["to"])]),u("span",ke," @"+m(t.value.user.username),1),t.value.is_top?(i(),r(n,{key:0,class:"top-tag",type:"warning",size:"small",round:""},{default:s(()=>[_(" 置顶 ")]),_:1})):c("",!0),t.value.visibility==1?(i(),r(n,{key:1,class:"top-tag",type:"error",size:"small",round:""},{default:s(()=>[_(" 私密 ")]),_:1})):c("",!0),t.value.visibility==2?(i(),r(n,{key:2,class:"top-tag",type:"info",size:"small",round:""},{default:s(()=>[_(" 好友可见 ")]),_:1})):c("",!0)]),"header-extra":s(()=>[u("div",fe,[u("span",xe,m(t.value.ip_loc?t.value.ip_loc+" · ":t.value.ip_loc)+" "+m(p(K)(t.value.created_on)),1)])]),footer:s(()=>[t.value.attachments.length>0?(i(),r(d,{key:0,attachments:t.value.attachments},null,8,["attachments"])):c("",!0),t.value.charge_attachments.length>0?(i(),r(d,{key:1,attachments:t.value.charge_attachments,price:t.value.attachment_price},null,8,["attachments","price"])):c("",!0),t.value.imgs.length>0?(i(),r(M,{key:2,imgs:t.value.imgs},null,8,["imgs"])):c("",!0),t.value.videos.length>0?(i(),r(w,{key:3,videos:t.value.videos},null,8,["videos"])):c("",!0),t.value.links.length>0?(i(),r(L,{key:4,links:t.value.links},null,8,["links"])):c("",!0)]),action:s(()=>[o(b,{justify:"space-between"},{default:s(()=>[u("div",$e,[o($,{size:"18",class:"opt-item-icon"},{default:s(()=>[o(p(U))]),_:1}),_(" "+m(t.value.upvote_count),1)]),u("div",{class:"opt-item",onClick:a[2]||(a[2]=f(g=>x(t.value.id),["stop"]))},[o($,{size:"18",class:"opt-item-icon"},{default:s(()=>[o(p(W))]),_:1}),_(" "+m(t.value.comment_count),1)]),u("div",be,[o($,{size:"18",class:"opt-item-icon"},{default:s(()=>[o(p(X))]),_:1}),_(" "+m(t.value.collection_count),1)])]),_:1})]),_:2},[t.value.texts.length>0?{name:"description",fn:s(()=>[(i(!0),k(Q,null,R(t.value.texts,g=>(i(),k("span",{key:g.id,class:"post-text",onClick:a[1]||(a[1]=f(H=>O(H,t.value.id),["stop"])),innerHTML:p(B)(g.content).content},null,8,we))),128))]),key:"0"}:void 0]),1024)])}}});export{Pe as _,He as a}; diff --git a/web/dist/assets/post-skeleton-949f6995.js b/web/dist/assets/post-skeleton-c0397381.js similarity index 88% rename from web/dist/assets/post-skeleton-949f6995.js rename to web/dist/assets/post-skeleton-c0397381.js index c82fa59b..229ee925 100644 --- a/web/dist/assets/post-skeleton-949f6995.js +++ b/web/dist/assets/post-skeleton-c0397381.js @@ -1 +1 @@ -import{U as r}from"./naive-ui-62663ad7.js";import{d as c,o as s,c as n,a4 as p,a as o,V as t,F as l}from"./@vue-e0e89260.js";import{_ as i}from"./index-a0347e1a.js";const m={class:"user"},d={class:"content"},u=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",d,[t(e,{text:"",repeat:3}),t(e,{text:"",style:{width:"60%"}})])]))),128)}}});const b=i(u,[["__scopeId","data-v-ab0015b4"]]);export{b as _}; +import{U as r}from"./naive-ui-62663ad7.js";import{d as c,o as s,c as n,a4 as p,a as o,V as t,F as l}from"./@vue-e0e89260.js";import{_ as i}from"./index-479e9ef6.js";const m={class:"user"},d={class:"content"},u=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",d,[t(e,{text:"",repeat:3}),t(e,{text:"",style:{width:"60%"}})])]))),128)}}});const b=i(u,[["__scopeId","data-v-ab0015b4"]]);export{b as _}; diff --git a/web/dist/index.html b/web/dist/index.html index 4e68bfc8..a87011fc 100644 --- a/web/dist/index.html +++ b/web/dist/index.html @@ -8,7 +8,7 @@ 泡泡 - + @@ -27,8 +27,8 @@ - - + + diff --git a/web/src/api/user.ts b/web/src/api/user.ts index 8c7c587f..be1962c7 100644 --- a/web/src/api/user.ts +++ b/web/src/api/user.ts @@ -69,6 +69,58 @@ export const addFriend = ( }); }; +// 关注 用户 +export const followUser = ( + data: NetParams.FollowUserReq +): Promise => { + return request({ + method: "post", + url: "/v1/user/follow", + data, + }); +}; + +// 取消关注 用户 +export const unfollowUser = ( + data: NetParams.UnfollowUserReq +): Promise => { + return request({ + method: "post", + url: "/v1/user/unfollow", + data, + }); +}; + +/** + * 获取关注列表 + * @param {Object} params + * @returns Promise + */ +export const getUserFollows = ( + params: NetParams.GetUserFollows +): Promise => { + return request({ + method: "get", + url: "/v1/user/follows", + params, + }); +}; + +/** + * 获取粉丝列表 + * @param {Object} params + * @returns Promise + */ +export const getUserFollowings = ( + params: NetParams.GetUserFollowings +): Promise => { + return request({ + method: "get", + url: "/v1/user/followings", + params, + }); +}; + /** * 拒绝朋友申请 * @param {Object} data diff --git a/web/src/assets/css/main.less b/web/src/assets/css/main.less index 5cde672f..b627dc0f 100644 --- a/web/src/assets/css/main.less +++ b/web/src/assets/css/main.less @@ -43,6 +43,18 @@ justify-content: center; } +.following-link { + color: #000; + color: none; + text-decoration: none; + cursor: pointer; + opacity: 0.75; + + &:hover { + opacity: 0.8; + } +} + .hash-link, .user-link { color: #18a058; @@ -81,6 +93,7 @@ color: #63e2b7; } + .following-link, .username-link { color: #eee; } diff --git a/web/src/components/follow-item.vue b/web/src/components/follow-item.vue new file mode 100644 index 00000000..dbd6ff4a --- /dev/null +++ b/web/src/components/follow-item.vue @@ -0,0 +1,75 @@ + + + + + \ No newline at end of file diff --git a/web/src/router/index.ts b/web/src/router/index.ts index a85580dd..0a4bd405 100644 --- a/web/src/router/index.ts +++ b/web/src/router/index.ts @@ -14,7 +14,7 @@ const routes = [ path: "/post", name: "post", meta: { - title: "话题详情", + title: "泡泡详情", }, component: () => import("@/views/Post.vue"), }, @@ -74,6 +74,14 @@ const routes = [ }, component: () => import("@/views/Contacts.vue"), }, + { + path: "/following", + name: "following", + meta: { + title: "关注", + }, + component: () => import("@/views/Following.vue"), + }, { path: "/wallet", name: "wallet", diff --git a/web/src/store/index.ts b/web/src/store/index.ts index a80941f9..02ac21aa 100644 --- a/web/src/store/index.ts +++ b/web/src/store/index.ts @@ -17,6 +17,9 @@ export default createStore({ id: 0, username: "", nickname: "", + created_on: 0, + follows: 0, + followings: 0, }, }, mutations: { @@ -51,7 +54,14 @@ export default createStore({ }, userLogout(state) { localStorage.removeItem("PAOPAO_TOKEN"); - state.userInfo = { id: 0, nickname: "", username: "" }; + state.userInfo = { + id: 0, + nickname: "", + username: "", + created_on: 0, + follows: 0, + followings: 0, + }; state.userLogined = false; }, }, diff --git a/web/src/types/Item.d.ts b/web/src/types/Item.d.ts index ff8530ad..743c035f 100644 --- a/web/src/types/Item.d.ts +++ b/web/src/types/Item.d.ts @@ -16,6 +16,14 @@ declare module Item { is_admin: boolean; /** 是否好友 */ is_friend: boolean; + /** 是否关注 */ + is_following: boolean; + /** 加入时间 */ + created_on: number; + /** 关注数 */ + follows: number; + /** 粉丝数 */ + followings: number; /** 用户余额(分) */ balance?: number; /** 用户状态 */ @@ -260,6 +268,13 @@ declare module Item { avatar: string; } + interface FollowItemProps { + user_id: number; + name: string; + nickname: string; + avatar: string; + } + interface AttachmentProps { id: number; /** 类别:1为图片,2为视频,3为其他附件 */ diff --git a/web/src/types/NetParams.d.ts b/web/src/types/NetParams.d.ts index 083d0588..0e2dc7eb 100644 --- a/web/src/types/NetParams.d.ts +++ b/web/src/types/NetParams.d.ts @@ -63,6 +63,14 @@ declare module NetParams { status: number; } + interface FollowUserReq { + user_id: number; + } + + interface UnfollowUserReq { + user_id: number; + } + interface UserReqRecharge { amount: number; } @@ -111,6 +119,18 @@ declare module NetParams { page_size: number; } + interface GetUserFollows { + username: string; + page: number; + page_size: number; + } + + interface GetUserFollowings { + username: string; + page: number; + page_size: number; + } + interface UserChangePassword { /** 新密码 */ password: string; diff --git a/web/src/types/NetReq.d.ts b/web/src/types/NetReq.d.ts index 671204a5..e4f964c8 100644 --- a/web/src/types/NetReq.d.ts +++ b/web/src/types/NetReq.d.ts @@ -86,15 +86,14 @@ declare module NetReq { interface UserChangeStatus {} + interface FollowUserResp {} + + interface UnfollowUserResp {} + interface AddFriend {} interface DeleteFriend {} - interface GetContacts { - contacts: Item.ContactsItemProps; - total: number; - } - interface RejectFriend {} interface RequestingFriend {} diff --git a/web/src/utils/formatTime.ts b/web/src/utils/formatTime.ts index 2e561ecc..da1499de 100644 --- a/web/src/utils/formatTime.ts +++ b/web/src/utils/formatTime.ts @@ -35,3 +35,7 @@ export const formatPrettyDate = (time: number) => { } return mt.fromNow(); }; + +export const formatDate = (time: number) => { + return moment.unix(time).utc(true).format("YYYY年MM月"); +}; diff --git a/web/src/views/Following.vue b/web/src/views/Following.vue new file mode 100644 index 00000000..8c8652af --- /dev/null +++ b/web/src/views/Following.vue @@ -0,0 +1,145 @@ + + + + + \ No newline at end of file diff --git a/web/src/views/Profile.vue b/web/src/views/Profile.vue index 5a4518fd..1d13c745 100644 --- a/web/src/views/Profile.vue +++ b/web/src/views/Profile.vue @@ -10,14 +10,54 @@
- +
{{ store.state.userInfo.nickname }} @{{ store.state.userInfo.username }} + + 管理员 + +
+
+ UID. {{ store.state.userInfo.id }} + {{ formatDate(store.state.userInfo.created_on) }} 加入 +
+
+ + + 关注  {{ store.state.userInfo.follows }} + + + + + 粉丝  {{ store.state.userInfo.followings }} + +
-
UID. {{ store.state.userInfo.id }}
@@ -64,6 +104,7 @@ import { ref, onMounted, watch } from 'vue'; import { useStore } from 'vuex'; import { useRoute } from 'vue-router'; import { getUserPosts } from '@/api/user'; +import { formatDate } from '@/utils/formatTime'; const store = useStore(); const route = useRoute(); @@ -276,23 +317,31 @@ watch( display: flex; padding: 16px; .avatar { - width: 55px; + width: 72px; } .base-info { position: relative; - width: calc(100% - 55px); + margin-left: 12px; + width: calc(100% - 84px); .username { line-height: 16px; font-size: 16px; } - .uid { + .userinfo { font-size: 14px; line-height: 14px; margin-top: 10px; opacity: 0.75; + .info-item { + margin-right: 12px; + } + } + + .top-tag { + transform: scale(0.75); } } } diff --git a/web/src/views/Topic.vue b/web/src/views/Topic.vue index 474907ca..da5d0336 100644 --- a/web/src/views/Topic.vue +++ b/web/src/views/Topic.vue @@ -20,7 +20,7 @@ v-for="tag in tags" :tag="tag" :showAction="store.state.userLogined && tagsChecked" - :checkFollowing="inFollwTab" + :checkFollowing="inFollowTab" > @@ -39,7 +39,7 @@ const tags = ref([]); const tagType = ref<"hot" | "new" | "follow">('hot'); const loading = ref(false); const tagsChecked = ref(false) -const inFollwTab = ref(false) +const inFollowTab = ref(false) watch(tagsChecked, () => { if (!tagsChecked.value) { @@ -77,9 +77,9 @@ const loadTags = () => { const changeTab = (tab: "hot" | "new" | "follow") => { tagType.value = tab; if (tab == "follow") { - inFollwTab.value = true + inFollowTab.value = true } else { - inFollwTab.value = false + inFollowTab.value = false } loadTags(); }; diff --git a/web/src/views/User.vue b/web/src/views/User.vue index aa70ea7b..c4112a5d 100644 --- a/web/src/views/User.vue +++ b/web/src/views/User.vue @@ -7,7 +7,7 @@
- +
@@ -22,7 +22,44 @@ 管理员
-
UID. {{ user.id }}
+
+ UID. {{ user.id }} + {{ formatDate(user.created_on) }} 加入 +
+
+ + + 关注  {{ user.follows}} + + + + + 粉丝  {{ user.followings }} + + +
- @@ -89,16 +125,18 @@ import { NIcon } from 'naive-ui' import type { Component } from 'vue' import { useStore } from 'vuex'; import { useRoute } from 'vue-router'; -import { getUserProfile, getUserPosts, changeUserStatus, deleteFriend } from '@/api/user'; +import { getUserProfile, getUserPosts, changeUserStatus, deleteFriend, followUser, unfollowUser } from '@/api/user'; import { useDialog, DropdownOption } from 'naive-ui'; import WhisperAddFriend from '../components/whisper-add-friend.vue'; import { MoreHorizFilled } from '@vicons/material'; +import { formatDate } from '@/utils/formatTime'; import { PaperPlaneOutline, PersonAddOutline, PersonRemoveOutline, CubeOutline, - TrashOutline, + BodyOutline, + WalkOutline } from '@vicons/ionicons5'; const dialog = useDialog(); @@ -113,6 +151,10 @@ const user = reactive({ nickname: '', is_admin: false, is_friend: true, + is_following: false, + created_on: 0, + follows: 0, + followings: 0, status: 1, }); const userLoading = ref(false); @@ -282,6 +324,10 @@ const loadUser = () => { user.nickname = res.nickname; user.is_admin = res.is_admin; user.is_friend = res.is_friend; + user.created_on = res.created_on; + user.is_following = res.is_following; + user.follows = res.follows; + user.followings = res.followings; user.status = res.status; loadPage(); }) @@ -355,6 +401,19 @@ const userOptions = computed(() => { }); } } + if (user.is_following) { + options.push({ + label: '取消关注', + key: 'unfollow', + icon: renderIcon(WalkOutline) + }) + } else { + options.push({ + label: '关注', + key: 'follow', + icon: renderIcon(BodyOutline) + }) + } if (user.is_friend) { options.push({ label: '删除好友', @@ -371,7 +430,7 @@ const userOptions = computed(() => { return options; }); const handleUserAction = ( - item: 'whisper' | 'delete' | 'requesting' | 'banned' | 'deblocking' + item: 'whisper' | 'follow' | 'unfollow' | 'delete' | 'requesting' | 'banned' | 'deblocking' ) => { switch (item) { case 'whisper': @@ -383,6 +442,10 @@ const handleUserAction = ( case 'requesting': openAddFriendWhisper(); break; + case 'follow': + case 'unfollow': + handleFollowUser(); + break; case 'banned': case 'deblocking': banUser(); @@ -414,6 +477,43 @@ const openDeleteFriend = () => { }, }); }; +const handleFollowUser = () => { + dialog.success({ + title: '提示', + content: + '确定' + (user.is_following ? '取消关注' : '关注') + '该用户吗?', + positiveText: '确定', + negativeText: '取消', + onPositiveClick: () => { + userLoading.value = true; + if (user.is_following) { + unfollowUser({ + user_id: user.id, + }).then((_res) => { + userLoading.value = false; + window.$message.success('取消关注成功'); + loadUser(); + }) + .catch((err) => { + userLoading.value = false; + console.log(err); + }); + } else { + followUser({ + user_id: user.id, + }).then((_res) => { + userLoading.value = false; + window.$message.success('关注成功'); + loadUser(); + }) + .catch((err) => { + userLoading.value = false; + console.log(err); + }); + } + }, + }); +}; const banUser = () => { dialog.warning({ title: '警告', @@ -429,8 +529,13 @@ const banUser = () => { id: user.id, status: user.status === 1 ? 2 : 1, }) - .then((res) => { + .then((_res) => { userLoading.value = false; + if (user.status === 1) { + window.$message.success('禁言成功'); + } else { + window.$message.success('解封成功'); + } loadUser(); }) .catch((err) => { @@ -467,23 +572,27 @@ onMounted(() => { padding: 16px; .avatar { - width: 55px; + width: 72px; } .base-info { position: relative; - width: calc(100% - 55px); + margin-left: 12px; + width: calc(100% - 84px); .username { line-height: 16px; font-size: 16px; } - .uid { + .userinfo { font-size: 14px; line-height: 14px; margin-top: 10px; opacity: 0.75; + .info-item { + margin-right: 12px; + } } .top-tag {