diff --git a/CHANGELOG.md b/CHANGELOG.md
index 1bd6d401..a267628b 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -30,52 +30,124 @@ All notable changes to paopao-ce are documented in this file.
# 模块开启
VITE_ENABLE_FRIENDS_BAR=true
```
- - add Newest/Hots/Following tweets support in friend bar feature.
+- add Newest/Hots/Following tweets support in friend bar feature.
mirgration database first(sql ddl file in `scripts/migration/**/*_home_timeline.up.sql`):
- ```sql
- CREATE TABLE `p_post_metric` (
- `id` bigint unsigned NOT NULL AUTO_INCREMENT,
- `post_id` bigint unsigned NOT NULL,
- `rank_score` bigint unsigned NOT NULL DEFAULT 0,
- `incentive_score` int unsigned NOT NULL DEFAULT 0,
- `decay_factor` int unsigned NOT NULL DEFAULT 0,
- `motivation_factor` int unsigned NOT NULL DEFAULT 0,
- `is_del` tinyint NOT NULL DEFAULT 0, -- 是否删除, 0否, 1是
- `created_on` bigint unsigned NOT NULL DEFAULT '0',
- `modified_on` bigint unsigned NOT NULL DEFAULT '0',
- `deleted_on` bigint unsigned NOT NULL DEFAULT '0',
- PRIMARY KEY (`id`) USING BTREE,
- KEY `idx_post_metric_post_id_rank_score` (`post_id`,`rank_score`) USING BTREE
- ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
-
- INSERT INTO p_post_metric (post_id, rank_score, created_on)
- SELECT id AS post_id,
- comment_count + upvote_count*2 + collection_count*4 AS rank_score,
- created_on
- FROM p_post
- WHERE is_del=0;
-
- -- 原来的可见性: 0公开 1私密 2好友可见 3关注可见
- -- 现在的可见性: 0私密 10充电可见 20订阅可见 30保留 40保留 50好友可见 60关注可见 70保留 80保留 90公开
- UPDATE p_post a
- SET visibility = (
- SELECT
- CASE visibility
- WHEN 0 THEN 90
- WHEN 1 THEN 0
- WHEN 2 THEN 50
- WHEN 3 THEN 60
- ELSE 0
- END
- FROM
- p_post b
- WHERE
- a.ID = b.ID
- );
- ```sql
- - add cache support for index/home etc. page.
- - add hots comments support for post detail page.
-
+ ```sql
+ CREATE TABLE `p_post_metric` (
+ `id` bigint unsigned NOT NULL AUTO_INCREMENT,
+ `post_id` bigint unsigned NOT NULL,
+ `rank_score` bigint unsigned NOT NULL DEFAULT 0,
+ `incentive_score` int unsigned NOT NULL DEFAULT 0,
+ `decay_factor` int unsigned NOT NULL DEFAULT 0,
+ `motivation_factor` int unsigned NOT NULL DEFAULT 0,
+ `is_del` tinyint NOT NULL DEFAULT 0, -- 是否删除, 0否, 1是
+ `created_on` bigint unsigned NOT NULL DEFAULT '0',
+ `modified_on` bigint unsigned NOT NULL DEFAULT '0',
+ `deleted_on` bigint unsigned NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`) USING BTREE,
+ KEY `idx_post_metric_post_id_rank_score` (`post_id`,`rank_score`) USING BTREE
+ ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
+
+ INSERT INTO p_post_metric (post_id, rank_score, created_on)
+ SELECT id AS post_id,
+ comment_count + upvote_count*2 + collection_count*4 AS rank_score,
+ created_on
+ FROM p_post
+ WHERE is_del=0;
+
+ -- 原来的可见性: 0公开 1私密 2好友可见 3关注可见
+ -- 现在的可见性: 0私密 10充电可见 20订阅可见 30保留 40保留 50好友可见 60关注可见 70保留 80保留 90公开
+ UPDATE p_post a, p_post b
+ SET a.visibility = (
+ CASE b.visibility
+ WHEN 0 THEN 90
+ WHEN 1 THEN 0
+ WHEN 2 THEN 50
+ WHEN 3 THEN 60
+ ELSE 0
+ END
+ )
+ WHERE a.ID = b.ID;
+ ```
+- add cache support for index/home etc. page.
+- add hots comments support for post detail page.
+- add highlight comments support for post detail page.
+ mirgration database first(sql ddl file in `scripts/migration/**/*_comment_esence.up.sql`):
+ ```sql
+ ALTER TABLE `p_comment` ADD COLUMN `is_essence` tinyint unsigned NOT NULL DEFAULT 0 COMMENT '是否精选';
+ ```
+- add follow/unfollow user support in index/home/collecion/message/post page.
+- add simple prometheus metrics support.
+ add `Metrics` to `conf.yaml` 's `Features` section to enable this feature like below:
+ ```yaml
+ # file config.yaml
+ ...
+ Features:
+ Default: ["Base", "Postgres", "Meili", "LocalOSS", "Metrics", "web"]
+ JobManager: # Cron Job理器的配置参数
+ MaxOnlineInterval: "@every 5m" # 更新最大在线人数,默认每5分钟更新一次
+ UpdateMetricsInterval: "@every 5m" # 更新Prometheus指标,默认每5分钟更新一次
+ MetricsServer: # Prometheus Metrics服务
+ RunMode: debug
+ HttpIp: 0.0.0.0
+ HttpPort: 6080
+ ReadTimeout: 60
+ WriteTimeout: 60
+ ...
+ ```
+- add full support for tweet hots comment logic and add cache support for tweet comments.
+ mirgration database first(sql ddl file in `scripts/migration/**/*_rank_metrics.up.sql`):
+ ```sql
+ ALTER TABLE `p_comment` ADD COLUMN `reply_count` int unsigned NOT NULL DEFAULT 0 COMMENT '回复数';
+
+ UPDATE p_comment comment
+ SET reply_count = (
+ SELECT count(*) FROM p_comment_reply reply WHERE reply.comment_id=comment.id AND reply.is_del=0
+ )
+ WHERE is_del=0;
+
+ CREATE TABLE `p_comment_metric` (
+ `id` bigint unsigned NOT NULL AUTO_INCREMENT,
+ `comment_id` bigint unsigned NOT NULL,
+ `rank_score` bigint unsigned NOT NULL DEFAULT 0,
+ `incentive_score` int unsigned NOT NULL DEFAULT 0,
+ `decay_factor` int unsigned NOT NULL DEFAULT 0,
+ `motivation_factor` int unsigned NOT NULL DEFAULT 0,
+ `is_del` tinyint NOT NULL DEFAULT 0,
+ `created_on` bigint unsigned NOT NULL DEFAULT 0,
+ `modified_on` bigint unsigned NOT NULL DEFAULT 0,
+ `deleted_on` bigint unsigned NOT NULL DEFAULT 0,
+ PRIMARY KEY (`id`) USING BTREE,
+ KEY `idx_comment_metric_comment_id_rank_score` (`comment_id`, `rank_score`) USING BTREE
+ ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
+
+ INSERT INTO p_comment_metric (comment_id, rank_score, created_on)
+ SELECT id AS comment_id,
+ reply_count*2 + thumbs_up_count*4 - thumbs_down_count AS rank_score,
+ created_on
+ FROM p_comment
+ WHERE is_del=0;
+
+ CREATE TABLE `p_user_metric` (
+ `id` bigint unsigned NOT NULL AUTO_INCREMENT,
+ `user_id` bigint unsigned NOT NULL,
+ `tweets_count` int unsigned NOT NULL DEFAULT 0,
+ `latest_trends_on` bigint unsigned NOT NULL DEFAULT 0 COMMENT '最新动态时间',
+ `is_del` tinyint NOT NULL DEFAULT 0,
+ `created_on` bigint unsigned NOT NULL DEFAULT 0,
+ `modified_on` bigint unsigned NOT NULL DEFAULT 0,
+ `deleted_on` bigint unsigned NOT NULL DEFAULT 0,
+ PRIMARY KEY (`id`) USING BTREE,
+ KEY `idx_user_metric_user_id_tweets_count_trends` (`user_id`, `tweets_count`, `latest_trends_on`) USING BTREE
+ ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
+
+ INSERT INTO p_user_metric (user_id, tweets_count)
+ SELECT user_id, count(*) AS tweets_count
+ FROM p_post
+ WHERE is_del=0
+ GROUP BY user_id;
+ ```
+
## 0.4.2
### Fixed
- fixed remove multi-objects no effects and occurs resource leak error when use Minio as OSS(Object Storage System).[#371](https://github.com/rocboss/paopao-ce/pull/371) [#372](https://github.com/rocboss/paopao-ce/pull/372)
diff --git a/auto/api/v1/loose.go b/auto/api/v1/loose.go
index 10aed8bc..536c3d1d 100644
--- a/auto/api/v1/loose.go
+++ b/auto/api/v1/loose.go
@@ -18,6 +18,7 @@ type Loose interface {
// Chain provide handlers chain for gin
Chain() gin.HandlersChain
+ TweetDetail(*web.TweetDetailReq) (*web.TweetDetailResp, mir.Error)
TweetComments(*web.TweetCommentsReq) (*web.TweetCommentsResp, mir.Error)
TopicList(*web.TopicListReq) (*web.TopicListResp, mir.Error)
GetUserProfile(*web.GetUserProfileReq) (*web.GetUserProfileResp, mir.Error)
@@ -35,6 +36,20 @@ func RegisterLooseServant(e *gin.Engine, s Loose) {
router.Use(middlewares...)
// register routes info to router
+ router.Handle("GET", "/post", func(c *gin.Context) {
+ select {
+ case <-c.Request.Context().Done():
+ return
+ default:
+ }
+ req := new(web.TweetDetailReq)
+ if err := s.Bind(c, req); err != nil {
+ s.Render(c, nil, err)
+ return
+ }
+ resp, err := s.TweetDetail(req)
+ s.Render(c, resp, err)
+ })
router.Handle("GET", "/post/comments", func(c *gin.Context) {
select {
case <-c.Request.Context().Done():
@@ -47,7 +62,12 @@ func RegisterLooseServant(e *gin.Engine, s Loose) {
return
}
resp, err := s.TweetComments(req)
- s.Render(c, resp, err)
+ if err != nil {
+ s.Render(c, nil, err)
+ return
+ }
+ var rv _render_ = resp
+ rv.Render(c)
})
router.Handle("GET", "/tags", func(c *gin.Context) {
select {
@@ -125,6 +145,10 @@ func (UnimplementedLooseServant) Chain() gin.HandlersChain {
return nil
}
+func (UnimplementedLooseServant) TweetDetail(req *web.TweetDetailReq) (*web.TweetDetailResp, mir.Error) {
+ return nil, mir.Errorln(http.StatusNotImplemented, http.StatusText(http.StatusNotImplemented))
+}
+
func (UnimplementedLooseServant) TweetComments(req *web.TweetCommentsReq) (*web.TweetCommentsResp, mir.Error) {
return nil, mir.Errorln(http.StatusNotImplemented, http.StatusText(http.StatusNotImplemented))
}
diff --git a/auto/api/v1/priv.go b/auto/api/v1/priv.go
index c6142180..063f00af 100644
--- a/auto/api/v1/priv.go
+++ b/auto/api/v1/priv.go
@@ -27,6 +27,7 @@ type Priv interface {
ThumbsUpTweetComment(*web.TweetCommentThumbsReq) mir.Error
DeleteCommentReply(*web.DeleteCommentReplyReq) mir.Error
CreateCommentReply(*web.CreateCommentReplyReq) (*web.CreateCommentReplyResp, mir.Error)
+ HighlightComment(*web.HighlightCommentReq) (*web.HighlightCommentResp, mir.Error)
DeleteComment(*web.DeleteCommentReq) mir.Error
CreateComment(*web.CreateCommentReq) (*web.CreateCommentResp, mir.Error)
VisibleTweet(*web.VisibleTweetReq) (*web.VisibleTweetResp, mir.Error)
@@ -184,6 +185,20 @@ func RegisterPrivServant(e *gin.Engine, s Priv, m ...PrivChain) {
resp, err := s.CreateCommentReply(req)
s.Render(c, resp, err)
})
+ router.Handle("POST", "/post/comment/highlight", func(c *gin.Context) {
+ select {
+ case <-c.Request.Context().Done():
+ return
+ default:
+ }
+ req := new(web.HighlightCommentReq)
+ if err := s.Bind(c, req); err != nil {
+ s.Render(c, nil, err)
+ return
+ }
+ resp, err := s.HighlightComment(req)
+ s.Render(c, resp, err)
+ })
router.Handle("DELETE", "/post/comment", func(c *gin.Context) {
select {
case <-c.Request.Context().Done():
@@ -419,6 +434,10 @@ func (UnimplementedPrivServant) CreateCommentReply(req *web.CreateCommentReplyRe
return nil, mir.Errorln(http.StatusNotImplemented, http.StatusText(http.StatusNotImplemented))
}
+func (UnimplementedPrivServant) HighlightComment(req *web.HighlightCommentReq) (*web.HighlightCommentResp, mir.Error) {
+ return nil, mir.Errorln(http.StatusNotImplemented, http.StatusText(http.StatusNotImplemented))
+}
+
func (UnimplementedPrivServant) DeleteComment(req *web.DeleteCommentReq) mir.Error {
return mir.Errorln(http.StatusNotImplemented, http.StatusText(http.StatusNotImplemented))
}
diff --git a/auto/api/v1/pub.go b/auto/api/v1/pub.go
index 850a7906..2a68a600 100644
--- a/auto/api/v1/pub.go
+++ b/auto/api/v1/pub.go
@@ -15,7 +15,6 @@ import (
type Pub interface {
_default_
- TweetDetail(*web.TweetDetailReq) (*web.TweetDetailResp, mir.Error)
SendCaptcha(*web.SendCaptchaReq) mir.Error
GetCaptcha() (*web.GetCaptchaResp, mir.Error)
Register(*web.RegisterReq) (*web.RegisterResp, mir.Error)
@@ -30,20 +29,6 @@ func RegisterPubServant(e *gin.Engine, s Pub) {
router := e.Group("v1")
// register routes info to router
- router.Handle("GET", "/post", func(c *gin.Context) {
- select {
- case <-c.Request.Context().Done():
- return
- default:
- }
- req := new(web.TweetDetailReq)
- if err := s.Bind(c, req); err != nil {
- s.Render(c, nil, err)
- return
- }
- resp, err := s.TweetDetail(req)
- s.Render(c, resp, err)
- })
router.Handle("POST", "/captcha", func(c *gin.Context) {
select {
case <-c.Request.Context().Done():
@@ -110,10 +95,6 @@ func RegisterPubServant(e *gin.Engine, s Pub) {
// UnimplementedPubServant can be embedded to have forward compatible implementations.
type UnimplementedPubServant struct{}
-func (UnimplementedPubServant) TweetDetail(req *web.TweetDetailReq) (*web.TweetDetailResp, mir.Error) {
- return nil, mir.Errorln(http.StatusNotImplemented, http.StatusText(http.StatusNotImplemented))
-}
-
func (UnimplementedPubServant) SendCaptcha(req *web.SendCaptchaReq) mir.Error {
return mir.Errorln(http.StatusNotImplemented, http.StatusText(http.StatusNotImplemented))
}
diff --git a/go.mod b/go.mod
index e4a23886..3f938b25 100644
--- a/go.mod
+++ b/go.mod
@@ -4,6 +4,7 @@ go 1.21
require (
github.com/Masterminds/semver/v3 v3.2.1
+ github.com/RoaringBitmap/roaring v1.5.0
github.com/afocus/captcha v0.0.0-20191010092841-4bd1f21c8868
github.com/alimy/mir/v4 v4.0.0
github.com/alimy/tryst v0.8.3
@@ -28,8 +29,9 @@ require (
github.com/json-iterator/go v1.1.12
github.com/meilisearch/meilisearch-go v0.25.1
github.com/minio/minio-go/v7 v7.0.63
- github.com/onsi/ginkgo/v2 v2.12.0
+ github.com/onsi/ginkgo/v2 v2.12.1
github.com/onsi/gomega v1.27.10
+ github.com/prometheus/client_golang v1.16.0
github.com/pyroscope-io/client v0.7.2
github.com/redis/rueidis v1.0.18
github.com/robfig/cron/v3 v3.0.1
@@ -41,7 +43,7 @@ require (
github.com/tencentyun/cos-go-sdk-v5 v0.7.43
github.com/yinheli/mahonia v0.0.0-20131226213531-0eef680515cc
go.uber.org/automaxprocs v1.5.3
- google.golang.org/grpc v1.58.1
+ google.golang.org/grpc v1.58.2
google.golang.org/protobuf v1.31.0
gopkg.in/natefinch/lumberjack.v2 v2.2.1
gopkg.in/resty.v1 v1.12.0
@@ -56,6 +58,9 @@ require (
require (
github.com/andybalholm/brotli v1.0.5 // indirect
+ github.com/beorn7/perks v1.0.1 // indirect
+ github.com/bits-and-blooms/bitset v1.2.0 // indirect
+ github.com/cespare/xxhash/v2 v2.2.0 // indirect
github.com/chenzhuoyu/base64x v0.0.0-20230717121745-296ad89f973d // indirect
github.com/chenzhuoyu/iasm v0.9.0 // indirect
github.com/clbanning/mxj v1.8.4 // indirect
@@ -102,14 +107,19 @@ require (
github.com/mattn/go-colorable v0.1.13 // indirect
github.com/mattn/go-isatty v0.0.19 // indirect
github.com/mattn/go-sqlite3 v1.14.17 // indirect
+ github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect
github.com/minio/md5-simd v1.1.2 // indirect
github.com/minio/sha256-simd v1.0.1 // indirect
github.com/mitchellh/mapstructure v1.5.0 // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.2 // indirect
github.com/mozillazg/go-httpheader v0.2.1 // indirect
+ github.com/mschoch/smat v0.2.0 // indirect
github.com/pelletier/go-toml/v2 v2.0.8 // indirect
github.com/pkg/errors v0.9.1 // indirect
+ github.com/prometheus/client_model v0.3.0 // indirect
+ github.com/prometheus/common v0.42.0 // indirect
+ github.com/prometheus/procfs v0.10.1 // indirect
github.com/pyroscope-io/godeltaprof v0.1.2 // indirect
github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec // indirect
github.com/rogpeppe/go-internal v1.9.0 // indirect
diff --git a/go.sum b/go.sum
index 5fe04040..cd7d5576 100644
--- a/go.sum
+++ b/go.sum
@@ -112,6 +112,8 @@ github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbt
github.com/PuerkitoBio/urlesc v0.0.0-20160726150825-5bd2802263f2/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE=
github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE=
github.com/QcloudApi/qcloud_sign_golang v0.0.0-20141224014652-e4130a326409/go.mod h1:1pk82RBxDY/JZnPQrtqHlUFfCctgdorsd9M06fMynOM=
+github.com/RoaringBitmap/roaring v1.5.0 h1:V0VCSiHjroItEYCM3guC8T83ehi5QMt3oM9EefTTOms=
+github.com/RoaringBitmap/roaring v1.5.0/go.mod h1:plvDsJQpxOC5bw8LRteu/MLWHsHez/3y6cubLI4/1yE=
github.com/Shopify/logrus-bugsnag v0.0.0-20171204204709-577dee27f20d/go.mod h1:HI8ITrYtUY+O+ZhtlqUnD8+KwNPOyugEhfP9fdUIaEQ=
github.com/afocus/captcha v0.0.0-20191010092841-4bd1f21c8868 h1:uFrPOl1VBt/Abfl2z+A/DFc+AwmFLxEHR1+Yq6cXvww=
github.com/afocus/captcha v0.0.0-20191010092841-4bd1f21c8868/go.mod h1:srphKZ1i+yGXxl/LpBS7ZIECTjCTPzZzAMtJWoG3sLo=
@@ -176,12 +178,14 @@ github.com/benbjohnson/clock v1.0.3/go.mod h1:bGMdMPoPVvcYyt1gHDf4J2KE153Yf9BuiU
github.com/beorn7/perks v0.0.0-20160804104726-4c0e84591b9a/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q=
github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q=
github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8=
+github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM=
github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw=
github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs=
github.com/bitbus/sqlx v1.8.0 h1:2mhQscUW9Qc95gUONNswkuDaJiluVUfmBP4yw2cSK7M=
github.com/bitbus/sqlx v1.8.0/go.mod h1:MemKLfQ600g6PxUVsIDe48PlY3wOquyW2ApeiXoynFo=
github.com/bitly/go-hostpool v0.0.0-20171023180738-a3a6125de932/go.mod h1:NOuUCSz6Q9T7+igc/hlvDOUdtWKryOrtFyIVABv/p7k=
github.com/bitly/go-simplejson v0.5.0/go.mod h1:cXHtHw4XUPsvGaxgjIAn8PhEWG9NfngEKAMDJEczWVA=
+github.com/bits-and-blooms/bitset v1.2.0 h1:Kn4yilvwNtMACtf1eYDlG8H77R07mZSPbMjLyS07ChA=
github.com/bits-and-blooms/bitset v1.2.0/go.mod h1:gIdJ4wp64HaoK2YrL1Q5/N7Y16edYb8uY+O0FJTyyDA=
github.com/bkaradzic/go-lz4 v1.0.0/go.mod h1:0YdlkowM3VswSROI7qDxhRvJ3sLhlFrRRwjwegp5jy4=
github.com/bketelsen/crypt v0.0.3-0.20200106085610-5cbc8cc4026c/go.mod h1:MKsuJmJgSg28kpZDP6UIiPt0e0Oz0kqKNGyRaWEPv84=
@@ -210,6 +214,8 @@ github.com/certifi/gocertifi v0.0.0-20200922220541-2c3bb06c6054/go.mod h1:sGbDF6
github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc=
github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
github.com/cespare/xxhash/v2 v2.1.2/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
+github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44=
+github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
github.com/checkpoint-restore/go-criu/v4 v4.1.0/go.mod h1:xUQBLp4RLc5zJtWY++yjOoMoB5lihDt7fai+75m+rGw=
github.com/checkpoint-restore/go-criu/v5 v5.0.0/go.mod h1:cfwC0EG7HMUenopBsUf9d89JlCLQIfgVcNsNN0t6T2M=
github.com/checkpoint-restore/go-criu/v5 v5.3.0/go.mod h1:E/eQpaFtUKGOOSEBZgmKAcn+zUUwWxqcaKZlF54wK8E=
@@ -945,6 +951,8 @@ github.com/mattn/go-sqlite3 v1.14.17 h1:mCRHCLDUBXgpKAqIKsaAaAsrAlbkeomtRFKXh2L6
github.com/mattn/go-sqlite3 v1.14.17/go.mod h1:2eHXhiwb8IkHr+BDWZGa96P6+rkvnG63S2DGjv9HUNg=
github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0=
github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4=
+github.com/matttproud/golang_protobuf_extensions v1.0.4 h1:mmDVorXM7PCGKw94cs5zkfA9PSy5pEvNWRP0ET0TIVo=
+github.com/matttproud/golang_protobuf_extensions v1.0.4/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4=
github.com/maxbrunsfeld/counterfeiter/v6 v6.2.2/go.mod h1:eD9eIE7cdwcMi9rYluz88Jz2VyhSmden33/aXg4oVIY=
github.com/meilisearch/meilisearch-go v0.25.1 h1:D5wY22sn5kkpRH3uYMGlwltdUEq5regIFmO7awHz3Vo=
github.com/meilisearch/meilisearch-go v0.25.1/go.mod h1:SxuSqDcPBIykjWz1PX+KzsYzArNLSCadQodWs8extS0=
@@ -995,6 +1003,8 @@ github.com/morikuni/aec v1.0.0/go.mod h1:BbKIizmSmc5MMPqRYbxO4ZU0S0+P200+tUnFx7P
github.com/mozillazg/go-httpheader v0.2.1 h1:geV7TrjbL8KXSyvghnFm+NyTux/hxwueTSrwhe88TQQ=
github.com/mozillazg/go-httpheader v0.2.1/go.mod h1:jJ8xECTlalr6ValeXYdOF8fFUISeBAdw6E61aqQma60=
github.com/mrunalp/fileutils v0.5.0/go.mod h1:M1WthSahJixYnrXQl/DFQuteStB1weuxD2QJNHXfbSQ=
+github.com/mschoch/smat v0.2.0 h1:8imxQsjDm8yFEAVBe7azKmKSgzSkZXDuKkSq9374khM=
+github.com/mschoch/smat v0.2.0/go.mod h1:kc9mz7DoBKqDyiRL7VZN8KvXQMWeTaVnttLRXOlotKw=
github.com/munnerz/goautoneg v0.0.0-20120707110453-a547fc61f48d/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ=
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ=
github.com/mutecomm/go-sqlcipher/v4 v4.4.0/go.mod h1:PyN04SaWalavxRGH9E8ZftG6Ju7rsPrGmQRjrEaVpiY=
@@ -1021,8 +1031,8 @@ github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108
github.com/onsi/ginkgo v1.13.0/go.mod h1:+REjRxOmWfHCjfv9TTWB1jD1Frx4XydAD3zm1lskyM0=
github.com/onsi/ginkgo v1.14.0/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9klQyY=
github.com/onsi/ginkgo v1.16.4/go.mod h1:dX+/inL/fNMqNlz0e9LfyB9TswhZpCVdJM/Z6Vvnwo0=
-github.com/onsi/ginkgo/v2 v2.12.0 h1:UIVDowFPwpg6yMUpPjGkYvf06K3RAiJXUhCxEwQVHRI=
-github.com/onsi/ginkgo/v2 v2.12.0/go.mod h1:ZNEzXISYlqpb8S36iN71ifqLi3vVD1rVJGvWRCJOUpQ=
+github.com/onsi/ginkgo/v2 v2.12.1 h1:uHNEO1RP2SpuZApSkel9nEh1/Mu+hmQe7Q+Pepg5OYA=
+github.com/onsi/ginkgo/v2 v2.12.1/go.mod h1:TE309ZR8s5FsKKpuB1YAQYBzCaAfUgatB/xlT/ETL/o=
github.com/onsi/gomega v0.0.0-20151007035656-2152b45fa28a/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA=
github.com/onsi/gomega v0.0.0-20170829124025-dcabb60a477c/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA=
github.com/onsi/gomega v1.5.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY=
@@ -1102,11 +1112,15 @@ github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5Fsn
github.com/prometheus/client_golang v1.1.0/go.mod h1:I1FGZT9+L76gKKOs5djB6ezCbFQP1xR9D75/vuwEF3g=
github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M=
github.com/prometheus/client_golang v1.11.0/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0=
+github.com/prometheus/client_golang v1.16.0 h1:yk/hx9hDbrGHovbci4BY+pRMfSuuat626eFsHb7tmT8=
+github.com/prometheus/client_golang v1.16.0/go.mod h1:Zsulrv/L9oM40tJ7T815tM89lFEugiJ9HzIqaAx4LKc=
github.com/prometheus/client_model v0.0.0-20171117100541-99fa1f4be8e5/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo=
github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo=
github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
+github.com/prometheus/client_model v0.3.0 h1:UBgGFHqYdG/TPFD1B1ogZywDqEkwp3fBMvqdiQ7Xew4=
+github.com/prometheus/client_model v0.3.0/go.mod h1:LDGWKZIo7rky3hgvBe+caln+Dr3dPggB5dvjtD7w9+w=
github.com/prometheus/common v0.0.0-20180110214958-89604d197083/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro=
github.com/prometheus/common v0.0.0-20181113130724-41aa239b4cce/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro=
github.com/prometheus/common v0.4.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4=
@@ -1115,6 +1129,8 @@ github.com/prometheus/common v0.6.0/go.mod h1:eBmuwkDJBwy6iBfxCBob6t6dR6ENT/y+J+
github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo=
github.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9VFqTh1DIvc=
github.com/prometheus/common v0.30.0/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls=
+github.com/prometheus/common v0.42.0 h1:EKsfXEYo4JpWMHH5cg+KOUWeuJSov1Id8zGR8eeI1YM=
+github.com/prometheus/common v0.42.0/go.mod h1:xBwqVerjNdUDjgODMpudtOMwlOwf2SaTr1yjz4b7Zbc=
github.com/prometheus/procfs v0.0.0-20180125133057-cb4147076ac7/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk=
github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk=
github.com/prometheus/procfs v0.0.0-20190507164030-5867b95ac084/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA=
@@ -1127,6 +1143,8 @@ github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4O
github.com/prometheus/procfs v0.2.0/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU=
github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA=
github.com/prometheus/procfs v0.7.3/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA=
+github.com/prometheus/procfs v0.10.1 h1:kYK1Va/YMlutzCGazswoHKo//tZVlFpKYh+PymziUAg=
+github.com/prometheus/procfs v0.10.1/go.mod h1:nwNm2aOCAYw8uTR/9bWRREkZFxAUcWzPHWJq+XBB/FM=
github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU=
github.com/pyroscope-io/client v0.7.2 h1:OX2qdUQsS8RSkn/3C8isD7f/P0YiZQlRbAlecAaj/R8=
github.com/pyroscope-io/client v0.7.2/go.mod h1:FEocnjn+Ngzxy6EtU9ZxXWRvQ0+pffkrBxHLnPpxwi8=
@@ -1972,8 +1990,8 @@ google.golang.org/grpc v1.40.1/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9K
google.golang.org/grpc v1.42.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ590SU=
google.golang.org/grpc v1.43.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ590SU=
google.golang.org/grpc v1.45.0/go.mod h1:lN7owxKUQEqMfSyQikvvk5tf/6zMPsrK+ONuO11+0rQ=
-google.golang.org/grpc v1.58.1 h1:OL+Vz23DTtrrldqHK49FUOPHyY75rvFqJfXC84NYW58=
-google.golang.org/grpc v1.58.1/go.mod h1:tgX3ZQDlNJGU96V6yHh1T/JeoBQ2TXdr43YbYSsCJk0=
+google.golang.org/grpc v1.58.2 h1:SXUpjxeVF3FKrTYQI4f4KvbGD5u2xccdYdurwowix5I=
+google.golang.org/grpc v1.58.2/go.mod h1:tgX3ZQDlNJGU96V6yHh1T/JeoBQ2TXdr43YbYSsCJk0=
google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw=
google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8=
google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0=
diff --git a/internal/conf/alipay.go b/internal/conf/alipay.go
index 4f118d64..8d1b8d0f 100644
--- a/internal/conf/alipay.go
+++ b/internal/conf/alipay.go
@@ -21,16 +21,16 @@ func MustAlipayClient() *alipay.Client {
logrus.Fatalf("alipay.New err: %s", err)
}
// 加载应用公钥证书
- if err = client.LoadAppPublicCertFromFile(s.AppPublicCertFile); err != nil {
- logrus.Fatalf("client.LoadAppPublicCertFromFile err: %s\n", err)
+ if err = client.LoadAppCertPublicKeyFromFile(s.AppPublicCertFile); err != nil {
+ logrus.Fatalf("client.LoadAppCertPublicKeyFromFile err: %s\n", err)
}
// 加载支付宝根证书
if err = client.LoadAliPayRootCertFromFile(s.RootCertFile); err != nil {
logrus.Fatalf("client.LoadAliPayRootCertFromFile err: %s\n", err)
}
// 加载支付宝公钥证书
- if err = client.LoadAliPayPublicCertFromFile(s.PublicCertFile); err != nil {
- logrus.Fatalf("client.LoadAliPayPublicCertFromFile err: %s\n", err)
+ if err = client.LoadAlipayCertPublicKeyFromFile(s.PublicCertFile); err != nil {
+ logrus.Fatalf("client.LoadAlipayCertPublicKeyFromFile err: %s\n", err)
}
_alipayClient = client
})
diff --git a/internal/conf/cache.go b/internal/conf/cache.go
index 9f61a309..f0ff84d0 100644
--- a/internal/conf/cache.go
+++ b/internal/conf/cache.go
@@ -17,6 +17,9 @@ const (
// 以下包含一些在cache中会用到的key的前缀
const (
+ InfixCommentDefault = "default"
+ InfixCommentHots = "hots"
+ InfixCommentNewest = "newest"
PrefixNewestTweets = "paopao:newesttweets:"
PrefixHotsTweets = "paopao:hotstweets:"
PrefixFollowingTweets = "paopao:followingtweets:"
@@ -29,6 +32,9 @@ const (
PrefixUserInfo = "paopao:userinfo:"
PrefixUserInfoById = "paopao:userinfo:id:"
PrefixUserInfoByName = "paopao:userinfo:name:"
+ PrefixMyFriendIds = "paopao:myfriendids:"
+ PrefixMyFollowIds = "paopao:myfollowids:"
+ PrefixTweetComment = "paopao:comment:"
KeySiteStatus = "paopao:sitestatus"
KeyHistoryMaxOnline = "history.max.online"
)
@@ -42,6 +48,8 @@ var (
KeyOnlineUser cache.KeyPool[int64]
KeyUserInfoById cache.KeyPool[int64]
KeyUserInfoByName cache.KeyPool[string]
+ KeyMyFriendIds cache.KeyPool[int64]
+ KeyMyFollowIds cache.KeyPool[int64]
)
func initCacheKeyPool() {
@@ -56,6 +64,8 @@ func initCacheKeyPool() {
KeyOnlineUser = intKeyPool[int64](poolSize, PrefixOnlineUser)
KeyUserInfoById = intKeyPool[int64](poolSize, PrefixUserInfoById)
KeyUserInfoByName = strKeyPool(poolSize, PrefixUserInfoById)
+ KeyMyFriendIds = intKeyPool[int64](poolSize, PrefixMyFriendIds)
+ KeyMyFollowIds = intKeyPool[int64](poolSize, PrefixMyFollowIds)
}
func strKeyPool(size int, prefix string) cache.KeyPool[string] {
diff --git a/internal/conf/conf.go b/internal/conf/conf.go
index fb15b45b..321a7a91 100644
--- a/internal/conf/conf.go
+++ b/internal/conf/conf.go
@@ -26,6 +26,7 @@ var (
PostgresSetting *postgresConf
Sqlite3Setting *sqlite3Conf
PprofServerSetting *httpServerConf
+ MetricsServerSetting *httpServerConf
WebServerSetting *httpServerConf
AdminServerSetting *httpServerConf
SpaceXServerSetting *httpServerConf
@@ -78,6 +79,7 @@ func setupSetting(suite []string, noDefault bool) error {
"MetricManager": &MetricManagerSetting,
"JobManager": &JobManagerSetting,
"PprofServer": &PprofServerSetting,
+ "MetricsServer": &MetricsServerSetting,
"WebServer": &WebServerSetting,
"AdminServer": &AdminServerSetting,
"SpaceXServer": &SpaceXServerSetting,
diff --git a/internal/conf/config.yaml b/internal/conf/config.yaml
index 7c53f4aa..f9c22314 100644
--- a/internal/conf/config.yaml
+++ b/internal/conf/config.yaml
@@ -11,8 +11,10 @@ Cache:
UnreadMsgExpire: 60 # 未读消息过期时间,单位秒, 默认60s
UserTweetsExpire: 60 # 获取用户推文列表过期时间,单位秒, 默认60s
IndexTweetsExpire: 120 # 获取广场推文列表过期时间,单位秒, 默认120s
+ TweetCommentsExpire: 180 # 获取推文评论过期时间,单位秒, 默认180s
OnlineUserExpire: 300 # 标记在线用户 过期时间,单位秒, 默认300s
UserInfoExpire: 300 # 获取用户信息过期时间,单位秒, 默认300s
+ UserRelationExpire: 600 # 用户关系信息过期时间,单位秒, 默认600s
EventManager: # 事件管理器的配置参数
MinWorker: 64 # 最小后台工作者, 设置范围[5, ++], 默认64
MaxEventBuf: 128 # 最大log缓存条数, 设置范围[10, ++], 默认128
@@ -26,7 +28,8 @@ MetricManager: # 指标监控管理器的配置参数
MaxTickCount: 60 # 最大的循环周期, 设置范围[60, ++], 默认60
TickWaitTime: 1 # 一个周期的等待时间,单位:秒 默认1s
JobManager: # Cron Job理器的配置参数
- MaxOnlineInterval: "@every 5m" # 更新最大在线人数,默认每5分钟更新一次
+ MaxOnlineInterval: "@every 5m" # 更新最大在线人数,默认每5分钟更新一次
+ UpdateMetricsInterval: "@every 5m" # 更新Prometheus指标,默认每5分钟更新一次
Features:
Default: []
WebServer: # Web服务
@@ -65,6 +68,12 @@ PprofServer: # Pprof服务
HttpPort: 6060
ReadTimeout: 60
WriteTimeout: 60
+MetricsServer: # Prometheus Metrics服务
+ RunMode: debug
+ HttpIp: 0.0.0.0
+ HttpPort: 6080
+ ReadTimeout: 60
+ WriteTimeout: 60
FrontendWebServer: # Web前端静态资源服务
RunMode: debug
HttpIp: 0.0.0.0
diff --git a/internal/conf/db.go b/internal/conf/db.go
index 42465dd9..539aa8db 100644
--- a/internal/conf/db.go
+++ b/internal/conf/db.go
@@ -23,6 +23,7 @@ const (
TableAttachment = "attachment"
TableCaptcha = "captcha"
TableComment = "comment"
+ TableCommentMetric = "comment_metric"
TableCommentContent = "comment_content"
TableCommentReply = "comment_reply"
TableFollowing = "following"
@@ -39,6 +40,7 @@ const (
TablePostStar = "post_star"
TableTag = "tag"
TableUser = "user"
+ TableUserMetric = "user_metric"
TableWalletRecharge = "wallet_recharge"
TableWalletStatement = "wallet_statement"
)
diff --git a/internal/conf/setting.go b/internal/conf/setting.go
index 51ad246c..4758bfb8 100644
--- a/internal/conf/setting.go
+++ b/internal/conf/setting.go
@@ -102,8 +102,10 @@ type cacheConf struct {
UnreadMsgExpire int64
UserTweetsExpire int64
IndexTweetsExpire int64
+ TweetCommentsExpire int64
OnlineUserExpire int64
UserInfoExpire int64
+ UserRelationExpire int64
}
type eventManagerConf struct {
@@ -123,7 +125,8 @@ type metricManagerConf struct {
}
type jobManagerConf struct {
- MaxOnlineInterval string
+ MaxOnlineInterval string
+ UpdateMetricsInterval string
}
type cacheIndexConf struct {
@@ -344,6 +347,7 @@ func (s *databaseConf) TableNames() (res TableNameMap) {
TableAttachment,
TableCaptcha,
TableComment,
+ TableCommentMetric,
TableCommentContent,
TableCommentReply,
TableFollowing,
@@ -360,6 +364,7 @@ func (s *databaseConf) TableNames() (res TableNameMap) {
TablePostStar,
TableTag,
TableUser,
+ TableUserMetric,
TableWalletRecharge,
TableWalletStatement,
}
diff --git a/internal/core/comments.go b/internal/core/comments.go
index c4b8dac9..a7115069 100644
--- a/internal/core/comments.go
+++ b/internal/core/comments.go
@@ -21,6 +21,7 @@ type CommentService interface {
// CommentManageService 评论管理服务
type CommentManageService interface {
+ HighlightComment(userId, commentId int64) (int8, error)
DeleteComment(comment *ms.Comment) error
CreateComment(comment *ms.Comment) (*ms.Comment, error)
CreateCommentReply(reply *ms.CommentReply) (*ms.CommentReply, error)
diff --git a/internal/core/core.go b/internal/core/core.go
index cb56e9d6..ead34ba5 100644
--- a/internal/core/core.go
+++ b/internal/core/core.go
@@ -15,9 +15,6 @@ type DataService interface {
// 话题服务
TopicService
- // 广场泡泡服务
- // IndexPostsService
-
// 推文服务
TweetService
TweetManageService
@@ -25,6 +22,7 @@ type DataService interface {
// 推文指标服务
TweetMetricServantA
+ CommentMetricServantA
// 评论服务
CommentService
@@ -34,6 +32,7 @@ type DataService interface {
UserManageService
ContactManageService
FollowingManageService
+ UserRelationService
// 安全服务
SecurityService
diff --git a/internal/core/cs/metrics.go b/internal/core/cs/metrics.go
index c8347dfa..f9808e46 100644
--- a/internal/core/cs/metrics.go
+++ b/internal/core/cs/metrics.go
@@ -13,8 +13,15 @@ type TweetMetric struct {
UpvoteCount int64
CollectionCount int64
ShareCount int64
- ThumbdownCount int64
- ThumbupCount int64
+ ThumbsUpCount int64
+ ThumbsDownCount int64
+}
+
+type CommentMetric struct {
+ CommentId int64
+ ReplyCount int32
+ ThumbsUpCount int32
+ ThumbsDownCount int32
}
func (m *TweetMetric) RankScore(motivationFactor int) int64 {
@@ -23,3 +30,10 @@ func (m *TweetMetric) RankScore(motivationFactor int) int64 {
}
return (m.CommentCount + m.UpvoteCount*2 + m.CollectionCount*4 + m.ShareCount*8) * int64(motivationFactor)
}
+
+func (m *CommentMetric) RankScore(motivationFactor int) int64 {
+ if motivationFactor == 0 {
+ motivationFactor = 1
+ }
+ return int64(m.ReplyCount*2+m.ThumbsUpCount*4-m.ThumbsDownCount) * int64(motivationFactor)
+}
diff --git a/internal/core/metrics.go b/internal/core/metrics.go
index 790cee74..d2dbc0fb 100644
--- a/internal/core/metrics.go
+++ b/internal/core/metrics.go
@@ -9,7 +9,19 @@ import (
)
type TweetMetricServantA interface {
- UpdateRankScore(metric *cs.TweetMetric) error
+ UpdateTweetMetric(metric *cs.TweetMetric) error
AddTweetMetric(postId int64) error
DeleteTweetMetric(postId int64) error
}
+
+type CommentMetricServantA interface {
+ UpdateCommentMetric(metric *cs.CommentMetric) error
+ AddCommentMetric(commentId int64) error
+ DeleteCommentMetric(commentId int64) error
+}
+
+type UserMetricServantA interface {
+ UpdateUserMetric(userId int64, action uint8) error
+ AddUserMetric(userId int64) error
+ DeleteUserMetric(userId int64) error
+}
diff --git a/internal/core/user.go b/internal/core/user.go
index e445056d..a0973df3 100644
--- a/internal/core/user.go
+++ b/internal/core/user.go
@@ -37,3 +37,11 @@ type FollowingManageService interface {
GetFollowCount(userId int64) (int64, int64, error)
IsFollow(userId int64, followId int64) bool
}
+
+// UserRelationService 用户关系服务
+type UserRelationService interface {
+ MyFriendIds(userId int64) ([]int64, error)
+ MyFollowIds(userId int64) ([]int64, error)
+ IsMyFriend(userId int64, friendIds ...int64) (map[int64]bool, error)
+ IsMyFollow(userId int64, followIds ...int64) (map[int64]bool, error)
+}
diff --git a/internal/dao/cache/common.go b/internal/dao/cache/common.go
index f01af983..ed259ece 100644
--- a/internal/dao/cache/common.go
+++ b/internal/dao/cache/common.go
@@ -8,6 +8,7 @@ import (
"bytes"
"encoding/gob"
+ "github.com/RoaringBitmap/roaring/roaring64"
"github.com/rocboss/paopao-ce/internal/conf"
"github.com/rocboss/paopao-ce/internal/core"
"github.com/rocboss/paopao-ce/internal/core/ms"
@@ -59,3 +60,47 @@ func (s *cacheDataService) GetUserByUsername(username string) (res *ms.User, err
}
return
}
+
+func (s *cacheDataService) IsMyFriend(userId int64, friendIds ...int64) (res map[int64]bool, err error) {
+ size := len(friendIds)
+ res = make(map[int64]bool, size)
+ if size == 0 {
+ return
+ }
+ // 从缓存中获取
+ key := conf.KeyMyFriendIds.Get(userId)
+ if data, xerr := s.ac.Get(key); xerr == nil {
+ bitmap := roaring64.New()
+ if err = bitmap.UnmarshalBinary(data); err == nil {
+ for _, friendId := range friendIds {
+ res[friendId] = bitmap.Contains(uint64(friendId))
+ }
+ return
+ }
+ }
+ // 直接查库并触发缓存更新事件
+ OnCacheMyFriendIdsEvent(s.DataService, userId)
+ return s.DataService.IsMyFriend(userId, friendIds...)
+}
+
+func (s *cacheDataService) IsMyFollow(userId int64, followIds ...int64) (res map[int64]bool, err error) {
+ size := len(followIds)
+ res = make(map[int64]bool, size)
+ if size == 0 {
+ return
+ }
+ // 从缓存中获取
+ key := conf.KeyMyFollowIds.Get(userId)
+ if data, xerr := s.ac.Get(key); xerr == nil {
+ bitmap := roaring64.New()
+ if err = bitmap.UnmarshalBinary(data); err == nil {
+ for _, followId := range followIds {
+ res[followId] = bitmap.Contains(uint64(followId))
+ }
+ return
+ }
+ }
+ // 直接查库并触发缓存更新事件
+ OnCacheMyFollowIdsEvent(s.DataService, userId, key)
+ return s.DataService.IsMyFollow(userId, followIds...)
+}
diff --git a/internal/dao/cache/events.go b/internal/dao/cache/events.go
index 17bdbdfb..7467e849 100644
--- a/internal/dao/cache/events.go
+++ b/internal/dao/cache/events.go
@@ -9,23 +9,23 @@ import (
"encoding/gob"
"fmt"
+ "github.com/RoaringBitmap/roaring/roaring64"
"github.com/alimy/tryst/event"
"github.com/rocboss/paopao-ce/internal/conf"
"github.com/rocboss/paopao-ce/internal/core"
"github.com/rocboss/paopao-ce/internal/core/ms"
"github.com/rocboss/paopao-ce/internal/events"
+ "github.com/sirupsen/logrus"
)
type expireIndexTweetsEvent struct {
event.UnimplementedEvent
- tweet *ms.Post
ac core.AppCache
keysPattern []string
}
type expireHotsTweetsEvent struct {
event.UnimplementedEvent
- tweet *ms.Post
ac core.AppCache
keyPattern string
}
@@ -46,21 +46,38 @@ type cacheUserInfoEvent struct {
expire int64
}
-func onExpireIndexTweetEvent(tweet *ms.Post) {
+type cacheMyFriendIdsEvent struct {
+ event.UnimplementedEvent
+ ac core.AppCache
+ urs core.UserRelationService
+ userIds []int64
+ expire int64
+}
+
+type cacheMyFollowIdsEvent struct {
+ event.UnimplementedEvent
+ ac core.AppCache
+ urs core.UserRelationService
+ userId int64
+ key string
+ expire int64
+}
+
+func OnExpireIndexTweetEvent(userId int64) {
+ // TODO: 这里暴躁的将所有 最新/热门/关注 的推文列表缓存都过期掉,后续需要更精细话处理
events.OnEvent(&expireIndexTweetsEvent{
- tweet: tweet,
- ac: _appCache,
+ ac: _appCache,
keysPattern: []string{
conf.PrefixIdxTweetsNewest + "*",
conf.PrefixIdxTweetsHots + "*",
- fmt.Sprintf("%s%d:*", conf.PrefixUserTweets, tweet.UserID),
+ conf.PrefixIdxTweetsFollowing + "*",
+ fmt.Sprintf("%s%d:*", conf.PrefixUserTweets, userId),
},
})
}
-func onExpireHotsTweetEvent(tweet *ms.Post) {
+func OnExpireHotsTweetEvent() {
events.OnEvent(&expireHotsTweetsEvent{
- tweet: tweet,
ac: _appCache,
keyPattern: conf.PrefixHotsTweets + "*",
})
@@ -83,6 +100,34 @@ func onCacheUserInfoEvent(key string, data *ms.User) {
})
}
+func OnCacheMyFriendIdsEvent(urs core.UserRelationService, userIds ...int64) {
+ if len(userIds) == 0 {
+ return
+ }
+ events.OnEvent(&cacheMyFriendIdsEvent{
+ userIds: userIds,
+ urs: urs,
+ ac: _appCache,
+ expire: conf.CacheSetting.UserRelationExpire,
+ })
+}
+
+func OnCacheMyFollowIdsEvent(urs core.UserRelationService, userId int64, key ...string) {
+ cacheKey := ""
+ if len(key) > 0 {
+ cacheKey = key[0]
+ } else {
+ cacheKey = conf.KeyMyFollowIds.Get(userId)
+ }
+ events.OnEvent(&cacheMyFollowIdsEvent{
+ userId: userId,
+ urs: urs,
+ key: cacheKey,
+ ac: _appCache,
+ expire: conf.CacheSetting.UserRelationExpire,
+ })
+}
+
func (e *expireIndexTweetsEvent) Name() string {
return "expireIndexTweetsEvent"
}
@@ -127,3 +172,49 @@ func (e *cacheUserInfoEvent) Action() (err error) {
}
return
}
+
+func (e *cacheMyFriendIdsEvent) Name() string {
+ return "cacheMyFriendIdsEvent"
+}
+
+func (e *cacheMyFriendIdsEvent) Action() error {
+ logrus.Debug("cacheMyFriendIdsEvent action runnging")
+ for _, userId := range e.userIds {
+ myFriendIds, err := e.urs.MyFriendIds(userId)
+ if err != nil {
+ return err
+ }
+ bitmap := roaring64.New()
+ for _, friendId := range myFriendIds {
+ bitmap.Add(uint64(friendId))
+ }
+ data, err := bitmap.MarshalBinary()
+ if err != nil {
+ return err
+ }
+ e.ac.Set(conf.KeyMyFriendIds.Get(userId), data, e.expire)
+ }
+ return nil
+}
+
+func (e *cacheMyFollowIdsEvent) Name() string {
+ return "cacheMyFollowIdsEvent"
+}
+
+func (e *cacheMyFollowIdsEvent) Action() (err error) {
+ logrus.Debug("cacheMyFollowIdsEvent action runnging")
+ myFollowIds, err := e.urs.MyFollowIds(e.userId)
+ if err != nil {
+ return err
+ }
+ bitmap := roaring64.New()
+ for _, followId := range myFollowIds {
+ bitmap.Add(uint64(followId))
+ }
+ data, err := bitmap.MarshalBinary()
+ if err != nil {
+ return err
+ }
+ e.ac.Set(e.key, data, e.expire)
+ return nil
+}
diff --git a/internal/dao/cache/tweets.go b/internal/dao/cache/tweets.go
index ba89021d..ecabf0bd 100644
--- a/internal/dao/cache/tweets.go
+++ b/internal/dao/cache/tweets.go
@@ -19,22 +19,22 @@ func (s *eventCacheIndexSrv) SendAction(act core.IdxAct, post *ms.Post) {
err := error(nil)
switch act {
case core.IdxActUpdatePost:
- err = s.tms.UpdateRankScore(&cs.TweetMetric{
+ err = s.tms.UpdateTweetMetric(&cs.TweetMetric{
PostId: post.ID,
CommentCount: post.CommentCount,
UpvoteCount: post.UpvoteCount,
CollectionCount: post.CollectionCount,
ShareCount: post.ShareCount,
})
- onExpireIndexTweetEvent(post)
+ OnExpireIndexTweetEvent(post.UserID)
case core.IdxActCreatePost:
err = s.tms.AddTweetMetric(post.ID)
- onExpireIndexTweetEvent(post)
+ OnExpireIndexTweetEvent(post.UserID)
case core.IdxActDeletePost:
err = s.tms.DeleteTweetMetric(post.ID)
- onExpireIndexTweetEvent(post)
+ OnExpireIndexTweetEvent(post.UserID)
case core.IdxActStickPost, core.IdxActVisiblePost:
- onExpireIndexTweetEvent(post)
+ OnExpireIndexTweetEvent(post.UserID)
}
if err != nil {
logrus.Errorf("eventCacheIndexSrv.SendAction(%s) occurs error: %s", act, err)
diff --git a/internal/dao/jinzhu/comments.go b/internal/dao/jinzhu/comments.go
index e4d9debf..d4b2671c 100644
--- a/internal/dao/jinzhu/comments.go
+++ b/internal/dao/jinzhu/comments.go
@@ -5,6 +5,7 @@
package jinzhu
import (
+ "fmt"
"time"
"github.com/rocboss/paopao-ce/internal/core"
@@ -61,20 +62,21 @@ func (s *commentSrv) GetCommentThumbsMap(userId int64, tweetId int64) (cs.Commen
}
func (s *commentSrv) GetComments(tweetId int64, style cs.StyleCommentType, limit int, offset int) (res []*ms.Comment, total int64, err error) {
- // TODO: 需要优化一下,更精细的调整评论排序策略
- sort := "id ASC"
+ db := s.db.Table(_comment_)
+ sort := "is_essence DESC, id ASC"
switch style {
case cs.StyleCommentHots:
- // TOOD: 暂时简单排序,后续需要根据 rank_score=评论回复数*2+点赞*4-点踩, order byrank_score DESC
- sort = "thumbs_up_count DESC, id DESC"
+ // rank_score=评论回复数*2+点赞*4-点踩, order byrank_score DESC
+ db = db.Joins(fmt.Sprintf("LEFT JOIN %s m ON %s.id=m.comment_id AND m.is_del=0", _commentMetric_, _comment_))
+ sort = fmt.Sprintf("is_essence DESC, m.rank_score DESC, %s.id DESC", _comment_)
case cs.StyleCommentNewest:
- sort = "id DESC"
+ sort = "is_essence DESC, id DESC"
case cs.StyleCommentDefault:
fallthrough
default:
- // sort = "id ASC"
+ // nothing
}
- db := s.db.Table(_comment_).Where("post_id=?", tweetId)
+ db = db.Where("post_id=?", tweetId)
if err = db.Count(&total).Error; err != nil {
return
}
@@ -117,11 +119,9 @@ func (s *commentSrv) GetCommentRepliesByID(ids []int64) ([]*ms.CommentReplyForma
"comment_id IN ?": ids,
"ORDER": "id ASC",
}, 0, 0)
-
if err != nil {
return nil, err
}
-
userIds := []int64{}
for _, reply := range replies {
userIds = append(userIds, reply.UserID, reply.AtUserID)
@@ -142,44 +142,61 @@ func (s *commentSrv) GetCommentRepliesByID(ids []int64) ([]*ms.CommentReplyForma
replyFormated.AtUser = user.Format()
}
}
-
repliesFormated = append(repliesFormated, replyFormated)
}
return repliesFormated, nil
}
-func (s *commentManageSrv) DeleteComment(comment *ms.Comment) error {
+func (s *commentManageSrv) HighlightComment(userId, commentId int64) (res int8, err error) {
+ post := &dbr.Post{}
+ comment := &dbr.Comment{}
+ db := s.db.Model(comment)
+ if err = db.Where("id=?", commentId).First(comment).Error; err != nil {
+ return
+ }
+ if err = s.db.Table(_post_).Where("id=?", comment.PostID).First(post).Error; err != nil {
+ return
+ }
+ if post.UserID != userId {
+ return 0, cs.ErrNoPermission
+ }
+ comment.IsEssence = 1 - comment.IsEssence
+ return comment.IsEssence, db.Save(comment).Error
+}
+
+func (s *commentManageSrv) DeleteComment(comment *ms.Comment) (err error) {
db := s.db.Begin()
defer db.Rollback()
-
- err := comment.Delete(s.db)
- if err != nil {
- return err
+ if err = comment.Delete(db); err != nil {
+ return
}
err = db.Model(&dbr.TweetCommentThumbs{}).Where("user_id=? AND tweet_id=? AND comment_id=?", comment.UserID, comment.PostID, comment.ID).Updates(map[string]any{
"deleted_on": time.Now().Unix(),
"is_del": 1,
}).Error
if err != nil {
- return err
+ return
}
db.Commit()
- return nil
+ return
}
func (s *commentManageSrv) CreateComment(comment *ms.Comment) (*ms.Comment, error) {
return comment.Create(s.db)
}
-func (s *commentManageSrv) CreateCommentReply(reply *ms.CommentReply) (*ms.CommentReply, error) {
- return reply.Create(s.db)
+func (s *commentManageSrv) CreateCommentReply(reply *ms.CommentReply) (res *ms.CommentReply, err error) {
+ if res, err = reply.Create(s.db); err == nil {
+ // 宽松处理错误
+ s.db.Table(_comment_).Where("id=?", reply.CommentID).Update("reply_count", gorm.Expr("reply_count+1"))
+ }
+ return
}
func (s *commentManageSrv) DeleteCommentReply(reply *ms.CommentReply) (err error) {
db := s.db.Begin()
defer db.Rollback()
-
err = reply.Delete(s.db)
if err != nil {
return
@@ -192,6 +209,8 @@ func (s *commentManageSrv) DeleteCommentReply(reply *ms.CommentReply) (err error
if err != nil {
return
}
+ // 宽松处理错误
+ db.Table(_comment_).Where("id=?", reply.CommentID).Update("reply_count", gorm.Expr("reply_count-1"))
db.Commit()
return
}
diff --git a/internal/dao/jinzhu/dbr/comment.go b/internal/dao/jinzhu/dbr/comment.go
index 4f673336..364253c4 100644
--- a/internal/dao/jinzhu/dbr/comment.go
+++ b/internal/dao/jinzhu/dbr/comment.go
@@ -17,6 +17,8 @@ type Comment struct {
UserID int64 `json:"user_id"`
IP string `json:"ip"`
IPLoc string `json:"ip_loc"`
+ IsEssence int8 `json:"is_essense"`
+ ReplyCount int32 `json:"reply_count"`
ThumbsUpCount int32 `json:"thumbs_up_count"`
ThumbsDownCount int32 `json:"-"`
}
@@ -29,7 +31,9 @@ type CommentFormated struct {
Contents []*CommentContent `json:"contents"`
Replies []*CommentReplyFormated `json:"replies"`
IPLoc string `json:"ip_loc"`
+ ReplyCount int32 `json:"reply_count"`
ThumbsUpCount int32 `json:"thumbs_up_count"`
+ IsEssence int8 `json:"is_essence"`
IsThumbsUp int8 `json:"is_thumbs_up"`
IsThumbsDown int8 `json:"is_thumbs_down"`
CreatedOn int64 `json:"created_on"`
@@ -48,7 +52,9 @@ func (c *Comment) Format() *CommentFormated {
Contents: []*CommentContent{},
Replies: []*CommentReplyFormated{},
IPLoc: c.IPLoc,
+ ReplyCount: c.ReplyCount,
ThumbsUpCount: c.ThumbsUpCount,
+ IsEssence: c.IsEssence,
IsThumbsUp: types.No,
IsThumbsDown: types.No,
CreatedOn: c.CreatedOn,
@@ -116,7 +122,6 @@ func (c *Comment) Count(db *gorm.DB, conditions *ConditionsT) (int64, error) {
func (c *Comment) Create(db *gorm.DB) (*Comment, error) {
err := db.Create(&c).Error
-
return c, err
}
diff --git a/internal/dao/jinzhu/dbr/metrics.go b/internal/dao/jinzhu/dbr/metrics.go
index 82e105eb..4210c701 100644
--- a/internal/dao/jinzhu/dbr/metrics.go
+++ b/internal/dao/jinzhu/dbr/metrics.go
@@ -19,13 +19,53 @@ type PostMetric struct {
MotivationFactor int
}
-func (p *PostMetric) Create(db *gorm.DB) (*PostMetric, error) {
- err := db.Create(&p).Error
- return p, err
+type CommentMetric struct {
+ *Model
+ CommentId int64
+ RankScore int64
+ IncentiveScore int
+ DecayFactor int
+ MotivationFactor int
+}
+
+type UserMetric struct {
+ *Model
+ UserId int64
+ TweetsCount int
+ LatestTrendsOn int64
+}
+
+func (m *PostMetric) Create(db *gorm.DB) (*PostMetric, error) {
+ err := db.Create(&m).Error
+ return m, err
+}
+
+func (m *PostMetric) Delete(db *gorm.DB) error {
+ return db.Model(m).Where("post_id", m.PostId).Updates(map[string]any{
+ "deleted_on": time.Now().Unix(),
+ "is_del": 1,
+ }).Error
+}
+
+func (m *CommentMetric) Create(db *gorm.DB) (*CommentMetric, error) {
+ err := db.Create(&m).Error
+ return m, err
+}
+
+func (m *CommentMetric) Delete(db *gorm.DB) error {
+ return db.Model(m).Where("comment_id", m.CommentId).Updates(map[string]any{
+ "deleted_on": time.Now().Unix(),
+ "is_del": 1,
+ }).Error
+}
+
+func (m *UserMetric) Create(db *gorm.DB) (*UserMetric, error) {
+ err := db.Create(&m).Error
+ return m, err
}
-func (p *PostMetric) Delete(db *gorm.DB) error {
- return db.Model(p).Where("post_id", p.PostId).Updates(map[string]any{
+func (m *UserMetric) Delete(db *gorm.DB) error {
+ return db.Model(m).Where("user_id", m.UserId).Updates(map[string]any{
"deleted_on": time.Now().Unix(),
"is_del": 1,
}).Error
diff --git a/internal/dao/jinzhu/dbr/user.go b/internal/dao/jinzhu/dbr/user.go
index 4dacf3fa..4d7f7f6d 100644
--- a/internal/dao/jinzhu/dbr/user.go
+++ b/internal/dao/jinzhu/dbr/user.go
@@ -28,12 +28,14 @@ type User struct {
}
type UserFormated struct {
- ID int64 `db:"id" json:"id"`
- Nickname string `json:"nickname"`
- Username string `json:"username"`
- Status int `json:"status"`
- Avatar string `json:"avatar"`
- IsAdmin bool `json:"is_admin"`
+ ID int64 `db:"id" 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"`
}
func (u *User) Format() *UserFormated {
diff --git a/internal/dao/jinzhu/gorm.go b/internal/dao/jinzhu/gorm.go
index 7ba67927..4f50ef3f 100644
--- a/internal/dao/jinzhu/gorm.go
+++ b/internal/dao/jinzhu/gorm.go
@@ -15,6 +15,7 @@ var (
_attachment_ string
_captcha_ string
_comment_ string
+ _commentMetric_ string
_commentContent_ string
_commentReply_ string
_following_ string
@@ -31,6 +32,7 @@ var (
_postStar_ string
_tag_ string
_user_ string
+ _userMetric_ string
_walletRecharge_ string
_walletStatement_ string
)
@@ -42,6 +44,7 @@ func initTableName() {
_attachment_ = m[conf.TableAttachment]
_captcha_ = m[conf.TableCaptcha]
_comment_ = m[conf.TableComment]
+ _commentMetric_ = m[conf.TableCommentMetric]
_commentContent_ = m[conf.TableCommentContent]
_commentReply_ = m[conf.TableCommentReply]
_following_ = m[conf.TableFollowing]
@@ -58,6 +61,7 @@ func initTableName() {
_postStar_ = m[conf.TablePostStar]
_tag_ = m[conf.TableTag]
_user_ = m[conf.TableUser]
+ _userMetric_ = m[conf.TableUserMetric]
_walletRecharge_ = m[conf.TableWalletRecharge]
_walletStatement_ = m[conf.TableWalletStatement]
}
diff --git a/internal/dao/jinzhu/jinzhu.go b/internal/dao/jinzhu/jinzhu.go
index 3c9198af..abd7f593 100644
--- a/internal/dao/jinzhu/jinzhu.go
+++ b/internal/dao/jinzhu/jinzhu.go
@@ -38,9 +38,11 @@ type dataSrv struct {
core.TweetMetricServantA
core.CommentService
core.CommentManageService
+ core.CommentMetricServantA
core.UserManageService
core.ContactManageService
core.FollowingManageService
+ core.UserRelationService
core.SecurityService
core.AttachmentCheckService
}
@@ -56,10 +58,12 @@ func NewDataService() (core.DataService, core.VersionInfo) {
lazyInitial()
db := conf.MustGormDB()
pvs := security.NewPhoneVerifyService()
- tms := NewTweetMetricServentA(db)
+ tms := newTweetMetricServentA(db)
+ cms := newCommentMetricServentA(db)
cis := cache.NewEventCacheIndexSrv(tms)
ds := &dataSrv{
TweetMetricServantA: tms,
+ CommentMetricServantA: cms,
WalletService: newWalletService(db),
MessageService: newMessageService(db),
TopicService: newTopicService(db),
@@ -71,6 +75,7 @@ func NewDataService() (core.DataService, core.VersionInfo) {
UserManageService: newUserManageService(db),
ContactManageService: newContactManageService(db),
FollowingManageService: newFollowingManageService(db),
+ UserRelationService: newUserRelationService(db),
SecurityService: newSecurityService(db, pvs),
AttachmentCheckService: security.NewAttachmentCheckService(),
}
diff --git a/internal/dao/jinzhu/metrics.go b/internal/dao/jinzhu/metrics.go
index a3d350b4..45e9f385 100644
--- a/internal/dao/jinzhu/metrics.go
+++ b/internal/dao/jinzhu/metrics.go
@@ -15,7 +15,15 @@ type tweetMetricSrvA struct {
db *gorm.DB
}
-func (s *tweetMetricSrvA) UpdateRankScore(metric *cs.TweetMetric) error {
+type commentMetricSrvA struct {
+ db *gorm.DB
+}
+
+type userMetricSrvA struct {
+ db *gorm.DB
+}
+
+func (s *tweetMetricSrvA) UpdateTweetMetric(metric *cs.TweetMetric) error {
return s.db.Transaction(func(tx *gorm.DB) (err error) {
postMetric := &dbr.PostMetric{PostId: metric.PostId}
db := s.db.Model(postMetric).Where("post_id=?", metric.PostId)
@@ -35,8 +43,54 @@ func (s *tweetMetricSrvA) DeleteTweetMetric(postId int64) (err error) {
return (&dbr.PostMetric{PostId: postId}).Delete(s.db)
}
-func NewTweetMetricServentA(db *gorm.DB) core.TweetMetricServantA {
+func (s *commentMetricSrvA) UpdateCommentMetric(metric *cs.CommentMetric) error {
+ return s.db.Transaction(func(tx *gorm.DB) (err error) {
+ commentMetric := &dbr.CommentMetric{CommentId: metric.CommentId}
+ db := s.db.Model(commentMetric).Where("comment_id=?", metric.CommentId)
+ db.First(commentMetric)
+ commentMetric.RankScore = metric.RankScore(commentMetric.MotivationFactor)
+ err = db.Save(commentMetric).Error
+ return
+ })
+}
+
+func (s *commentMetricSrvA) AddCommentMetric(commentId int64) (err error) {
+ _, err = (&dbr.CommentMetric{CommentId: commentId}).Create(s.db)
+ return
+}
+
+func (s *commentMetricSrvA) DeleteCommentMetric(commentId int64) (err error) {
+ return (&dbr.CommentMetric{CommentId: commentId}).Delete(s.db)
+}
+
+func (s *userMetricSrvA) UpdateUserMetric(userId int64, action uint8) error {
+ // TODO
+ return cs.ErrNotImplemented
+}
+
+func (s *userMetricSrvA) AddUserMetric(userId int64) (err error) {
+ _, err = (&dbr.UserMetric{UserId: userId}).Create(s.db)
+ return
+}
+
+func (s *userMetricSrvA) DeleteUserMetric(userId int64) (err error) {
+ return (&dbr.UserMetric{UserId: userId}).Delete(s.db)
+}
+
+func newTweetMetricServentA(db *gorm.DB) core.TweetMetricServantA {
return &tweetMetricSrvA{
db: db,
}
}
+
+func newCommentMetricServentA(db *gorm.DB) core.CommentMetricServantA {
+ return &commentMetricSrvA{
+ db: db,
+ }
+}
+
+func newUserMetricServentA(db *gorm.DB) core.UserMetricServantA {
+ return &userMetricSrvA{
+ db: db,
+ }
+}
diff --git a/internal/dao/jinzhu/user.go b/internal/dao/jinzhu/user.go
index 1d1a145a..695867ac 100644
--- a/internal/dao/jinzhu/user.go
+++ b/internal/dao/jinzhu/user.go
@@ -21,12 +21,22 @@ type userManageSrv struct {
db *gorm.DB
}
+type userRelationSrv struct {
+ db *gorm.DB
+}
+
func newUserManageService(db *gorm.DB) core.UserManageService {
return &userManageSrv{
db: db,
}
}
+func newUserRelationService(db *gorm.DB) core.UserRelationService {
+ return &userRelationSrv{
+ db: db,
+ }
+}
+
func (s *userManageSrv) GetUserByID(id int64) (*ms.User, error) {
user := &dbr.User{
Model: &dbr.Model{
@@ -83,3 +93,57 @@ func (s *userManageSrv) GetRegisterUserCount() (res int64, err error) {
err = s.db.Model(&dbr.User{}).Count(&res).Error
return
}
+
+func (s *userRelationSrv) MyFriendIds(userId int64) (res []int64, err error) {
+ err = s.db.Table(_contact_).Where("user_id=?", userId).Select("friend_id").Find(&res).Error
+ return
+}
+
+func (s *userRelationSrv) MyFollowIds(userId int64) (res []int64, err error) {
+ err = s.db.Table(_following_).Where("user_id=?", userId).Select("follow_id").Find(&res).Error
+ return
+}
+
+func (s *userRelationSrv) IsMyFriend(userId int64, friendIds ...int64) (map[int64]bool, error) {
+ size := len(friendIds)
+ res := make(map[int64]bool, size)
+ if size == 0 {
+ return res, nil
+ }
+ myFriendIds, err := s.MyFriendIds(userId)
+ if err != nil {
+ return nil, err
+ }
+ for _, friendId := range friendIds {
+ res[friendId] = false
+ for _, myFriendId := range myFriendIds {
+ if friendId == myFriendId {
+ res[friendId] = true
+ break
+ }
+ }
+ }
+ return res, nil
+}
+
+func (s *userRelationSrv) IsMyFollow(userId int64, followIds ...int64) (map[int64]bool, error) {
+ size := len(followIds)
+ res := make(map[int64]bool, size)
+ if size == 0 {
+ return res, nil
+ }
+ myFollowIds, err := s.MyFollowIds(userId)
+ if err != nil {
+ return nil, err
+ }
+ for _, followId := range followIds {
+ res[followId] = false
+ for _, myFollowId := range myFollowIds {
+ if followId == myFollowId {
+ res[followId] = true
+ break
+ }
+ }
+ }
+ return res, nil
+}
diff --git a/internal/dao/sakila/comments.go b/internal/dao/sakila/comments.go
index 56fa4a8c..977d9dee 100644
--- a/internal/dao/sakila/comments.go
+++ b/internal/dao/sakila/comments.go
@@ -388,6 +388,11 @@ func (s *commentManageSrv) ThumbsDownReply(userId int64, tweetId, commentId, rep
})
}
+func (s *commentManageSrv) HighlightComment(userId, commentId int64) (int8, error) {
+ // TODO
+ return 0, cs.ErrNotImplemented
+}
+
func newCommentService(db *sqlx.DB) core.CommentService {
return &commentSrv{
sqlxSrv: newSqlxSrv(db),
diff --git a/internal/dao/sakila/metrics.go b/internal/dao/sakila/metrics.go
index e23e3d91..0f083f3e 100644
--- a/internal/dao/sakila/metrics.go
+++ b/internal/dao/sakila/metrics.go
@@ -18,7 +18,15 @@ type tweetMetricSrvA struct {
q *cc.TweetMetrics
}
-func (s *tweetMetricSrvA) UpdateRankScore(metric *cs.TweetMetric) error {
+type commentMetricSrvA struct {
+ *sqlxSrv
+}
+
+type userMetricSrvA struct {
+ *sqlxSrv
+}
+
+func (s *tweetMetricSrvA) UpdateTweetMetric(metric *cs.TweetMetric) error {
return s.db.Withx(func(tx *sqlx.Tx) error {
var motivationFactor int
tx.Stmtx(s.q.GetMotivationFactor).Get(&motivationFactor, metric.PostId)
@@ -37,9 +45,51 @@ func (s *tweetMetricSrvA) DeleteTweetMetric(postId int64) error {
return err
}
-func NewTweetMetricServentA(db *sqlx.DB) core.TweetMetricServantA {
+func (s *commentMetricSrvA) UpdateCommentMetric(metric *cs.CommentMetric) error {
+ // TDOO
+ return cs.ErrNotImplemented
+}
+
+func (s *commentMetricSrvA) AddCommentMetric(commentId int64) (err error) {
+ // TDOO
+ return cs.ErrNotImplemented
+}
+
+func (s *commentMetricSrvA) DeleteCommentMetric(commentId int64) (err error) {
+ // TDOO
+ return cs.ErrNotImplemented
+}
+
+func (s *userMetricSrvA) UpdateUserMetric(userId int64, action uint8) error {
+ // TODO
+ return cs.ErrNotImplemented
+}
+
+func (s *userMetricSrvA) AddUserMetric(userId int64) (err error) {
+ // TDOO
+ return cs.ErrNotImplemented
+}
+
+func (s *userMetricSrvA) DeleteUserMetric(userId int64) (err error) {
+ // TDOO
+ return cs.ErrNotImplemented
+}
+
+func newTweetMetricServentA(db *sqlx.DB) core.TweetMetricServantA {
return &tweetMetricSrvA{
sqlxSrv: newSqlxSrv(db),
q: ccBuild(db, cc.BuildTweetMetrics),
}
}
+
+func newCommentMetricServentA(db *sqlx.DB) core.CommentMetricServantA {
+ return &commentMetricSrvA{
+ sqlxSrv: newSqlxSrv(db),
+ }
+}
+
+func newUserMetricServentA(db *sqlx.DB) core.UserMetricServantA {
+ return &userMetricSrvA{
+ sqlxSrv: newSqlxSrv(db),
+ }
+}
diff --git a/internal/dao/sakila/sakila.go b/internal/dao/sakila/sakila.go
index e67742fa..d5a8bf6c 100644
--- a/internal/dao/sakila/sakila.go
+++ b/internal/dao/sakila/sakila.go
@@ -8,7 +8,6 @@ import (
"sync"
"github.com/Masterminds/semver/v3"
- "github.com/rocboss/paopao-ce/internal/conf"
"github.com/rocboss/paopao-ce/internal/core"
"github.com/rocboss/paopao-ce/internal/dao/cache"
"github.com/rocboss/paopao-ce/internal/dao/security"
@@ -35,10 +34,12 @@ type dataSrv struct {
core.CommentManageService
core.UserManageService
core.ContactManageService
+ core.UserRelationService
core.FollowingManageService
core.SecurityService
core.AttachmentCheckService
core.TweetMetricServantA
+ core.CommentMetricServantA
}
type webDataSrvA struct {
@@ -51,10 +52,12 @@ type webDataSrvA struct {
func NewDataService() (core.DataService, core.VersionInfo) {
lazyInitial()
pvs := security.NewPhoneVerifyService()
- tms := NewTweetMetricServentA(_db)
+ cms := newCommentMetricServentA(_db)
+ tms := newTweetMetricServentA(_db)
cis := cache.NewEventCacheIndexSrv(tms)
ds := &dataSrv{
TweetMetricServantA: tms,
+ CommentMetricServantA: cms,
WalletService: newWalletService(_db),
MessageService: newMessageService(_db),
TopicService: newTopicService(_db),
@@ -74,16 +77,13 @@ func NewDataService() (core.DataService, core.VersionInfo) {
func NewWebDataServantA() (core.WebDataServantA, core.VersionInfo) {
lazyInitial()
-
- tms := NewTweetMetricServentA(_db)
+ tms := newTweetMetricServentA(_db)
cis := cache.NewEventCacheIndexSrv(tms)
-
- db := conf.MustSqlxDB()
ds := &webDataSrvA{
- TopicServantA: newTopicServantA(db),
- TweetServantA: newTweetServantA(db),
- TweetManageServantA: newTweetManageServantA(db, cis),
- TweetHelpServantA: newTweetHelpServantA(db),
+ TopicServantA: newTopicServantA(_db),
+ TweetServantA: newTweetServantA(_db),
+ TweetManageServantA: newTweetManageServantA(_db, cis),
+ TweetHelpServantA: newTweetHelpServantA(_db),
}
return ds, ds
}
diff --git a/internal/dao/sakila/user.go b/internal/dao/sakila/user.go
index 0c73bc58..c61c8735 100644
--- a/internal/dao/sakila/user.go
+++ b/internal/dao/sakila/user.go
@@ -12,6 +12,7 @@ import (
"github.com/bitbus/sqlx"
"github.com/bitbus/sqlx/db"
"github.com/rocboss/paopao-ce/internal/core"
+ "github.com/rocboss/paopao-ce/internal/core/cs"
"github.com/rocboss/paopao-ce/internal/core/ms"
"github.com/rocboss/paopao-ce/internal/dao/sakila/auto/cc"
"github.com/rocboss/paopao-ce/internal/dao/sakila/auto/pgc"
@@ -26,6 +27,10 @@ type userManageSrv struct {
q *cc.UserManage
}
+type userRelationSrv struct {
+ *sqlxSrv
+}
+
func (s *userManageSrv) GetUserByID(id int64) (*ms.User, error) {
return db.Get[ms.User](s.q.GetUserById, id)
}
@@ -78,6 +83,26 @@ func (s *userManageSrv) GetRegisterUserCount() (res int64, err error) {
return
}
+func (s *userRelationSrv) MyFriendIds(userId int64) (res []int64, err error) {
+ // TODO
+ return
+}
+
+func (s *userRelationSrv) MyFollowIds(userId int64) (res []int64, err error) {
+ // TODO
+ return
+}
+
+func (s *userRelationSrv) IsMyFriend(userId int64, friendIds ...int64) (map[int64]bool, error) {
+ // TODO
+ return nil, cs.ErrNotImplemented
+}
+
+func (s *userRelationSrv) IsMyFollow(userId int64, followIds ...int64) (map[int64]bool, error) {
+ // TODO
+ return nil, cs.ErrNotImplemented
+}
+
func newUserManageService(db *sqlx.DB) (s core.UserManageService) {
ums := &userManageSrv{
sqlxSrv: newSqlxSrv(db),
@@ -92,3 +117,9 @@ func newUserManageService(db *sqlx.DB) (s core.UserManageService) {
}
return
}
+
+func newUserRelationService(db *sqlx.DB) core.UserRelationService {
+ return &userRelationSrv{
+ sqlxSrv: newSqlxSrv(db),
+ }
+}
diff --git a/internal/events/events.go b/internal/events/events.go
index 672e1b9a..69a976ea 100644
--- a/internal/events/events.go
+++ b/internal/events/events.go
@@ -16,7 +16,7 @@ import (
var (
_defaultEventManager EventManager
- _defaultJobManager JobManager
+ _defaultJobManager JobManager = emptyJobManager{}
_onceInitial sync.Once
)
diff --git a/internal/events/jobs.go b/internal/events/jobs.go
index 27b73cac..40dc30eb 100644
--- a/internal/events/jobs.go
+++ b/internal/events/jobs.go
@@ -6,6 +6,7 @@ package events
import (
"github.com/robfig/cron/v3"
+ "github.com/rocboss/paopao-ce/pkg/types"
)
type (
@@ -38,31 +39,49 @@ type JobManager interface {
Schedule(Job) EntryID
}
-type jobManager struct {
+type emptyJobManager types.Empty
+
+type simpleJobManager struct {
m *cron.Cron
}
-func (j *jobManager) Start() {
+func (emptyJobManager) Start() {
+ // nothing
+}
+
+func (emptyJobManager) Stop() {
+ // nothing
+}
+
+func (emptyJobManager) Remove(id EntryID) {
+ // nothing
+}
+
+func (emptyJobManager) Schedule(job Job) EntryID {
+ return 0
+}
+
+func (j *simpleJobManager) Start() {
j.m.Start()
}
-func (j *jobManager) Stop() {
+func (j *simpleJobManager) Stop() {
j.m.Stop()
}
// Remove an entry from being run in the future.
-func (j *jobManager) Remove(id EntryID) {
+func (j *simpleJobManager) Remove(id EntryID) {
j.m.Remove(id)
}
// Schedule adds a Job to the Cron to be run on the given schedule.
// The job is wrapped with the configured Chain.
-func (j *jobManager) Schedule(job Job) EntryID {
+func (j *simpleJobManager) Schedule(job Job) EntryID {
return j.m.Schedule(job, job)
}
func NewJobManager() JobManager {
- return &jobManager{
+ return &simpleJobManager{
m: cron.New(),
}
}
diff --git a/internal/metrics/prometheus/metrics.go b/internal/metrics/prometheus/metrics.go
new file mode 100644
index 00000000..d7c073b1
--- /dev/null
+++ b/internal/metrics/prometheus/metrics.go
@@ -0,0 +1,57 @@
+// 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 prometheus
+
+import (
+ "github.com/prometheus/client_golang/prometheus"
+ "github.com/rocboss/paopao-ce/internal/conf"
+ "github.com/rocboss/paopao-ce/internal/core"
+ "github.com/sirupsen/logrus"
+)
+
+type metrics struct {
+ siteInfo *prometheus.GaugeVec
+ ds core.DataService
+ wc core.WebCache
+}
+
+func (m *metrics) updateSiteInfo() {
+ if onlineUserKeys, err := m.wc.Keys(conf.PrefixOnlineUser + "*"); err == nil {
+ maxOnline := len(onlineUserKeys)
+ m.siteInfo.With(prometheus.Labels{"name": "max_online"}).Set(float64(maxOnline))
+ } else {
+ logrus.Warnf("update promethues metrics[site_info_max_online] occurs error: %s", err)
+ }
+ if registerUserCount, err := m.ds.GetRegisterUserCount(); err == nil {
+ m.siteInfo.With(prometheus.Labels{"name": "register_user_count"}).Set(float64(registerUserCount))
+ } else {
+ logrus.Warnf("update promethues metrics[site_info_register_user_count] occurs error: %s", err)
+ }
+}
+
+func (m *metrics) onUpdate() {
+ logrus.Debugf("update promethues metrics job running")
+ m.updateSiteInfo()
+}
+
+func newMetrics(reg prometheus.Registerer, ds core.DataService, wc core.WebCache) *metrics {
+ m := &metrics{
+ siteInfo: prometheus.NewGaugeVec(
+ prometheus.GaugeOpts{
+ Namespace: "paopao",
+ Subsystem: "site",
+ Name: "simple_info",
+ Help: "paopao-ce site simple information.",
+ },
+ []string{
+ // metric name
+ "name",
+ }),
+ ds: ds,
+ wc: wc,
+ }
+ reg.MustRegister(m.siteInfo)
+ return m
+}
diff --git a/internal/metrics/prometheus/prometheus.go b/internal/metrics/prometheus/prometheus.go
new file mode 100644
index 00000000..f9764464
--- /dev/null
+++ b/internal/metrics/prometheus/prometheus.go
@@ -0,0 +1,41 @@
+// 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 prometheus
+
+import (
+ "net/http"
+
+ "github.com/prometheus/client_golang/prometheus"
+ "github.com/prometheus/client_golang/prometheus/collectors"
+ "github.com/prometheus/client_golang/prometheus/promhttp"
+ "github.com/robfig/cron/v3"
+ "github.com/rocboss/paopao-ce/internal/conf"
+ "github.com/rocboss/paopao-ce/internal/core"
+ "github.com/rocboss/paopao-ce/internal/events"
+ "github.com/sirupsen/logrus"
+)
+
+func scheduleJobs(metrics *metrics) {
+ spec := conf.JobManagerSetting.UpdateMetricsInterval
+ schedule, err := cron.ParseStandard(spec)
+ if err != nil {
+ panic(err)
+ }
+ events.OnTask(schedule, metrics.onUpdate)
+ logrus.Debug("shedule prometheus metrics update jobs complete")
+}
+
+func NewHandler(ds core.DataService, wc core.WebCache) http.Handler {
+ // Create non-global registry.
+ registry := prometheus.NewRegistry()
+ // Add go runtime metrics and process collectors.
+ registry.MustRegister(
+ collectors.NewGoCollector(),
+ collectors.NewProcessCollector(collectors.ProcessCollectorOpts{}),
+ )
+ metrics := newMetrics(registry, ds, wc)
+ scheduleJobs(metrics)
+ return promhttp.HandlerFor(registry, promhttp.HandlerOpts{EnableOpenMetrics: true})
+}
diff --git a/internal/model/web/loose.go b/internal/model/web/loose.go
index 50b1502a..419a573a 100644
--- a/internal/model/web/loose.go
+++ b/internal/model/web/loose.go
@@ -7,8 +7,10 @@ package web
import (
"github.com/alimy/mir/v4"
"github.com/gin-gonic/gin"
+ "github.com/rocboss/paopao-ce/internal/conf"
"github.com/rocboss/paopao-ce/internal/core"
"github.com/rocboss/paopao-ce/internal/core/cs"
+ "github.com/rocboss/paopao-ce/internal/core/ms"
"github.com/rocboss/paopao-ce/internal/model/joint"
"github.com/rocboss/paopao-ce/internal/servants/base"
"github.com/rocboss/paopao-ce/pkg/app"
@@ -45,7 +47,9 @@ type TweetCommentsReq struct {
PageSize int `form:"-" binding:"-"`
}
-type TweetCommentsResp base.PageResp
+type TweetCommentsResp struct {
+ joint.CachePageResp
+}
type TimelineReq struct {
BaseInfo `form:"-" binding:"-"`
@@ -106,6 +110,13 @@ type TopicListResp struct {
ExtralTopics cs.TagList `json:"extral_topics,omitempty"`
}
+type TweetDetailReq struct {
+ SimpleInfo `form:"-" binding:"-"`
+ TweetId int64 `form:"id"`
+}
+
+type TweetDetailResp ms.PostFormated
+
func (r *GetUserTweetsReq) SetPageInfo(page int, pageSize int) {
r.Page, r.PageSize = page, pageSize
}
@@ -137,3 +148,17 @@ func (s CommentStyleType) ToInnerValue() (res cs.StyleCommentType) {
}
return
}
+
+func (s CommentStyleType) String() (res string) {
+ switch s {
+ case "default":
+ res = conf.InfixCommentDefault
+ case "hots":
+ res = conf.InfixCommentHots
+ case "newest":
+ res = conf.InfixCommentNewest
+ default:
+ res = "_"
+ }
+ return
+}
diff --git a/internal/model/web/priv.go b/internal/model/web/priv.go
index 93f38034..239799f6 100644
--- a/internal/model/web/priv.go
+++ b/internal/model/web/priv.go
@@ -147,6 +147,16 @@ type DeleteCommentReq struct {
BaseInfo `json:"-" binding:"-"`
ID int64 `json:"id" binding:"required"`
}
+
+type HighlightCommentReq struct {
+ SimpleInfo `json:"-" binding:"-"`
+ CommentId int64 `json:"id" binding:"required"`
+}
+
+type HighlightCommentResp struct {
+ HighlightStatus int8 `json:"highlight_status"`
+}
+
type DeleteCommentReplyReq struct {
BaseInfo `json:"-" binding:"-"`
ID int64 `json:"id" binding:"required"`
diff --git a/internal/model/web/pub.go b/internal/model/web/pub.go
index 058288e8..223509d2 100644
--- a/internal/model/web/pub.go
+++ b/internal/model/web/pub.go
@@ -5,16 +5,9 @@
package web
import (
- "github.com/rocboss/paopao-ce/internal/core/ms"
"github.com/rocboss/paopao-ce/pkg/version"
)
-type TweetDetailReq struct {
- TweetId int64 `form:"id"`
-}
-
-type TweetDetailResp ms.PostFormated
-
type GetCaptchaResp struct {
Id string `json:"id"`
Content string `json:"b64s"`
diff --git a/internal/model/web/xerror.go b/internal/model/web/xerror.go
index 0e745930..0a9110e6 100644
--- a/internal/model/web/xerror.go
+++ b/internal/model/web/xerror.go
@@ -50,14 +50,15 @@ var (
ErrGetPostsUnknowStyle = xerror.NewError(30014, "使用未知样式参数获取动态列表")
ErrGetPostsNilUser = xerror.NewError(30015, "使用游客账户获取动态详情失败")
- ErrGetCommentsFailed = xerror.NewError(40001, "获取评论列表失败")
- ErrCreateCommentFailed = xerror.NewError(40002, "评论发布失败")
- ErrGetCommentFailed = xerror.NewError(40003, "获取评论详情失败")
- ErrDeleteCommentFailed = xerror.NewError(40004, "评论删除失败")
- ErrCreateReplyFailed = xerror.NewError(40005, "评论回复失败")
- ErrGetReplyFailed = xerror.NewError(40006, "获取评论详情失败")
- ErrMaxCommentCount = xerror.NewError(40007, "评论数已达最大限制")
- ErrGetCommentThumbs = xerror.NewError(40008, "获取评论点赞信息失败")
+ ErrGetCommentsFailed = xerror.NewError(40001, "获取评论列表失败")
+ ErrCreateCommentFailed = xerror.NewError(40002, "评论发布失败")
+ ErrGetCommentFailed = xerror.NewError(40003, "获取评论详情失败")
+ ErrDeleteCommentFailed = xerror.NewError(40004, "评论删除失败")
+ ErrCreateReplyFailed = xerror.NewError(40005, "评论回复失败")
+ ErrGetReplyFailed = xerror.NewError(40006, "获取评论详情失败")
+ ErrMaxCommentCount = xerror.NewError(40007, "评论数已达最大限制")
+ ErrGetCommentThumbs = xerror.NewError(40008, "获取评论点赞信息失败")
+ ErrHighlightCommentFailed = xerror.NewError(40009, "设置精选评论失败")
ErrGetMessagesFailed = xerror.NewError(50001, "获取消息列表失败")
ErrReadMessageFailed = xerror.NewError(50002, "标记消息已读失败")
diff --git a/internal/servants/base/base.go b/internal/servants/base/base.go
index 674c08de..4edf5e03 100644
--- a/internal/servants/base/base.go
+++ b/internal/servants/base/base.go
@@ -24,6 +24,7 @@ import (
"github.com/rocboss/paopao-ce/internal/events"
"github.com/rocboss/paopao-ce/internal/model/joint"
"github.com/rocboss/paopao-ce/pkg/app"
+ "github.com/rocboss/paopao-ce/pkg/types"
"github.com/rocboss/paopao-ce/pkg/xerror"
)
@@ -172,6 +173,109 @@ func (s *BaseServant) Render(c *gin.Context, data any, err mir.Error) {
}
}
+func (s *DaoServant) PrepareUser(userId int64, user *ms.UserFormated) error {
+ // guest用户的userId<0
+ if userId < 0 {
+ return nil
+ }
+ // friendMap, err := s.Ds.IsMyFriend(userId, user.ID)
+ // if err != nil {
+ // return err
+ // }
+ followMap, err := s.Ds.IsMyFollow(userId, user.ID)
+ if err != nil {
+ return err
+ }
+ // user.IsFriend, user.IsFollowing = friendMap[user.ID], followMap[user.ID]
+ user.IsFollowing = followMap[user.ID]
+ return nil
+}
+
+func (s *DaoServant) PrepareMessages(userId int64, messages []*ms.MessageFormated) error {
+ // guest用户的userId<0
+ if userId < 0 {
+ return nil
+ }
+ userIds := make([]int64, 0, len(messages))
+ for _, msg := range messages {
+ if msg.SenderUser != nil {
+ userIds = append(userIds, msg.SenderUserID)
+ }
+ if msg.ReceiverUser != nil {
+ userIds = append(userIds, msg.ReceiverUserID)
+ }
+ }
+ // friendMap, err := s.Ds.IsMyFriend(userId, userIds...)
+ // if err != nil {
+ // return err
+ // }
+ followMap, err := s.Ds.IsMyFollow(userId, userIds...)
+ if err != nil {
+ return err
+ }
+ for _, msg := range messages {
+ if msg.SenderUser != nil {
+ // msg.SenderUser.IsFriend, msg.SenderUser.IsFollowing = friendMap[msg.SenderUserID], followMap[msg.SenderUserID]
+ msg.SenderUser.IsFollowing = followMap[msg.SenderUserID]
+ }
+ if msg.ReceiverUser != nil {
+ // msg.ReceiverUser.IsFriend, msg.ReceiverUser.IsFollowing = friendMap[msg.ReceiverUserID], followMap[msg.ReceiverUserID]
+ msg.ReceiverUser.IsFollowing = followMap[msg.ReceiverUserID]
+ }
+ }
+ return nil
+}
+
+func (s *DaoServant) PrepareTweet(userId int64, tweet *ms.PostFormated) error {
+ // 转换一下可见性的值
+ tweet.Visibility = ms.PostVisibleT(tweet.Visibility.ToOutValue())
+ // guest用户的userId<0
+ if userId < 0 {
+ return nil
+ }
+ // friendMap, err := s.Ds.IsMyFriend(userId, userIds)
+ // if err != nil {
+ // return err
+ // }
+ followMap, err := s.Ds.IsMyFollow(userId, tweet.UserID)
+ if err != nil {
+ return err
+ }
+ // tweet.User.IsFriend, tweet.User.IsFollowing = friendMap[tweet.UserID], followMap[tweet.UserID]
+ tweet.User.IsFollowing = followMap[tweet.UserID]
+ return nil
+}
+
+func (s *DaoServant) PrepareTweets(userId int64, tweets []*ms.PostFormated) error {
+ userIdSet := make(map[int64]types.Empty, len(tweets))
+ for _, tweet := range tweets {
+ userIdSet[tweet.UserID] = types.Empty{}
+ // 顺便转换一下可见性的值
+ tweet.Visibility = ms.PostVisibleT(tweet.Visibility.ToOutValue())
+ }
+ // guest用户的userId<0
+ if userId < 0 {
+ return nil
+ }
+ userIds := make([]int64, 0, len(userIdSet))
+ for id := range userIdSet {
+ userIds = append(userIds, id)
+ }
+ // friendMap, err := s.Ds.IsMyFriend(userId, userIds...)
+ // if err != nil {
+ // return err
+ // }
+ followMap, err := s.Ds.IsMyFollow(userId, userIds...)
+ if err != nil {
+ return err
+ }
+ for _, tweet := range tweets {
+ // tweet.User.IsFriend, tweet.User.IsFollowing = friendMap[tweet.UserID], followMap[tweet.UserID]
+ tweet.User.IsFollowing = followMap[tweet.UserID]
+ }
+ return nil
+}
+
func (s *DaoServant) GetTweetBy(id int64) (*ms.PostFormated, error) {
post, err := s.Ds.GetPostByID(id)
if err != nil {
@@ -278,15 +382,6 @@ func (s *DaoServant) DeleteSearchPost(post *ms.Post) error {
return s.Ts.DeleteDocuments([]string{fmt.Sprintf("%d", post.ID)})
}
-func (s *DaoServant) GetTweetList(conditions ms.ConditionsT, offset, limit int) ([]*ms.Post, []*ms.PostFormated, error) {
- posts, err := s.Ds.GetPosts(conditions, offset, limit)
- if err != nil {
- return nil, nil, err
- }
- postFormated, err := s.Ds.MergePosts(posts)
- return posts, postFormated, err
-}
-
func (s *DaoServant) RelationTypFrom(me *ms.User, username string) (res *cs.VistUser, err error) {
res = &cs.VistUser{
RelTyp: cs.RelationSelf,
diff --git a/internal/servants/web/core.go b/internal/servants/web/core.go
index d8e023f8..ab55dc9f 100644
--- a/internal/servants/web/core.go
+++ b/internal/servants/web/core.go
@@ -125,6 +125,10 @@ func (s *coreSrv) GetMessages(req *web.GetMessagesReq) (*web.GetMessagesResp, mi
logrus.Errorf("Ds.GetMessages err: %v\n", err)
return nil, web.ErrGetMessagesFailed
}
+ if err = s.PrepareMessages(req.UserId, messages); err != nil {
+ logrus.Errorf("get messages err[2]: %v\n", err)
+ return nil, web.ErrGetMessagesFailed
+ }
totalRows, _ := s.Ds.GetMessageCount(req.UserId)
resp := base.PageRespFrom(messages, req.Page, req.PageSize, totalRows)
return (*web.GetMessagesResp)(resp), nil
@@ -192,7 +196,6 @@ func (s *coreSrv) GetCollections(req *web.GetCollectionsReq) (*web.GetCollection
logrus.Errorf("Ds.GetUserPostCollectionCount err: %s", err)
return nil, web.ErrGetCollectionsFailed
}
-
var posts []*ms.Post
for _, collection := range collections {
posts = append(posts, collection.Post)
@@ -202,8 +205,11 @@ func (s *coreSrv) GetCollections(req *web.GetCollectionsReq) (*web.GetCollection
logrus.Errorf("Ds.MergePosts err: %s", err)
return nil, web.ErrGetCollectionsFailed
}
+ if err = s.PrepareTweets(req.UserId, postsFormated); err != nil {
+ logrus.Errorf("get collections prepare tweets err: %s", err)
+ return nil, web.ErrGetCollectionsFailed
+ }
resp := base.PageRespFrom(postsFormated, req.Page, req.PageSize, totalRows)
-
return (*web.GetCollectionsResp)(resp), nil
}
diff --git a/internal/servants/web/events.go b/internal/servants/web/events.go
index f3879d5e..82db8c9d 100644
--- a/internal/servants/web/events.go
+++ b/internal/servants/web/events.go
@@ -9,13 +9,26 @@ import (
"fmt"
"github.com/alimy/tryst/event"
+ "github.com/rocboss/paopao-ce/internal/conf"
"github.com/rocboss/paopao-ce/internal/core"
+ "github.com/rocboss/paopao-ce/internal/core/cs"
"github.com/rocboss/paopao-ce/internal/core/ms"
"github.com/rocboss/paopao-ce/internal/events"
"github.com/rocboss/paopao-ce/internal/model/joint"
"github.com/rocboss/paopao-ce/internal/model/web"
)
+const (
+ _commentActionCreate uint8 = iota
+ _commentActionDelete
+ _commentActionThumbsUp
+ _commentActionThumbsDown
+ _commentActionReplyCreate
+ _commentActionReplyDelete
+ _commentActionReplyThumbsUp
+ _commentActionReplyThumbsDown
+)
+
type cacheUnreadMsgEvent struct {
event.UnimplementedEvent
ds core.DataService
@@ -30,6 +43,25 @@ type createMessageEvent struct {
message *ms.Message
}
+type commentActionEvent struct {
+ event.UnimplementedEvent
+ ds core.DataService
+ ac core.AppCache
+ tweetId int64
+ commentId int64
+ action uint8
+}
+
+func onCommentActionEvent(tweetId int64, commentId int64, action uint8) {
+ events.OnEvent(&commentActionEvent{
+ ds: _ds,
+ ac: _ac,
+ tweetId: tweetId,
+ commentId: commentId,
+ action: action,
+ })
+}
+
func onCacheUnreadMsgEvent(uid int64) {
events.OnEvent(&cacheUnreadMsgEvent{
ds: _ds,
@@ -86,3 +118,51 @@ func (e *createMessageEvent) Action() (err error) {
}
return
}
+
+func (e *commentActionEvent) Name() string {
+ return "updateCommentMetricEvent"
+}
+
+func (e *commentActionEvent) Action() (err error) {
+ // logrus.Debugf("trigger commentActionEvent action commentId[%d]", e.commentId)
+ switch e.action {
+ case _commentActionCreate:
+ err = e.ds.AddCommentMetric(e.commentId)
+ e.expireAllStyleComments()
+ case _commentActionDelete:
+ err = e.ds.DeleteCommentMetric(e.commentId)
+ e.expireAllStyleComments()
+ case _commentActionReplyCreate, _commentActionReplyDelete:
+ err = e.updateCommentMetric()
+ e.expireAllStyleComments()
+ case _commentActionThumbsUp, _commentActionThumbsDown:
+ err = e.updateCommentMetric()
+ e.expireHotsComments()
+ default:
+ // nothing
+ }
+ return
+}
+
+func (e *commentActionEvent) expireHotsComments() {
+ e.ac.DelAny(fmt.Sprintf("%s%d:%s:*", conf.PrefixTweetComment, e.tweetId, conf.InfixCommentHots))
+}
+
+func (e *commentActionEvent) expireAllStyleComments() {
+ e.ac.DelAny(fmt.Sprintf("%s%d:*", conf.PrefixTweetComment, e.tweetId))
+}
+
+func (e *commentActionEvent) updateCommentMetric() error {
+ // logrus.Debug("trigger commentActionEvent action[updateCommentMetric]")
+ comment, err := e.ds.GetCommentByID(e.commentId)
+ if err != nil {
+ return err
+ }
+ e.ds.UpdateCommentMetric(&cs.CommentMetric{
+ CommentId: e.commentId,
+ ReplyCount: comment.ReplyCount,
+ ThumbsUpCount: comment.ThumbsUpCount,
+ ThumbsDownCount: comment.ThumbsDownCount,
+ })
+ return nil
+}
diff --git a/internal/servants/web/followship.go b/internal/servants/web/followship.go
index def1e10e..d9786d2a 100644
--- a/internal/servants/web/followship.go
+++ b/internal/servants/web/followship.go
@@ -8,6 +8,7 @@ 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/dao/cache"
"github.com/rocboss/paopao-ce/internal/model/web"
"github.com/rocboss/paopao-ce/internal/servants/base"
"github.com/rocboss/paopao-ce/internal/servants/chain"
@@ -84,6 +85,9 @@ func (s *followshipSrv) UnfollowUser(r *web.UnfollowUserReq) mir.Error {
logrus.Errorf("Ds.UnfollowUser err: %s userId: %d followId: %d", err, r.User.ID, r.UserId)
return web.ErrUnfollowUserFailed
}
+ // 触发缓存更新事件
+ cache.OnCacheMyFollowIdsEvent(s.Ds, r.User.ID)
+ cache.OnExpireIndexTweetEvent(r.User.ID)
return nil
}
@@ -97,6 +101,9 @@ func (s *followshipSrv) FollowUser(r *web.FollowUserReq) mir.Error {
logrus.Errorf("Ds.FollowUser err: %s userId: %d followId: %d", err, r.User.ID, r.UserId)
return web.ErrUnfollowUserFailed
}
+ // 触发缓存更新事件
+ cache.OnCacheMyFollowIdsEvent(s.Ds, r.User.ID)
+ cache.OnExpireIndexTweetEvent(r.User.ID)
return nil
}
diff --git a/internal/servants/web/friendship.go b/internal/servants/web/friendship.go
index 4a419666..fe533c38 100644
--- a/internal/servants/web/friendship.go
+++ b/internal/servants/web/friendship.go
@@ -55,6 +55,8 @@ func (s *friendshipSrv) DeleteFriend(req *web.DeleteFriendReq) mir.Error {
logrus.Errorf("Ds.DeleteFriend err: %s", err)
return web.ErrDeleteFriendFailed
}
+ // 触发用户关系缓存更新事件
+ // cache.OnCacheMyFriendIdsEvent(s.Ds, req.User.ID, req.UserId)
return nil
}
@@ -89,6 +91,8 @@ func (s *friendshipSrv) AddFriend(req *web.AddFriendReq) mir.Error {
logrus.Errorf("Ds.AddFriend err: %s", err)
return web.ErrAddFriendFailed
}
+ // 触发用户关系缓存更新事件
+ // cache.OnCacheMyFriendIdsEvent(s.Ds, req.User.ID, req.UserId)
return nil
}
diff --git a/internal/servants/web/loose.go b/internal/servants/web/loose.go
index cb0be450..f8caef9f 100644
--- a/internal/servants/web/loose.go
+++ b/internal/servants/web/loose.go
@@ -32,10 +32,12 @@ type looseSrv struct {
ac core.AppCache
userTweetsExpire int64
idxTweetsExpire int64
+ tweetCommentsExpire int64
prefixUserTweets string
prefixIdxTweetsNewest string
prefixIdxTweetsHots string
prefixIdxTweetsFollowing string
+ prefixTweetComment string
}
func (s *looseSrv) Chain() gin.HandlersChain {
@@ -61,8 +63,14 @@ func (s *looseSrv) Timeline(req *web.TimelineReq) (*web.TimelineResp, mir.Error)
logrus.Errorf("Ds.RevampPosts err: %s", err)
return nil, web.ErrGetPostsFailed
}
- // TODO: 暂时处理,需要去掉这个步骤
- visbleTansform(posts)
+ userId := int64(-1)
+ if req.User != nil {
+ userId = req.User.ID
+ }
+ if err := s.PrepareTweets(userId, posts); err != nil {
+ logrus.Errorf("timeline occurs error[2]: %s", err)
+ return nil, web.ErrGetPostsFailed
+ }
resp := joint.PageRespFrom(posts, req.Page, req.PageSize, res.Total)
return &web.TimelineResp{
CachePageResp: joint.CachePageResp{
@@ -98,7 +106,7 @@ func (s *looseSrv) getIndexTweets(req *web.TimelineReq, limit int, offset int) (
return nil, web.ErrGetPostsUnknowStyle
}
if xerr != nil {
- logrus.Errorf("getIndexTweets occurs error: %s", xerr)
+ logrus.Errorf("getIndexTweets occurs error[1]: %s", xerr)
return nil, web.ErrGetPostFailed
}
postsFormated, verr := s.Ds.MergePosts(posts)
@@ -106,8 +114,14 @@ func (s *looseSrv) getIndexTweets(req *web.TimelineReq, limit int, offset int) (
logrus.Errorf("getIndexTweets in merge posts occurs error: %s", verr)
return nil, web.ErrGetPostFailed
}
- // TODO: 暂时处理,需要去掉这个步骤
- visbleTansform(postsFormated)
+ userId := int64(-1)
+ if req.User != nil {
+ userId = req.User.ID
+ }
+ if err := s.PrepareTweets(userId, postsFormated); err != nil {
+ logrus.Errorf("getIndexTweets occurs error[2]: %s", err)
+ return nil, web.ErrGetPostsFailed
+ }
resp := joint.PageRespFrom(postsFormated, req.Page, req.PageSize, total)
// 缓存处理
base.OnCacheRespEvent(s.ac, key, resp, s.idxTweetsExpire)
@@ -119,17 +133,17 @@ func (s *looseSrv) getIndexTweets(req *web.TimelineReq, limit int, offset int) (
}
func (s *looseSrv) indexTweetsFromCache(req *web.TimelineReq, limit int, offset int) (res *web.TimelineResp, key string, ok bool) {
+ username := "_"
+ if req.User != nil {
+ username = req.User.Username
+ }
switch req.Style {
case web.StyleTweetsFollowing:
- username := "_"
- if req.User != nil {
- username = req.User.Username
- }
key = fmt.Sprintf("%s%s:%d:%d", s.prefixIdxTweetsFollowing, username, offset, limit)
case web.StyleTweetsNewest:
- key = fmt.Sprintf("%s%d:%d", s.prefixIdxTweetsNewest, offset, limit)
+ key = fmt.Sprintf("%s%s:%d:%d", s.prefixIdxTweetsNewest, username, offset, limit)
case web.StyleTweetsHots:
- key = fmt.Sprintf("%s%d:%d", s.prefixIdxTweetsHots, offset, limit)
+ key = fmt.Sprintf("%s%s:%d:%d", s.prefixIdxTweetsHots, username, offset, limit)
default:
return
}
@@ -143,6 +157,18 @@ func (s *looseSrv) indexTweetsFromCache(req *web.TimelineReq, limit int, offset
return
}
+func (s *looseSrv) tweetCommentsFromCache(req *web.TweetCommentsReq, limit int, offset int) (res *web.TweetCommentsResp, key string, ok bool) {
+ key = fmt.Sprintf("%s%d:%s:%d:%d", s.prefixTweetComment, req.TweetId, req.Style, limit, offset)
+ if data, err := s.ac.Get(key); err == nil {
+ ok, res = true, &web.TweetCommentsResp{
+ CachePageResp: joint.CachePageResp{
+ JsonResp: data,
+ },
+ }
+ }
+ return
+}
+
func (s *looseSrv) GetUserTweets(req *web.GetUserTweetsReq) (res *web.GetUserTweetsResp, err mir.Error) {
user, xerr := s.RelationTypFrom(req.User, req.Username)
if xerr != nil {
@@ -198,7 +224,7 @@ func (s *looseSrv) userTweetsFromCache(req *web.GetUserTweetsReq, user *cs.VistU
func (s *looseSrv) getUserStarTweets(req *web.GetUserTweetsReq, user *cs.VistUser) (*web.GetUserTweetsResp, mir.Error) {
stars, totalRows, err := s.Ds.ListUserStarTweets(user, req.PageSize, (req.Page-1)*req.PageSize)
if err != nil {
- logrus.Errorf("Ds.GetUserPostStars err: %s", err)
+ logrus.Errorf("getUserStarTweets err[1]: %s", err)
return nil, web.ErrGetStarsFailed
}
var posts []*ms.Post
@@ -212,8 +238,14 @@ func (s *looseSrv) getUserStarTweets(req *web.GetUserTweetsReq, user *cs.VistUse
logrus.Errorf("Ds.MergePosts err: %s", err)
return nil, web.ErrGetStarsFailed
}
- // TODO: 暂时处理,需要去掉这个步骤
- visbleTansform(postsFormated)
+ userId := int64(-1)
+ if req.User != nil {
+ userId = req.User.ID
+ }
+ if err := s.PrepareTweets(userId, postsFormated); err != nil {
+ logrus.Errorf("getUserStarTweets err[2]: %s", err)
+ return nil, web.ErrGetPostsFailed
+ }
resp := joint.PageRespFrom(postsFormated, req.Page, req.PageSize, totalRows)
return &web.GetUserTweetsResp{
CachePageResp: joint.CachePageResp{
@@ -233,21 +265,27 @@ func (s *looseSrv) listUserTweets(req *web.GetUserTweetsReq, user *cs.VistUser)
} else if req.Style == web.UserPostsStyleMedia {
tweets, total, err = s.Ds.ListUserMediaTweets(user, req.PageSize, (req.Page-1)*req.PageSize)
} else {
- logrus.Errorf("s.listUserTweets unknow style: %s", req.Style)
+ logrus.Errorf("s.listUserTweets unknow style[1]: %s", req.Style)
return nil, web.ErrGetPostsFailed
}
if err != nil {
- logrus.Errorf("s.listUserTweets err: %s", err)
+ logrus.Errorf("s.listUserTweets err[2]: %s", err)
return nil, web.ErrGetPostsFailed
}
- postFormated, err := s.Ds.MergePosts(tweets)
+ postsFormated, err := s.Ds.MergePosts(tweets)
if err != nil {
- logrus.Errorf("s.listUserTweets err: %s", err)
+ logrus.Errorf("s.listUserTweets err[3]: %s", err)
return nil, web.ErrGetPostsFailed
}
- // TODO: 暂时处理,需要去掉这个步骤
- visbleTansform(postFormated)
- resp := joint.PageRespFrom(postFormated, req.Page, req.PageSize, total)
+ userId := int64(-1)
+ if req.User != nil {
+ userId = req.User.ID
+ }
+ if err := s.PrepareTweets(userId, postsFormated); err != nil {
+ logrus.Errorf("s.listUserTweets err[4]: %s", err)
+ return nil, web.ErrGetPostsFailed
+ }
+ resp := joint.PageRespFrom(postsFormated, req.Page, req.PageSize, total)
return &web.GetUserTweetsResp{
CachePageResp: joint.CachePageResp{
Data: resp,
@@ -281,8 +319,14 @@ func (s *looseSrv) getUserPostTweets(req *web.GetUserTweetsReq, user *cs.VistUse
logrus.Errorf("s.GetTweetList error[2]: %s", err)
return nil, web.ErrGetPostsFailed
}
- // TODO: 暂时处理,需要去掉这个步骤
- visbleTansform(postsFormated)
+ userId := int64(-1)
+ if req.User != nil {
+ userId = req.User.ID
+ }
+ if err := s.PrepareTweets(userId, postsFormated); err != nil {
+ logrus.Errorf("s.GetTweetList error[3]: %s", err)
+ return nil, web.ErrGetPostsFailed
+ }
resp := joint.PageRespFrom(postsFormated, req.Page, req.PageSize, total)
return &web.GetUserTweetsResp{
CachePageResp: joint.CachePageResp{
@@ -364,10 +408,18 @@ func (s *looseSrv) TopicList(req *web.TopicListReq) (*web.TopicListResp, mir.Err
}, nil
}
-func (s *looseSrv) TweetComments(req *web.TweetCommentsReq) (*web.TweetCommentsResp, mir.Error) {
- comments, totalRows, err := s.Ds.GetComments(req.TweetId, req.Style.ToInnerValue(), req.PageSize, (req.Page-1)*req.PageSize)
- if err != nil {
- logrus.Errorf("get tweet comments error[1]: %s", err)
+func (s *looseSrv) TweetComments(req *web.TweetCommentsReq) (res *web.TweetCommentsResp, err mir.Error) {
+ limit, offset := req.PageSize, (req.Page-1)*req.PageSize
+ // 尝试直接从缓存中获取数据
+ key, ok := "", false
+ if res, key, ok = s.tweetCommentsFromCache(req, limit, offset); ok {
+ logrus.Debugf("looseSrv.TweetComments from cache key:%s", key)
+ return
+ }
+
+ comments, totalRows, xerr := s.Ds.GetComments(req.TweetId, req.Style.ToInnerValue(), limit, offset)
+ if xerr != nil {
+ logrus.Errorf("looseSrv.TweetComments occurs error[1]: %s", xerr)
return nil, web.ErrGetCommentsFailed
}
@@ -378,29 +430,29 @@ func (s *looseSrv) TweetComments(req *web.TweetCommentsReq) (*web.TweetCommentsR
commentIDs = append(commentIDs, comment.ID)
}
- users, err := s.Ds.GetUsersByIDs(userIDs)
- if err != nil {
- logrus.Errorf("get tweet comments error[2]: %s", err)
+ users, xerr := s.Ds.GetUsersByIDs(userIDs)
+ if xerr != nil {
+ logrus.Errorf("looseSrv.TweetComments occurs error[2]: %s", xerr)
return nil, web.ErrGetCommentsFailed
}
- contents, err := s.Ds.GetCommentContentsByIDs(commentIDs)
- if err != nil {
- logrus.Errorf("get tweet comments error[3]: %s", err)
+ contents, xerr := s.Ds.GetCommentContentsByIDs(commentIDs)
+ if xerr != nil {
+ logrus.Errorf("looseSrv.TweetComments occurs error[3]: %s", xerr)
return nil, web.ErrGetCommentsFailed
}
- replies, err := s.Ds.GetCommentRepliesByID(commentIDs)
- if err != nil {
- logrus.Errorf("get tweet comments error[4]: %s", err)
+ replies, xerr := s.Ds.GetCommentRepliesByID(commentIDs)
+ if xerr != nil {
+ logrus.Errorf("looseSrv.TweetComments occurs error[4]: %s", xerr)
return nil, web.ErrGetCommentsFailed
}
var commentThumbs, replyThumbs cs.CommentThumbsMap
if req.Uid > 0 {
- commentThumbs, replyThumbs, err = s.Ds.GetCommentThumbsMap(req.Uid, req.TweetId)
- if err != nil {
- logrus.Errorf("get tweet comments error[5]: %s", err)
+ commentThumbs, replyThumbs, xerr = s.Ds.GetCommentThumbsMap(req.Uid, req.TweetId)
+ if xerr != nil {
+ logrus.Errorf("looseSrv.TweetComments occurs error[5]: %s", xerr)
return nil, web.ErrGetCommentsFailed
}
}
@@ -440,8 +492,41 @@ func (s *looseSrv) TweetComments(req *web.TweetCommentsReq) (*web.TweetCommentsR
}
commentsFormated = append(commentsFormated, commentFormated)
}
- resp := base.PageRespFrom(commentsFormated, req.Page, req.PageSize, totalRows)
- return (*web.TweetCommentsResp)(resp), nil
+ resp := joint.PageRespFrom(commentsFormated, req.Page, req.PageSize, totalRows)
+ // 缓存处理
+ base.OnCacheRespEvent(s.ac, key, resp, s.tweetCommentsExpire)
+ return &web.TweetCommentsResp{
+ CachePageResp: joint.CachePageResp{
+ Data: resp,
+ },
+ }, nil
+}
+
+func (s *looseSrv) TweetDetail(req *web.TweetDetailReq) (*web.TweetDetailResp, mir.Error) {
+ post, err := s.Ds.GetPostByID(req.TweetId)
+ if err != nil {
+ return nil, web.ErrGetPostFailed
+ }
+ postContents, err := s.Ds.GetPostContentsByIDs([]int64{post.ID})
+ if err != nil {
+ return nil, web.ErrGetPostFailed
+ }
+ users, err := s.Ds.GetUsersByIDs([]int64{post.UserID})
+ if err != nil {
+ return nil, web.ErrGetPostFailed
+ }
+ // 数据整合
+ postFormated := post.Format()
+ for _, user := range users {
+ postFormated.User = user.Format()
+ }
+ for _, content := range postContents {
+ if content.PostID == post.ID {
+ postFormated.Contents = append(postFormated.Contents, content.Format())
+ }
+ }
+ s.PrepareTweet(req.Uid, postFormated)
+ return (*web.TweetDetailResp)(postFormated), nil
}
func newLooseSrv(s *base.DaoServant, ac core.AppCache) api.Loose {
@@ -451,9 +536,11 @@ func newLooseSrv(s *base.DaoServant, ac core.AppCache) api.Loose {
ac: ac,
userTweetsExpire: cs.UserTweetsExpire,
idxTweetsExpire: cs.IndexTweetsExpire,
+ tweetCommentsExpire: cs.TweetCommentsExpire,
prefixUserTweets: conf.PrefixUserTweets,
prefixIdxTweetsNewest: conf.PrefixIdxTweetsNewest,
prefixIdxTweetsHots: conf.PrefixIdxTweetsHots,
prefixIdxTweetsFollowing: conf.PrefixIdxTweetsFollowing,
+ prefixTweetComment: conf.PrefixTweetComment,
}
}
diff --git a/internal/servants/web/priv.go b/internal/servants/web/priv.go
index 7716ce92..ecf52949 100644
--- a/internal/servants/web/priv.go
+++ b/internal/servants/web/priv.go
@@ -82,6 +82,8 @@ func (s *privSrv) ThumbsDownTweetComment(req *web.TweetCommentThumbsReq) mir.Err
logrus.Errorf("thumbs down tweet comment error: %s req:%v", err, req)
return web.ErrThumbsDownTweetComment
}
+ // 缓存处理
+ onCommentActionEvent(req.TweetId, req.CommentId, _commentActionThumbsDown)
return nil
}
@@ -90,6 +92,8 @@ func (s *privSrv) ThumbsUpTweetComment(req *web.TweetCommentThumbsReq) mir.Error
logrus.Errorf("thumbs up tweet comment error: %s req:%v", err, req)
return web.ErrThumbsUpTweetComment
}
+ // 缓存处理
+ onCommentActionEvent(req.TweetId, req.CommentId, _commentActionThumbsUp)
return nil
}
@@ -355,10 +359,14 @@ func (s *privSrv) DeleteCommentReply(req *web.DeleteCommentReplyReq) mir.Error {
logrus.Errorf("s.deletePostCommentReply err: %s", err)
return web.ErrDeleteCommentFailed
}
+ // 缓存处理, 宽松处理错误
+ if comment, err := s.Ds.GetCommentByID(reply.CommentID); err == nil {
+ onCommentActionEvent(comment.PostID, comment.ID, _commentActionReplyDelete)
+ }
return nil
}
-func (s *privSrv) CreateCommentReply(req *web.CreateCommentReplyReq) (*web.CreateCommentReplyResp, mir.Error) {
+func (s *privSrv) CreateCommentReply(req *web.CreateCommentReplyReq) (_ *web.CreateCommentReplyResp, xerr mir.Error) {
var (
post *ms.Post
comment *ms.Comment
@@ -435,6 +443,8 @@ func (s *privSrv) CreateCommentReply(req *web.CreateCommentReplyReq) (*web.Creat
})
}
}
+ // 缓存处理
+ onCommentActionEvent(comment.PostID, comment.ID, _commentActionReplyCreate)
return (*web.CreateCommentReplyResp)(reply), nil
}
@@ -463,9 +473,22 @@ func (s *privSrv) DeleteComment(req *web.DeleteCommentReq) mir.Error {
logrus.Errorf("Ds.DeleteComment err: %s", err)
return web.ErrDeleteCommentFailed
}
+ onCommentActionEvent(comment.PostID, comment.ID, _commentActionDelete)
return nil
}
+func (s *privSrv) HighlightComment(req *web.HighlightCommentReq) (*web.HighlightCommentResp, mir.Error) {
+ status, err := s.Ds.HighlightComment(req.Uid, req.CommentId)
+ if err == cs.ErrNoPermission {
+ return nil, web.ErrNoPermission
+ } else if err != nil {
+ return nil, web.ErrHighlightCommentFailed
+ }
+ return &web.HighlightCommentResp{
+ HighlightStatus: status,
+ }, nil
+}
+
func (s *privSrv) CreateComment(req *web.CreateCommentReq) (_ *web.CreateCommentResp, xerr mir.Error) {
var (
mediaContents []string
@@ -555,7 +578,8 @@ func (s *privSrv) CreateComment(req *web.CreateCommentReq) (_ *web.CreateComment
CommentID: comment.ID,
})
}
-
+ // 缓存处理
+ onCommentActionEvent(comment.PostID, comment.ID, _commentActionCreate)
return (*web.CreateCommentResp)(comment), nil
}
diff --git a/internal/servants/web/pub.go b/internal/servants/web/pub.go
index c2c1872e..a1611034 100644
--- a/internal/servants/web/pub.go
+++ b/internal/servants/web/pub.go
@@ -42,37 +42,6 @@ type pubSrv struct {
*base.DaoServant
}
-func (s *pubSrv) TweetDetail(req *web.TweetDetailReq) (*web.TweetDetailResp, mir.Error) {
- post, err := s.Ds.GetPostByID(req.TweetId)
- if err != nil {
- logrus.Errorf("get tweet detail error[1]: %s", err)
- return nil, web.ErrGetPostFailed
- }
- postContents, err := s.Ds.GetPostContentsByIDs([]int64{post.ID})
- if err != nil {
- logrus.Errorf("get tweet detail error[2]: %s", err)
- return nil, web.ErrGetPostFailed
- }
- users, err := s.Ds.GetUsersByIDs([]int64{post.UserID})
- if err != nil {
- logrus.Errorf("get tweet detail error[3]: %s", err)
- return nil, web.ErrGetPostFailed
- }
- // 数据整合
- postFormated := post.Format()
- for _, user := range users {
- postFormated.User = user.Format()
- }
- for _, content := range postContents {
- if content.PostID == post.ID {
- postFormated.Contents = append(postFormated.Contents, content.Format())
- }
- }
- // TODO: 暂时处理办法,后续需要优化去掉这个步骤
- postFormated.Visibility = ms.PostVisibleT(postFormated.Visibility.ToOutValue())
- return (*web.TweetDetailResp)(postFormated), nil
-}
-
func (s *pubSrv) SendCaptcha(req *web.SendCaptchaReq) mir.Error {
ctx := context.Background()
diff --git a/internal/servants/web/utils.go b/internal/servants/web/utils.go
index 00bb3ca6..0e2696e3 100644
--- a/internal/servants/web/utils.go
+++ b/internal/servants/web/utils.go
@@ -207,10 +207,3 @@ func checkPermision(user *ms.User, targetUserId int64) mir.Error {
}
return nil
}
-
-// visbleTansform 可见性等价转换,暂时处理方式,后续需要去掉这个步骤
-func visbleTansform(list []*ms.PostFormated) {
- for _, post := range list {
- post.Visibility = ms.PostVisibleT(post.Visibility.ToOutValue())
- }
-}
diff --git a/internal/service/http_service.go b/internal/service/http_service.go
index df93786c..0cc094df 100644
--- a/internal/service/http_service.go
+++ b/internal/service/http_service.go
@@ -15,7 +15,9 @@ type baseHttpService struct {
}
func (s *baseHttpService) registerRoute(srv Service, h func(e *gin.Engine)) {
- h(s.server.e)
+ if h != nil {
+ h(s.server.e)
+ }
s.server.addService(srv)
}
diff --git a/internal/service/metrics.go b/internal/service/metrics.go
new file mode 100644
index 00000000..d83a5fd4
--- /dev/null
+++ b/internal/service/metrics.go
@@ -0,0 +1,63 @@
+// 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 service
+
+import (
+ "fmt"
+ "net/http"
+
+ "github.com/Masterminds/semver/v3"
+ "github.com/fatih/color"
+ "github.com/rocboss/paopao-ce/internal/conf"
+ "github.com/rocboss/paopao-ce/internal/dao"
+ "github.com/rocboss/paopao-ce/internal/dao/cache"
+ "github.com/rocboss/paopao-ce/internal/metrics/prometheus"
+)
+
+var (
+ _ Service = (*metricsService)(nil)
+)
+
+type metricsService struct {
+ *baseHttpService
+}
+
+func (s *metricsService) Name() string {
+ return "MetricsService"
+}
+
+func (s *metricsService) Version() *semver.Version {
+ return semver.MustParse("v0.1.0")
+}
+
+func (s *metricsService) OnInit() error {
+ s.registerRoute(s, nil)
+ return nil
+}
+
+func (s *metricsService) String() string {
+ return fmt.Sprintf("listen on %s\n", color.GreenString("http://%s:%s", conf.MetricsServerSetting.HttpIp, conf.MetricsServerSetting.HttpPort))
+}
+
+func newMetricsService() Service {
+ addr := conf.MetricsServerSetting.HttpIp + ":" + conf.MetricsServerSetting.HttpPort
+ server := httpServers.from(addr, func() *httpServer {
+ ds, wc := dao.DataService(), cache.NewWebCache()
+ mux := http.NewServeMux()
+ mux.Handle("/metrics", prometheus.NewHandler(ds, wc))
+ return &httpServer{
+ baseServer: newBaseServe(),
+ server: &http.Server{
+ Addr: addr,
+ Handler: mux,
+ },
+ }
+ })
+ return &metricsService{
+ baseHttpService: &baseHttpService{
+ server: server,
+ },
+ }
+}
diff --git a/internal/service/pprof.go b/internal/service/pprof.go
index 80f8c07e..97501c32 100644
--- a/internal/service/pprof.go
+++ b/internal/service/pprof.go
@@ -10,7 +10,6 @@ import (
"github.com/Masterminds/semver/v3"
"github.com/fatih/color"
- "github.com/gin-gonic/gin"
"github.com/rocboss/paopao-ce/internal/conf"
)
@@ -31,7 +30,7 @@ func (s *pprofService) Version() *semver.Version {
}
func (s *pprofService) OnInit() error {
- s.registerRoute(s, func(*gin.Engine) {})
+ s.registerRoute(s, nil)
return nil
}
@@ -43,10 +42,8 @@ func newPprofService() Service {
addr := conf.PprofServerSetting.HttpIp + ":" + conf.PprofServerSetting.HttpPort
// notice this step just to register pprof server to start. don't share server with pprof.
server := httpServers.from(addr, func() *httpServer {
- engine := newWebEngine()
return &httpServer{
baseServer: newBaseServe(),
- e: engine,
server: &http.Server{
Addr: addr,
Handler: http.DefaultServeMux,
diff --git a/internal/service/service.go b/internal/service/service.go
index 28bf9766..d85692da 100644
--- a/internal/service/service.go
+++ b/internal/service/service.go
@@ -75,6 +75,9 @@ func newService() (ss []Service) {
"Pprof": func() {
ss = append(ss, newPprofService())
},
+ "Metrics": func() {
+ ss = append(ss, newMetricsService())
+ },
})
return
}
diff --git a/internal/service/web.go b/internal/service/web.go
index c158f732..ec1c353e 100644
--- a/internal/service/web.go
+++ b/internal/service/web.go
@@ -30,7 +30,7 @@ func (s *webService) Name() string {
}
func (s *webService) Version() *semver.Version {
- return semver.MustParse("v0.1.0")
+ return semver.MustParse("v0.5.0")
}
func (s *webService) OnInit() error {
diff --git a/mirc/web/v1/loose.go b/mirc/web/v1/loose.go
index a7fe6d7e..0c6ecf51 100644
--- a/mirc/web/v1/loose.go
+++ b/mirc/web/v1/loose.go
@@ -29,4 +29,7 @@ type Loose struct {
// TweetComments 获取动态评论
TweetComments func(Get, web.TweetCommentsReq) web.TweetCommentsResp `mir:"/post/comments"`
+
+ // TweetDetail 获取动态详情
+ TweetDetail func(Get, web.TweetDetailReq) web.TweetDetailResp `mir:"/post"`
}
diff --git a/mirc/web/v1/priv.go b/mirc/web/v1/priv.go
index 758afd31..414fb55d 100644
--- a/mirc/web/v1/priv.go
+++ b/mirc/web/v1/priv.go
@@ -54,6 +54,9 @@ type Priv struct {
// DeletePostComment 删除动态评论
DeleteComment func(Delete, web.DeleteCommentReq) `mir:"/post/comment"`
+ // HighlightComment 精选动态评论
+ HighlightComment func(Post, web.HighlightCommentReq) web.HighlightCommentResp `mir:"/post/comment/highlight"`
+
// CreateCommentReply 发布评论回复
CreateCommentReply func(Post, web.CreateCommentReplyReq) web.CreateCommentReplyResp `mir:"/post/comment/reply"`
@@ -66,7 +69,7 @@ type Priv struct {
// ThumbsDownTweetComment 点踩评论
ThumbsDownTweetComment func(Post, web.TweetCommentThumbsReq) `mir:"/tweet/comment/thumbsdown"`
- // ThumbsUpTweetReply 点赞评论回复
+ // ThumbsUpTweetReply 点赞评论回复·
ThumbsUpTweetReply func(Post, web.TweetReplyThumbsReq) `mir:"/tweet/reply/thumbsup"`
// ThumbsDownTweetReply 点踩评论回复
diff --git a/mirc/web/v1/pub.go b/mirc/web/v1/pub.go
index 89a90162..60fb182d 100644
--- a/mirc/web/v1/pub.go
+++ b/mirc/web/v1/pub.go
@@ -28,7 +28,4 @@ type Pub struct {
// SendCaptcha 发送验证码
SendCaptcha func(Post, web.SendCaptchaReq) `mir:"/captcha"`
-
- // TweetDetail 获取动态详情
- TweetDetail func(Get, web.TweetDetailReq) web.TweetDetailResp `mir:"/post"`
}
diff --git a/scripts/migration/mysql/0012_comment_essence.down.sql b/scripts/migration/mysql/0012_comment_essence.down.sql
new file mode 100644
index 00000000..3e98ff4d
--- /dev/null
+++ b/scripts/migration/mysql/0012_comment_essence.down.sql
@@ -0,0 +1 @@
+ALTER TABLE `p_comment` DROP COLUMN `is_essence`;
\ No newline at end of file
diff --git a/scripts/migration/mysql/0012_comment_essence.up.sql b/scripts/migration/mysql/0012_comment_essence.up.sql
new file mode 100644
index 00000000..229d6597
--- /dev/null
+++ b/scripts/migration/mysql/0012_comment_essence.up.sql
@@ -0,0 +1 @@
+ALTER TABLE `p_comment` ADD COLUMN `is_essence` tinyint unsigned NOT NULL DEFAULT 0 COMMENT '是否精选';
diff --git a/scripts/migration/mysql/0013_rank_metrics.down.sql b/scripts/migration/mysql/0013_rank_metrics.down.sql
new file mode 100644
index 00000000..1e53dea4
--- /dev/null
+++ b/scripts/migration/mysql/0013_rank_metrics.down.sql
@@ -0,0 +1,3 @@
+ALTER TABLE `p_comment` DROP COLUMN `reply_count`;
+DROP TABLE IF EXISTS `p_comment_metric`;
+DROP TABLE IF EXISTS `p_user_metric`;
diff --git a/scripts/migration/mysql/0013_rank_metrics.up.sql b/scripts/migration/mysql/0013_rank_metrics.up.sql
new file mode 100644
index 00000000..63122be1
--- /dev/null
+++ b/scripts/migration/mysql/0013_rank_metrics.up.sql
@@ -0,0 +1,48 @@
+ALTER TABLE `p_comment` ADD COLUMN `reply_count` int unsigned NOT NULL DEFAULT 0 COMMENT '回复数';
+
+UPDATE p_comment comment
+SET reply_count = (
+ SELECT count(*) FROM p_comment_reply reply WHERE reply.comment_id=comment.id AND reply.is_del=0
+)
+WHERE is_del=0;
+
+CREATE TABLE `p_comment_metric` (
+ `id` bigint unsigned NOT NULL AUTO_INCREMENT,
+ `comment_id` bigint unsigned NOT NULL,
+ `rank_score` bigint unsigned NOT NULL DEFAULT 0,
+ `incentive_score` int unsigned NOT NULL DEFAULT 0,
+ `decay_factor` int unsigned NOT NULL DEFAULT 0,
+ `motivation_factor` int unsigned NOT NULL DEFAULT 0,
+ `is_del` tinyint NOT NULL DEFAULT 0,
+ `created_on` bigint unsigned NOT NULL DEFAULT 0,
+ `modified_on` bigint unsigned NOT NULL DEFAULT 0,
+ `deleted_on` bigint unsigned NOT NULL DEFAULT 0,
+ PRIMARY KEY (`id`) USING BTREE,
+ KEY `idx_comment_metric_comment_id_rank_score` (`comment_id`, `rank_score`) USING BTREE
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
+
+INSERT INTO p_comment_metric (comment_id, rank_score, created_on)
+SELECT id AS comment_id,
+ reply_count*2 + thumbs_up_count*4 - thumbs_down_count AS rank_score,
+ created_on
+FROM p_comment
+WHERE is_del=0;
+
+CREATE TABLE `p_user_metric` (
+ `id` bigint unsigned NOT NULL AUTO_INCREMENT,
+ `user_id` bigint unsigned NOT NULL,
+ `tweets_count` int unsigned NOT NULL DEFAULT 0,
+ `latest_trends_on` bigint unsigned NOT NULL DEFAULT 0 COMMENT '最新动态时间',
+ `is_del` tinyint NOT NULL DEFAULT 0,
+ `created_on` bigint unsigned NOT NULL DEFAULT 0,
+ `modified_on` bigint unsigned NOT NULL DEFAULT 0,
+ `deleted_on` bigint unsigned NOT NULL DEFAULT 0,
+ PRIMARY KEY (`id`) USING BTREE,
+ KEY `idx_user_metric_user_id_tweets_count_trends` (`user_id`, `tweets_count`, `latest_trends_on`) USING BTREE
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
+
+INSERT INTO p_user_metric (user_id, tweets_count)
+SELECT user_id, count(*) AS tweets_count
+FROM p_post
+WHERE is_del=0
+GROUP BY user_id;
\ No newline at end of file
diff --git a/scripts/migration/postgres/0011_comment_essence.down.sql b/scripts/migration/postgres/0011_comment_essence.down.sql
new file mode 100644
index 00000000..c9bef95c
--- /dev/null
+++ b/scripts/migration/postgres/0011_comment_essence.down.sql
@@ -0,0 +1 @@
+ALTER TABLE p_comment DROP COLUMN is_essence;
\ No newline at end of file
diff --git a/scripts/migration/postgres/0011_comment_essence.up.sql b/scripts/migration/postgres/0011_comment_essence.up.sql
new file mode 100644
index 00000000..7f26544d
--- /dev/null
+++ b/scripts/migration/postgres/0011_comment_essence.up.sql
@@ -0,0 +1 @@
+ALTER TABLE p_comment ADD COLUMN is_essence SMALLINT NOT NULL DEFAULT 0;
diff --git a/scripts/migration/postgres/0012_rank_metrics.down.sql b/scripts/migration/postgres/0012_rank_metrics.down.sql
new file mode 100644
index 00000000..e27369c4
--- /dev/null
+++ b/scripts/migration/postgres/0012_rank_metrics.down.sql
@@ -0,0 +1,3 @@
+ALTER TABLE p_comment DROP COLUMN IF EXISTS reply_count;
+DROP TABLE IF EXISTS p_comment_metric;
+DROP TABLE IF EXISTS p_user_metric;
diff --git a/scripts/migration/postgres/0012_rank_metrics.up.sql b/scripts/migration/postgres/0012_rank_metrics.up.sql
new file mode 100644
index 00000000..270c8330
--- /dev/null
+++ b/scripts/migration/postgres/0012_rank_metrics.up.sql
@@ -0,0 +1,51 @@
+ALTER TABLE p_comment ADD COLUMN reply_count INT NOT NULL DEFAULT 0;
+
+WITH comment_reply AS (
+ SELECT comment_id, count(*) AS count
+ FROM p_comment_reply
+ WHERE is_del=0
+ GROUP By comment_id
+)
+UPDATE p_comment comment
+SET reply_count = reply.count
+FROM comment_reply reply
+WHERE comment.id = reply.comment_id;
+
+CREATE TABLE p_comment_metric (
+ id BIGSERIAL PRIMARY KEY,
+ comment_id BIGINT NOT NULL,
+ rank_score BIGINT NOT NULL DEFAULT 0,
+ incentive_score INT NOT NULL DEFAULT 0,
+ decay_factor INT NOT NULL DEFAULT 0,
+ motivation_factor INT NOT NULL DEFAULT 0,
+ is_del SMALLINT NOT NULL DEFAULT 0,
+ created_on BIGINT NOT NULL DEFAULT 0,
+ modified_on BIGINT NOT NULL DEFAULT 0,
+ deleted_on BIGINT NOT NULL DEFAULT 0
+);
+CREATE INDEX idx_comment_metric_comment_id_rank_score ON p_comment_metric USING btree (comment_id, rank_score);
+
+INSERT INTO p_comment_metric (comment_id, rank_score, created_on)
+SELECT id AS comment_id,
+ reply_count*2 + thumbs_up_count*4 - thumbs_down_count AS rank_score,
+ created_on
+FROM p_comment
+WHERE is_del=0;
+
+CREATE TABLE p_user_metric (
+ id BIGSERIAL PRIMARY KEY,
+ user_id BIGINT NOT NULL,
+ tweets_count INT NOT NULL DEFAULT 0,
+ latest_trends_on BIGINT NOT NULL DEFAULT 0,
+ is_del SMALLINT NOT NULL DEFAULT 0,
+ created_on BIGINT NOT NULL DEFAULT 0,
+ modified_on BIGINT NOT NULL DEFAULT 0,
+ deleted_on BIGINT NOT NULL DEFAULT 0
+);
+CREATE INDEX idx_user_metric_user_id_tweets_count_trends ON p_user_metric USING btree (user_id, tweets_count, latest_trends_on);
+
+INSERT INTO p_user_metric (user_id, tweets_count)
+SELECT user_id, count(*) AS tweets_count
+FROM p_post
+WHERE is_del=0
+GROUP BY user_id;
diff --git a/scripts/migration/sqlite3/0012_comment_essence.down.sql b/scripts/migration/sqlite3/0012_comment_essence.down.sql
new file mode 100644
index 00000000..863eb612
--- /dev/null
+++ b/scripts/migration/sqlite3/0012_comment_essence.down.sql
@@ -0,0 +1 @@
+ALTER TABLE "p_comment" DROP COLUMN "is_essence";
diff --git a/scripts/migration/sqlite3/0012_comment_essence.up.sql b/scripts/migration/sqlite3/0012_comment_essence.up.sql
new file mode 100644
index 00000000..10cac932
--- /dev/null
+++ b/scripts/migration/sqlite3/0012_comment_essence.up.sql
@@ -0,0 +1 @@
+ALTER TABLE "p_comment" ADD COLUMN "is_essence" integer NOT NULL DEFAULT 0;
diff --git a/scripts/migration/sqlite3/0013_rank_metrics.down.sql b/scripts/migration/sqlite3/0013_rank_metrics.down.sql
new file mode 100644
index 00000000..48eb80d9
--- /dev/null
+++ b/scripts/migration/sqlite3/0013_rank_metrics.down.sql
@@ -0,0 +1,3 @@
+ALTER TABLE "p_comment" DROP COLUMN "reply_count";
+DROP TABLE IF EXISTS "p_comment_metric";
+DROP TABLE IF EXISTS "p_user_metric";
diff --git a/scripts/migration/sqlite3/0013_rank_metrics.up.sql b/scripts/migration/sqlite3/0013_rank_metrics.up.sql
new file mode 100644
index 00000000..aa4d9c84
--- /dev/null
+++ b/scripts/migration/sqlite3/0013_rank_metrics.up.sql
@@ -0,0 +1,62 @@
+ALTER TABLE "p_comment" ADD COLUMN "reply_count" integer NOT NULL DEFAULT 0;
+
+UPDATE p_comment AS comment
+SET reply_count = (
+ SELECT count(*)
+ FROM
+ p_comment_reply AS reply
+ WHERE
+ comment.id=reply.comment_id AND comment.is_del=0 AND reply.is_del=0
+);
+
+CREATE TABLE p_comment_metric (
+ "id" integer,
+ "comment_id" integer NOT NULL,
+ "rank_score" integer NOT NULL DEFAULT 0,
+ "incentive_score" integer NOT NULL DEFAULT 0,
+ "decay_factor" integer NOT NULL DEFAULT 0,
+ "motivation_factor" integer NOT NULL DEFAULT 0,
+ "is_del" integer NOT NULL DEFAULT 0,
+ "created_on" integer NOT NULL DEFAULT 0,
+ "modified_on" integer NOT NULL DEFAULT 0,
+ "deleted_on" integer NOT NULL DEFAULT 0,
+ PRIMARY KEY ("id")
+);
+
+CREATE INDEX "idx_comment_metric_comment_id_rank_score"
+ON "p_comment_metric" (
+ "comment_id" ASC,
+ "rank_score" ASC
+);
+
+INSERT INTO p_comment_metric (comment_id, rank_score, created_on)
+SELECT id AS comment_id,
+ reply_count*2 + thumbs_up_count*4 - thumbs_down_count AS rank_score,
+ created_on
+FROM p_comment
+WHERE is_del=0;
+
+CREATE TABLE "p_user_metric" (
+ "id" integer,
+ "user_id" integer NOT NULL,
+ "tweets_count" integer NOT NULL DEFAULT 0,
+ "latest_trends_on" integer NOT NULL DEFAULT 0,
+ "is_del" integer NOT NULL DEFAULT 0,
+ "created_on" integer NOT NULL DEFAULT 0,
+ "modified_on" integer NOT NULL DEFAULT 0,
+ "deleted_on" integer NOT NULL DEFAULT 0,
+ PRIMARY KEY ("id")
+);
+
+CREATE INDEX "idx_user_metric_user_id_tweets_count_trends"
+ON "p_user_metric" (
+ "user_id" ASC,
+ "tweets_count" ASC,
+ "latest_trends_on" ASC
+);
+
+INSERT INTO p_user_metric (user_id, tweets_count)
+SELECT user_id, count(*) AS tweets_count
+FROM p_post
+WHERE is_del=0
+GROUP BY user_id;
diff --git a/scripts/paopao-mysql.sql b/scripts/paopao-mysql.sql
index 36f6a66d..041eac2d 100644
--- a/scripts/paopao-mysql.sql
+++ b/scripts/paopao-mysql.sql
@@ -6,17 +6,17 @@ SET FOREIGN_KEY_CHECKS = 0;
-- ----------------------------
DROP TABLE IF EXISTS `p_attachment`;
CREATE TABLE `p_attachment` (
- `id` bigint unsigned NOT NULL AUTO_INCREMENT,
- `user_id` bigint unsigned NOT NULL DEFAULT '0',
- `file_size` bigint unsigned NOT NULL,
- `img_width` bigint unsigned NOT NULL DEFAULT '0',
- `img_height` bigint unsigned NOT NULL DEFAULT '0',
- `type` tinyint unsigned NOT NULL DEFAULT '1' COMMENT '1图片,2视频,3其他附件',
+ `id` BIGINT NOT NULL AUTO_INCREMENT,
+ `user_id` BIGINT NOT NULL DEFAULT '0',
+ `file_size` BIGINT NOT NULL,
+ `img_width` BIGINT NOT NULL DEFAULT '0',
+ `img_height` BIGINT NOT NULL DEFAULT '0',
+ `type` tinyint NOT NULL DEFAULT '1' COMMENT '1图片,2视频,3其他附件',
`content` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '',
- `created_on` bigint unsigned NOT NULL DEFAULT '0' COMMENT '创建时间',
- `modified_on` bigint unsigned NOT NULL DEFAULT '0' COMMENT '修改时间',
- `deleted_on` bigint unsigned NOT NULL DEFAULT '0' COMMENT '删除时间',
- `is_del` tinyint unsigned NOT NULL DEFAULT '0' COMMENT '是否删除 0 为未删除、1 为已删除',
+ `created_on` BIGINT NOT NULL DEFAULT '0' COMMENT '创建时间',
+ `modified_on` BIGINT NOT NULL DEFAULT '0' COMMENT '修改时间',
+ `deleted_on` BIGINT NOT NULL DEFAULT '0' COMMENT '删除时间',
+ `is_del` tinyint NOT NULL DEFAULT '0' COMMENT '是否删除 0 为未删除、1 为已删除',
PRIMARY KEY (`id`) USING BTREE,
KEY `idx_attachment_user` (`user_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=100041 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='附件';
@@ -26,15 +26,15 @@ CREATE TABLE `p_attachment` (
-- ----------------------------
DROP TABLE IF EXISTS `p_captcha`;
CREATE TABLE `p_captcha` (
- `id` bigint unsigned NOT NULL AUTO_INCREMENT COMMENT '验证码ID',
+ `id` BIGINT NOT NULL AUTO_INCREMENT COMMENT '验证码ID',
`phone` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '手机号',
`captcha` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '验证码',
- `use_times` int unsigned NOT NULL DEFAULT '0' COMMENT '使用次数',
- `expired_on` bigint unsigned NOT NULL DEFAULT '0' COMMENT '过期时间',
- `created_on` bigint unsigned NOT NULL DEFAULT '0' COMMENT '创建时间',
- `modified_on` bigint unsigned NOT NULL DEFAULT '0' COMMENT '修改时间',
- `deleted_on` bigint unsigned NOT NULL DEFAULT '0' COMMENT '删除时间',
- `is_del` tinyint unsigned NOT NULL DEFAULT '0' COMMENT '是否删除 0 为未删除、1 为已删除',
+ `use_times` int NOT NULL DEFAULT '0' COMMENT '使用次数',
+ `expired_on` BIGINT NOT NULL DEFAULT '0' COMMENT '过期时间',
+ `created_on` BIGINT NOT NULL DEFAULT '0' COMMENT '创建时间',
+ `modified_on` BIGINT NOT NULL DEFAULT '0' COMMENT '修改时间',
+ `deleted_on` BIGINT NOT NULL DEFAULT '0' COMMENT '删除时间',
+ `is_del` tinyint NOT NULL DEFAULT '0' COMMENT '是否删除 0 为未删除、1 为已删除',
PRIMARY KEY (`id`) USING BTREE,
KEY `idx_captcha_phone` (`phone`) USING BTREE,
KEY `idx_captcha_expired_on` (`expired_on`) USING BTREE,
@@ -46,17 +46,19 @@ CREATE TABLE `p_captcha` (
-- ----------------------------
DROP TABLE IF EXISTS `p_comment`;
CREATE TABLE `p_comment` (
- `id` bigint unsigned NOT NULL AUTO_INCREMENT COMMENT '评论ID',
- `post_id` bigint unsigned NOT NULL DEFAULT '0' COMMENT 'POST ID',
- `user_id` bigint unsigned NOT NULL DEFAULT '0' COMMENT '用户ID',
+ `id` BIGINT NOT NULL AUTO_INCREMENT COMMENT '评论ID',
+ `post_id` BIGINT NOT NULL DEFAULT '0' COMMENT 'POST ID',
+ `user_id` BIGINT NOT NULL DEFAULT '0' COMMENT '用户ID',
`ip` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT 'IP地址',
`ip_loc` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT 'IP城市地址',
- `thumbs_up_count` int unsigned NOT NULL DEFAULT '0' COMMENT '点赞数',
- `thumbs_down_count` int unsigned NOT NULL DEFAULT '0' COMMENT '点踩数',
- `created_on` bigint unsigned NOT NULL DEFAULT '0' COMMENT '创建时间',
- `modified_on` bigint unsigned NOT NULL DEFAULT '0' COMMENT '修改时间',
- `deleted_on` bigint unsigned NOT NULL DEFAULT '0' COMMENT '删除时间',
- `is_del` tinyint unsigned NOT NULL DEFAULT '0' COMMENT '是否删除 0 为未删除、1 为已删除',
+ `is_essence` tinyint NOT NULL DEFAULT 0 COMMENT '是否精选',
+ `reply_count` int NOT NULL DEFAULT 0 COMMENT '回复数',
+ `thumbs_up_count` int NOT NULL DEFAULT 0 COMMENT '点赞数',
+ `thumbs_down_count` int NOT NULL DEFAULT 0 COMMENT '点踩数',
+ `created_on` BIGINT NOT NULL DEFAULT '0' COMMENT '创建时间',
+ `modified_on` BIGINT NOT NULL DEFAULT '0' COMMENT '修改时间',
+ `deleted_on` BIGINT NOT NULL DEFAULT '0' COMMENT '删除时间',
+ `is_del` tinyint NOT NULL DEFAULT '0' COMMENT '是否删除 0 为未删除、1 为已删除',
PRIMARY KEY (`id`) USING BTREE,
KEY `idx_comment_post_id` (`post_id`) USING BTREE,
KEY `idx_comment_user_id` (`user_id`) USING BTREE
@@ -67,16 +69,16 @@ CREATE TABLE `p_comment` (
-- ----------------------------
DROP TABLE IF EXISTS `p_comment_content`;
CREATE TABLE `p_comment_content` (
- `id` bigint unsigned NOT NULL AUTO_INCREMENT COMMENT '内容ID',
- `comment_id` bigint unsigned NOT NULL DEFAULT '0' COMMENT '评论ID',
- `user_id` bigint unsigned NOT NULL DEFAULT '0' COMMENT '用户ID',
+ `id` BIGINT NOT NULL AUTO_INCREMENT COMMENT '内容ID',
+ `comment_id` BIGINT NOT NULL DEFAULT '0' COMMENT '评论ID',
+ `user_id` BIGINT NOT NULL DEFAULT '0' COMMENT '用户ID',
`content` varchar(4000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '内容',
- `type` tinyint unsigned NOT NULL DEFAULT '2' COMMENT '类型,1标题,2文字段落,3图片地址,4视频地址,5语音地址,6链接地址',
- `sort` bigint unsigned NOT NULL DEFAULT '100' COMMENT '排序,越小越靠前',
- `created_on` bigint unsigned NOT NULL DEFAULT '0' COMMENT '创建时间',
- `modified_on` bigint unsigned NOT NULL DEFAULT '0' COMMENT '修改时间',
- `deleted_on` bigint unsigned NOT NULL DEFAULT '0' COMMENT '删除时间',
- `is_del` tinyint unsigned NOT NULL DEFAULT '0' COMMENT '是否删除 0 为未删除、1 为已删除',
+ `type` tinyint NOT NULL DEFAULT '2' COMMENT '类型,1标题,2文字段落,3图片地址,4视频地址,5语音地址,6链接地址',
+ `sort` BIGINT NOT NULL DEFAULT '100' COMMENT '排序,越小越靠前',
+ `created_on` BIGINT NOT NULL DEFAULT '0' COMMENT '创建时间',
+ `modified_on` BIGINT NOT NULL DEFAULT '0' COMMENT '修改时间',
+ `deleted_on` BIGINT NOT NULL DEFAULT '0' COMMENT '删除时间',
+ `is_del` tinyint NOT NULL DEFAULT '0' COMMENT '是否删除 0 为未删除、1 为已删除',
PRIMARY KEY (`id`) USING BTREE,
KEY `idx_comment_content_comment_id` (`comment_id`) USING BTREE,
KEY `idx_comment_content_user_id` (`user_id`) USING BTREE,
@@ -89,40 +91,59 @@ CREATE TABLE `p_comment_content` (
-- ----------------------------
DROP TABLE IF EXISTS `p_comment_reply`;
CREATE TABLE `p_comment_reply` (
- `id` bigint unsigned NOT NULL AUTO_INCREMENT COMMENT '回复ID',
- `comment_id` bigint unsigned NOT NULL DEFAULT '0' COMMENT '评论ID',
- `user_id` bigint unsigned NOT NULL DEFAULT '0' COMMENT '用户ID',
- `at_user_id` bigint unsigned NOT NULL DEFAULT '0' COMMENT '@用户ID',
+ `id` BIGINT NOT NULL AUTO_INCREMENT COMMENT '回复ID',
+ `comment_id` BIGINT NOT NULL DEFAULT '0' COMMENT '评论ID',
+ `user_id` BIGINT NOT NULL DEFAULT '0' COMMENT '用户ID',
+ `at_user_id` BIGINT NOT NULL DEFAULT '0' COMMENT '@用户ID',
`content` varchar(4000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '内容',
`ip` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT 'IP地址',
`ip_loc` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT 'IP城市地址',
- `thumbs_up_count` int unsigned NOT NULL DEFAULT '0' COMMENT '点赞数',
- `thumbs_down_count` int unsigned NOT NULL DEFAULT '0' COMMENT '点踩数',
- `created_on` bigint unsigned NOT NULL DEFAULT '0' COMMENT '创建时间',
- `modified_on` bigint unsigned NOT NULL DEFAULT '0' COMMENT '修改时间',
- `deleted_on` bigint unsigned NOT NULL DEFAULT '0' COMMENT '删除时间',
- `is_del` tinyint unsigned NOT NULL DEFAULT '0' COMMENT '是否删除 0 为未删除、1 为已删除',
+ `thumbs_up_count` int NOT NULL DEFAULT '0' COMMENT '点赞数',
+ `thumbs_down_count` int NOT NULL DEFAULT '0' COMMENT '点踩数',
+ `created_on` BIGINT NOT NULL DEFAULT '0' COMMENT '创建时间',
+ `modified_on` BIGINT NOT NULL DEFAULT '0' COMMENT '修改时间',
+ `deleted_on` BIGINT NOT NULL DEFAULT '0' COMMENT '删除时间',
+ `is_del` tinyint NOT NULL DEFAULT '0' COMMENT '是否删除 0 为未删除、1 为已删除',
PRIMARY KEY (`id`) USING BTREE,
KEY `idx_comment_reply_comment_id` (`comment_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=12000015 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='评论回复';
+-- ----------------------------
+-- Table structure for p_comment_metric
+-- ----------------------------
+DROP TABLE IF EXISTS `p_comment_metric`;
+CREATE TABLE `p_comment_metric` (
+ `id` BIGINT NOT NULL AUTO_INCREMENT,
+ `comment_id` BIGINT NOT NULL,
+ `rank_score` BIGINT NOT NULL DEFAULT 0,
+ `incentive_score` int NOT NULL DEFAULT 0,
+ `decay_factor` int NOT NULL DEFAULT 0,
+ `motivation_factor` int NOT NULL DEFAULT 0,
+ `is_del` tinyint NOT NULL DEFAULT 0,
+ `created_on` BIGINT NOT NULL DEFAULT 0,
+ `modified_on` BIGINT NOT NULL DEFAULT 0,
+ `deleted_on` BIGINT NOT NULL DEFAULT 0,
+ PRIMARY KEY (`id`) USING BTREE,
+ KEY `idx_comment_metric_comment_id_rank_score` (`comment_id`, `rank_score`) USING BTREE
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
+
-- ----------------------------
-- Table structure for p_tweet_comment_thumbs
-- ----------------------------
DROP TABLE IF EXISTS `p_tweet_comment_thumbs`;
CREATE TABLE `p_tweet_comment_thumbs` (
- `id` BIGINT unsigned NOT NULL AUTO_INCREMENT COMMENT 'thumbs ID',
- `user_id` BIGINT unsigned NOT NULL,
- `tweet_id` BIGINT unsigned NOT NULL COMMENT '推文ID',
- `comment_id` BIGINT unsigned NOT NULL COMMENT '评论ID',
- `reply_id` BIGINT unsigned COMMENT '评论回复ID',
+ `id` BIGINT NOT NULL AUTO_INCREMENT COMMENT 'thumbs ID',
+ `user_id` BIGINT NOT NULL,
+ `tweet_id` BIGINT NOT NULL COMMENT '推文ID',
+ `comment_id` BIGINT NOT NULL COMMENT '评论ID',
+ `reply_id` BIGINT COMMENT '评论回复ID',
`comment_type` TINYINT NOT NULL DEFAULT '0' COMMENT '评论类型 0为推文评论、1为评论回复',
- `is_thumbs_up` TINYINT unsigned NOT NULL DEFAULT '0' COMMENT '是否点赞',
- `is_thumbs_down` TINYINT unsigned NOT NULL DEFAULT '0' COMMENT '是否点踩',
- `created_on` BIGINT unsigned NOT NULL DEFAULT '0' COMMENT '创建时间',
- `modified_on` BIGINT unsigned NOT NULL DEFAULT '0' COMMENT '修改时间',
- `deleted_on` BIGINT unsigned NOT NULL DEFAULT '0' COMMENT '删除时间',
- `is_del` TINYINT unsigned NOT NULL DEFAULT '0' COMMENT '是否删除 0 为未删除、1 为已删除',
+ `is_thumbs_up` TINYINT NOT NULL DEFAULT '0' COMMENT '是否点赞',
+ `is_thumbs_down` TINYINT NOT NULL DEFAULT '0' COMMENT '是否点踩',
+ `created_on` BIGINT NOT NULL DEFAULT '0' COMMENT '创建时间',
+ `modified_on` BIGINT NOT NULL DEFAULT '0' COMMENT '修改时间',
+ `deleted_on` BIGINT NOT NULL DEFAULT '0' COMMENT '删除时间',
+ `is_del` TINYINT NOT NULL DEFAULT '0' COMMENT '是否删除 0 为未删除、1 为已删除',
PRIMARY KEY (`id`) USING BTREE,
KEY `idx_tweet_comment_thumbs_uid_tid` (`user_id`, `tweet_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='推文评论点赞';
@@ -132,20 +153,20 @@ CREATE TABLE `p_tweet_comment_thumbs` (
-- ----------------------------
DROP TABLE IF EXISTS `p_message`;
CREATE TABLE `p_message` (
- `id` bigint unsigned NOT NULL AUTO_INCREMENT COMMENT '消息通知ID',
- `sender_user_id` bigint unsigned NOT NULL DEFAULT '0' COMMENT '发送方用户ID',
- `receiver_user_id` bigint unsigned NOT NULL DEFAULT '0' COMMENT '接收方用户ID',
- `type` tinyint unsigned NOT NULL DEFAULT '1' COMMENT '通知类型,1动态,2评论,3回复,4私信,99系统通知',
+ `id` BIGINT NOT NULL AUTO_INCREMENT COMMENT '消息通知ID',
+ `sender_user_id` BIGINT NOT NULL DEFAULT '0' COMMENT '发送方用户ID',
+ `receiver_user_id` BIGINT NOT NULL DEFAULT '0' COMMENT '接收方用户ID',
+ `type` tinyint NOT NULL DEFAULT '1' COMMENT '通知类型,1动态,2评论,3回复,4私信,99系统通知',
`brief` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '摘要说明',
`content` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '详细内容',
- `post_id` bigint unsigned NOT NULL DEFAULT '0' COMMENT '动态ID',
- `comment_id` bigint unsigned NOT NULL DEFAULT '0' COMMENT '评论ID',
- `reply_id` bigint unsigned NOT NULL DEFAULT '0' COMMENT '回复ID',
- `is_read` tinyint unsigned NOT NULL DEFAULT '0' COMMENT '是否已读',
- `created_on` bigint unsigned NOT NULL DEFAULT '0' COMMENT '创建时间',
- `modified_on` bigint unsigned NOT NULL DEFAULT '0' COMMENT '修改时间',
- `deleted_on` bigint unsigned NOT NULL DEFAULT '0' COMMENT '删除时间',
- `is_del` tinyint unsigned NOT NULL DEFAULT '0' COMMENT '是否删除 0 为未删除、1 为已删除',
+ `post_id` BIGINT NOT NULL DEFAULT '0' COMMENT '动态ID',
+ `comment_id` BIGINT NOT NULL DEFAULT '0' COMMENT '评论ID',
+ `reply_id` BIGINT NOT NULL DEFAULT '0' COMMENT '回复ID',
+ `is_read` tinyint NOT NULL DEFAULT '0' COMMENT '是否已读',
+ `created_on` BIGINT NOT NULL DEFAULT '0' COMMENT '创建时间',
+ `modified_on` BIGINT NOT NULL DEFAULT '0' COMMENT '修改时间',
+ `deleted_on` BIGINT NOT NULL DEFAULT '0' COMMENT '删除时间',
+ `is_del` tinyint NOT NULL DEFAULT '0' COMMENT '是否删除 0 为未删除、1 为已删除',
PRIMARY KEY (`id`) USING BTREE,
KEY `idx_message_receiver_user_id` (`receiver_user_id`) USING BTREE,
KEY `idx_message_is_read` (`is_read`) USING BTREE,
@@ -157,25 +178,25 @@ CREATE TABLE `p_message` (
-- ----------------------------
DROP TABLE IF EXISTS `p_post`;
CREATE TABLE `p_post` (
- `id` bigint unsigned NOT NULL AUTO_INCREMENT COMMENT '主题ID',
- `user_id` bigint unsigned NOT NULL DEFAULT '0' COMMENT '用户ID',
- `comment_count` bigint unsigned NOT NULL DEFAULT '0' COMMENT '评论数',
- `collection_count` bigint unsigned NOT NULL DEFAULT '0' COMMENT '收藏数',
- `upvote_count` bigint unsigned NOT NULL DEFAULT '0' COMMENT '点赞数',
- `share_count` bigint unsigned NOT NULL DEFAULT '0' COMMENT '分享数',
- `visibility` tinyint unsigned NOT NULL DEFAULT '0' COMMENT '可见性: 0私密 10充电可见 20订阅可见 30保留 40保留 50好友可见 60关注可见 70保留 80保留 90公开',
- `is_top` tinyint unsigned NOT NULL DEFAULT '0' COMMENT '是否置顶',
- `is_essence` tinyint unsigned NOT NULL DEFAULT '0' COMMENT '是否精华',
- `is_lock` tinyint unsigned NOT NULL DEFAULT '0' COMMENT '是否锁定',
- `latest_replied_on` bigint unsigned NOT NULL DEFAULT '0' COMMENT '最新回复时间',
+ `id` BIGINT NOT NULL AUTO_INCREMENT COMMENT '主题ID',
+ `user_id` BIGINT NOT NULL DEFAULT '0' COMMENT '用户ID',
+ `comment_count` BIGINT NOT NULL DEFAULT '0' COMMENT '评论数',
+ `collection_count` BIGINT NOT NULL DEFAULT '0' COMMENT '收藏数',
+ `upvote_count` BIGINT NOT NULL DEFAULT '0' COMMENT '点赞数',
+ `share_count` BIGINT NOT NULL DEFAULT '0' COMMENT '分享数',
+ `visibility` tinyint NOT NULL DEFAULT '0' COMMENT '可见性: 0私密 10充电可见 20订阅可见 30保留 40保留 50好友可见 60关注可见 70保留 80保留 90公开',
+ `is_top` tinyint NOT NULL DEFAULT '0' COMMENT '是否置顶',
+ `is_essence` tinyint NOT NULL DEFAULT '0' COMMENT '是否精华',
+ `is_lock` tinyint NOT NULL DEFAULT '0' COMMENT '是否锁定',
+ `latest_replied_on` BIGINT NOT NULL DEFAULT '0' COMMENT '最新回复时间',
`tags` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '标签',
- `attachment_price` bigint unsigned NOT NULL DEFAULT '0' COMMENT '附件价格(分)',
+ `attachment_price` BIGINT NOT NULL DEFAULT '0' COMMENT '附件价格(分)',
`ip` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT 'IP地址',
`ip_loc` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT 'IP城市地址',
- `created_on` bigint unsigned NOT NULL DEFAULT '0' COMMENT '创建时间',
- `modified_on` bigint unsigned NOT NULL DEFAULT '0' COMMENT '修改时间',
- `deleted_on` bigint unsigned NOT NULL DEFAULT '0' COMMENT '删除时间',
- `is_del` tinyint unsigned NOT NULL DEFAULT '0' COMMENT '是否删除 0 为未删除、1 为已删除',
+ `created_on` BIGINT NOT NULL DEFAULT '0' COMMENT '创建时间',
+ `modified_on` BIGINT NOT NULL DEFAULT '0' COMMENT '修改时间',
+ `deleted_on` BIGINT NOT NULL DEFAULT '0' COMMENT '删除时间',
+ `is_del` tinyint NOT NULL DEFAULT '0' COMMENT '是否删除 0 为未删除、1 为已删除',
PRIMARY KEY (`id`) USING BTREE,
KEY `idx_post_user_id` (`user_id`) USING BTREE,
KEY `idx_post_visibility` (`visibility`) USING BTREE
@@ -186,16 +207,16 @@ CREATE TABLE `p_post` (
-- ----------------------------
DROP TABLE IF EXISTS `p_post_metric`;
CREATE TABLE `p_post_metric` (
- `id` bigint unsigned NOT NULL AUTO_INCREMENT,
- `post_id` bigint unsigned NOT NULL,
- `rank_score` bigint unsigned NOT NULL DEFAULT 0,
- `incentive_score` int unsigned NOT NULL DEFAULT 0,
- `decay_factor` int unsigned NOT NULL DEFAULT 0,
- `motivation_factor` int unsigned NOT NULL DEFAULT 0,
+ `id` BIGINT NOT NULL AUTO_INCREMENT,
+ `post_id` BIGINT NOT NULL,
+ `rank_score` BIGINT NOT NULL DEFAULT 0,
+ `incentive_score` int NOT NULL DEFAULT 0,
+ `decay_factor` int NOT NULL DEFAULT 0,
+ `motivation_factor` int NOT NULL DEFAULT 0,
`is_del` tinyint NOT NULL DEFAULT 0, -- 是否删除, 0否, 1是
- `created_on` bigint unsigned NOT NULL DEFAULT '0',
- `modified_on` bigint unsigned NOT NULL DEFAULT '0',
- `deleted_on` bigint unsigned NOT NULL DEFAULT '0',
+ `created_on` BIGINT NOT NULL DEFAULT '0',
+ `modified_on` BIGINT NOT NULL DEFAULT '0',
+ `deleted_on` BIGINT NOT NULL DEFAULT '0',
PRIMARY KEY (`id`) USING BTREE,
KEY `idx_post_metric_post_id_rank_score` (`post_id`,`rank_score`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
@@ -205,14 +226,14 @@ CREATE TABLE `p_post_metric` (
-- ----------------------------
DROP TABLE IF EXISTS `p_post_attachment_bill`;
CREATE TABLE `p_post_attachment_bill` (
- `id` bigint unsigned NOT NULL AUTO_INCREMENT COMMENT '购买记录ID',
- `post_id` bigint unsigned NOT NULL DEFAULT '0' COMMENT 'POST ID',
- `user_id` bigint unsigned NOT NULL DEFAULT '0' COMMENT '用户ID',
- `paid_amount` bigint unsigned NOT NULL DEFAULT '0' COMMENT '支付金额',
- `created_on` bigint unsigned NOT NULL DEFAULT '0' COMMENT '创建时间',
- `modified_on` bigint unsigned NOT NULL DEFAULT '0' COMMENT '修改时间',
- `deleted_on` bigint unsigned NOT NULL DEFAULT '0' COMMENT '删除时间',
- `is_del` tinyint unsigned NOT NULL DEFAULT '0' COMMENT '是否删除 0 为未删除、1 为已删除',
+ `id` BIGINT NOT NULL AUTO_INCREMENT COMMENT '购买记录ID',
+ `post_id` BIGINT NOT NULL DEFAULT '0' COMMENT 'POST ID',
+ `user_id` BIGINT NOT NULL DEFAULT '0' COMMENT '用户ID',
+ `paid_amount` BIGINT NOT NULL DEFAULT '0' COMMENT '支付金额',
+ `created_on` BIGINT NOT NULL DEFAULT '0' COMMENT '创建时间',
+ `modified_on` BIGINT NOT NULL DEFAULT '0' COMMENT '修改时间',
+ `deleted_on` BIGINT NOT NULL DEFAULT '0' COMMENT '删除时间',
+ `is_del` tinyint NOT NULL DEFAULT '0' COMMENT '是否删除 0 为未删除、1 为已删除',
PRIMARY KEY (`id`) USING BTREE,
KEY `idx_post_attachment_bill_post_id` (`post_id`) USING BTREE,
KEY `idx_post_attachment_bill_user_id` (`user_id`) USING BTREE
@@ -223,13 +244,13 @@ CREATE TABLE `p_post_attachment_bill` (
-- ----------------------------
DROP TABLE IF EXISTS `p_post_collection`;
CREATE TABLE `p_post_collection` (
- `id` bigint unsigned NOT NULL AUTO_INCREMENT COMMENT '收藏ID',
- `post_id` bigint unsigned NOT NULL DEFAULT '0' COMMENT 'POST ID',
- `user_id` bigint unsigned NOT NULL DEFAULT '0' COMMENT '用户ID',
- `created_on` bigint unsigned NOT NULL DEFAULT '0' COMMENT '创建时间',
- `modified_on` bigint unsigned NOT NULL DEFAULT '0' COMMENT '修改时间',
- `deleted_on` bigint unsigned NOT NULL DEFAULT '0' COMMENT '删除时间',
- `is_del` tinyint unsigned NOT NULL DEFAULT '0' COMMENT '是否删除 0 为未删除、1 为已删除',
+ `id` BIGINT NOT NULL AUTO_INCREMENT COMMENT '收藏ID',
+ `post_id` BIGINT NOT NULL DEFAULT '0' COMMENT 'POST ID',
+ `user_id` BIGINT NOT NULL DEFAULT '0' COMMENT '用户ID',
+ `created_on` BIGINT NOT NULL DEFAULT '0' COMMENT '创建时间',
+ `modified_on` BIGINT NOT NULL DEFAULT '0' COMMENT '修改时间',
+ `deleted_on` BIGINT NOT NULL DEFAULT '0' COMMENT '删除时间',
+ `is_del` tinyint NOT NULL DEFAULT '0' COMMENT '是否删除 0 为未删除、1 为已删除',
PRIMARY KEY (`id`) USING BTREE,
KEY `idx_post_collection_post_id` (`post_id`) USING BTREE,
KEY `idx_post_collection_user_id` (`user_id`) USING BTREE
@@ -240,16 +261,16 @@ CREATE TABLE `p_post_collection` (
-- ----------------------------
DROP TABLE IF EXISTS `p_post_content`;
CREATE TABLE `p_post_content` (
- `id` bigint unsigned NOT NULL AUTO_INCREMENT COMMENT '内容ID',
- `post_id` bigint unsigned NOT NULL DEFAULT '0' COMMENT 'POST ID',
- `user_id` bigint unsigned NOT NULL DEFAULT '0' COMMENT '用户ID',
+ `id` BIGINT NOT NULL AUTO_INCREMENT COMMENT '内容ID',
+ `post_id` BIGINT NOT NULL DEFAULT '0' COMMENT 'POST ID',
+ `user_id` BIGINT NOT NULL DEFAULT '0' COMMENT '用户ID',
`content` varchar(4000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '内容',
- `type` tinyint unsigned NOT NULL DEFAULT '2' COMMENT '类型,1标题,2文字段落,3图片地址,4视频地址,5语音地址,6链接地址,7附件资源,8收费资源',
- `sort` int unsigned NOT NULL DEFAULT '100' COMMENT '排序,越小越靠前',
- `created_on` bigint unsigned NOT NULL DEFAULT '0' COMMENT '创建时间',
- `modified_on` bigint unsigned NOT NULL DEFAULT '0' COMMENT '修改时间',
- `deleted_on` bigint unsigned NOT NULL DEFAULT '0' COMMENT '删除时间',
- `is_del` tinyint unsigned NOT NULL DEFAULT '0' COMMENT '是否删除 0 为未删除、1 为已删除',
+ `type` tinyint NOT NULL DEFAULT '2' COMMENT '类型,1标题,2文字段落,3图片地址,4视频地址,5语音地址,6链接地址,7附件资源,8收费资源',
+ `sort` int NOT NULL DEFAULT '100' COMMENT '排序,越小越靠前',
+ `created_on` BIGINT NOT NULL DEFAULT '0' COMMENT '创建时间',
+ `modified_on` BIGINT NOT NULL DEFAULT '0' COMMENT '修改时间',
+ `deleted_on` BIGINT NOT NULL DEFAULT '0' COMMENT '删除时间',
+ `is_del` tinyint NOT NULL DEFAULT '0' COMMENT '是否删除 0 为未删除、1 为已删除',
PRIMARY KEY (`id`) USING BTREE,
KEY `idx_post_content_post_id` (`post_id`) USING BTREE,
KEY `idx_post_content_user_id` (`user_id`) USING BTREE
@@ -260,13 +281,13 @@ CREATE TABLE `p_post_content` (
-- ----------------------------
DROP TABLE IF EXISTS `p_post_star`;
CREATE TABLE `p_post_star` (
- `id` bigint unsigned NOT NULL AUTO_INCREMENT COMMENT '收藏ID',
- `post_id` bigint unsigned NOT NULL DEFAULT '0' COMMENT 'POST ID',
- `user_id` bigint unsigned NOT NULL DEFAULT '0' COMMENT '用户ID',
- `created_on` bigint unsigned NOT NULL DEFAULT '0' COMMENT '创建时间',
- `modified_on` bigint unsigned NOT NULL DEFAULT '0' COMMENT '修改时间',
- `deleted_on` bigint unsigned NOT NULL DEFAULT '0' COMMENT '删除时间',
- `is_del` tinyint unsigned NOT NULL DEFAULT '0' COMMENT '是否删除 0 为未删除、1 为已删除',
+ `id` BIGINT NOT NULL AUTO_INCREMENT COMMENT '收藏ID',
+ `post_id` BIGINT NOT NULL DEFAULT '0' COMMENT 'POST ID',
+ `user_id` BIGINT NOT NULL DEFAULT '0' COMMENT '用户ID',
+ `created_on` BIGINT NOT NULL DEFAULT '0' COMMENT '创建时间',
+ `modified_on` BIGINT NOT NULL DEFAULT '0' COMMENT '修改时间',
+ `deleted_on` BIGINT NOT NULL DEFAULT '0' COMMENT '删除时间',
+ `is_del` tinyint NOT NULL DEFAULT '0' COMMENT '是否删除 0 为未删除、1 为已删除',
PRIMARY KEY (`id`) USING BTREE,
KEY `idx_post_star_post_id` (`post_id`) USING BTREE,
KEY `idx_post_star_user_id` (`user_id`) USING BTREE
@@ -277,14 +298,14 @@ CREATE TABLE `p_post_star` (
-- ----------------------------
DROP TABLE IF EXISTS `p_tag`;
CREATE TABLE `p_tag` (
- `id` bigint unsigned NOT NULL AUTO_INCREMENT COMMENT '标签ID',
- `user_id` bigint unsigned NOT NULL DEFAULT '0' COMMENT '创建者ID',
+ `id` BIGINT NOT NULL AUTO_INCREMENT COMMENT '标签ID',
+ `user_id` BIGINT NOT NULL DEFAULT '0' COMMENT '创建者ID',
`tag` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '标签名',
- `quote_num` bigint unsigned NOT NULL DEFAULT '0' COMMENT '引用数',
- `created_on` bigint unsigned NOT NULL DEFAULT '0' COMMENT '创建时间',
- `modified_on` bigint unsigned NOT NULL DEFAULT '0' COMMENT '修改时间',
- `deleted_on` bigint unsigned NOT NULL DEFAULT '0' COMMENT '删除时间',
- `is_del` tinyint unsigned NOT NULL DEFAULT '0' COMMENT '是否删除 0 为未删除、1 为已删除',
+ `quote_num` BIGINT NOT NULL DEFAULT '0' COMMENT '引用数',
+ `created_on` BIGINT NOT NULL DEFAULT '0' COMMENT '创建时间',
+ `modified_on` BIGINT NOT NULL DEFAULT '0' COMMENT '修改时间',
+ `deleted_on` BIGINT NOT NULL DEFAULT '0' COMMENT '删除时间',
+ `is_del` tinyint NOT NULL DEFAULT '0' COMMENT '是否删除 0 为未删除、1 为已删除',
PRIMARY KEY (`id`) USING BTREE,
UNIQUE KEY `idx_tag_tag` (`tag`) USING BTREE,
KEY `idx_tag_user_id` (`user_id`) USING BTREE,
@@ -296,17 +317,17 @@ CREATE TABLE `p_tag` (
-- ----------------------------
DROP TABLE IF EXISTS `p_topic_user`;
CREATE TABLE `p_topic_user` (
- `id` BIGINT UNSIGNED NOT NULL AUTO_INCREMENT,
- `topic_id` BIGINT UNSIGNED NOT NULL COMMENT '标签ID',
- `user_id` BIGINT UNSIGNED NOT NULL COMMENT '创建者ID',
+ `id` BIGINT NOT NULL AUTO_INCREMENT,
+ `topic_id` BIGINT NOT NULL COMMENT '标签ID',
+ `user_id` BIGINT NOT NULL COMMENT '创建者ID',
`alias_name` VARCHAR ( 255 ) COMMENT '别名',
`remark` VARCHAR ( 512 ) COMMENT '备注',
- `quote_num` BIGINT UNSIGNED COMMENT '引用数',
- `is_top` TINYINT UNSIGNED NOT NULL DEFAULT '0' COMMENT '是否置顶 0 为未置顶、1 为已置顶',
- `created_on` BIGINT UNSIGNED NOT NULL DEFAULT '0' COMMENT '创建时间',
- `modified_on` BIGINT UNSIGNED NOT NULL DEFAULT '0' COMMENT '修改时间',
- `deleted_on` BIGINT UNSIGNED NOT NULL DEFAULT '0' COMMENT '删除时间',
- `is_del` TINYINT UNSIGNED NOT NULL DEFAULT '0' COMMENT '是否删除 0 为未删除、1 为已删除',
+ `quote_num` BIGINT COMMENT '引用数',
+ `is_top` TINYINT NOT NULL DEFAULT '0' COMMENT '是否置顶 0 为未置顶、1 为已置顶',
+ `created_on` BIGINT NOT NULL DEFAULT '0' COMMENT '创建时间',
+ `modified_on` BIGINT NOT NULL DEFAULT '0' COMMENT '修改时间',
+ `deleted_on` BIGINT NOT NULL DEFAULT '0' COMMENT '删除时间',
+ `is_del` TINYINT NOT NULL DEFAULT '0' COMMENT '是否删除 0 为未删除、1 为已删除',
`reserve_a` VARCHAR ( 255 ) COMMENT '保留字段a',
`reserve_b` VARCHAR ( 255 ) COMMENT '保留字段b',
PRIMARY KEY ( `id` ) USING BTREE,
@@ -318,37 +339,54 @@ CREATE TABLE `p_topic_user` (
-- ----------------------------
DROP TABLE IF EXISTS `p_user`;
CREATE TABLE `p_user` (
- `id` bigint unsigned NOT NULL AUTO_INCREMENT COMMENT '用户ID',
+ `id` BIGINT NOT NULL AUTO_INCREMENT COMMENT '用户ID',
`nickname` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '昵称',
`username` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '用户名',
`phone` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '手机号',
`password` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT 'MD5密码',
`salt` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '盐值',
- `status` tinyint unsigned NOT NULL DEFAULT '1' COMMENT '状态,1正常,2停用',
+ `status` tinyint NOT NULL DEFAULT '1' COMMENT '状态,1正常,2停用',
`avatar` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '用户头像',
- `balance` bigint unsigned NOT NULL COMMENT '用户余额(分)',
- `is_admin` tinyint unsigned NOT NULL DEFAULT '0' COMMENT '是否管理员',
- `created_on` bigint unsigned NOT NULL DEFAULT '0' COMMENT '创建时间',
- `modified_on` bigint unsigned NOT NULL DEFAULT '0' COMMENT '修改时间',
- `deleted_on` bigint unsigned NOT NULL DEFAULT '0' COMMENT '删除时间',
- `is_del` tinyint unsigned NOT NULL DEFAULT '0' COMMENT '是否删除 0 为未删除、1 为已删除',
+ `balance` BIGINT NOT NULL COMMENT '用户余额(分)',
+ `is_admin` tinyint NOT NULL DEFAULT '0' COMMENT '是否管理员',
+ `created_on` BIGINT NOT NULL DEFAULT '0' COMMENT '创建时间',
+ `modified_on` BIGINT NOT NULL DEFAULT '0' COMMENT '修改时间',
+ `deleted_on` BIGINT NOT NULL DEFAULT '0' COMMENT '删除时间',
+ `is_del` tinyint NOT NULL DEFAULT '0' COMMENT '是否删除 0 为未删除、1 为已删除',
PRIMARY KEY (`id`) USING BTREE,
UNIQUE KEY `idx_user_username` (`username`) USING BTREE,
KEY `idx_user_phone` (`phone`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=100058 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='用户';
+-- ----------------------------
+-- Table structure for p_user_metric
+-- ----------------------------
+DROP TABLE IF EXISTS `p_user_metric`;
+CREATE TABLE `p_user_metric` (
+ `id` BIGINT NOT NULL AUTO_INCREMENT,
+ `user_id` BIGINT NOT NULL,
+ `tweets_count` int NOT NULL DEFAULT 0,
+ `latest_trends_on` BIGINT NOT NULL DEFAULT 0 COMMENT '最新动态时间',
+ `is_del` tinyint NOT NULL DEFAULT 0,
+ `created_on` BIGINT NOT NULL DEFAULT 0,
+ `modified_on` BIGINT NOT NULL DEFAULT 0,
+ `deleted_on` BIGINT NOT NULL DEFAULT 0,
+ PRIMARY KEY (`id`) USING BTREE,
+ KEY `idx_user_metric_user_id_tweets_count_trends` (`user_id`, `tweets_count`, `latest_trends_on`) USING BTREE
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
+
-- ----------------------------
-- Table structure for p_following
-- ----------------------------
DROP TABLE IF EXISTS `p_following`;
CREATE TABLE `p_following` (
- `id` bigint unsigned NOT NULL AUTO_INCREMENT,
- `user_id` bigint unsigned NOT NULL,
- `follow_id` bigint unsigned NOT NULL,
+ `id` BIGINT NOT NULL AUTO_INCREMENT,
+ `user_id` BIGINT NOT NULL,
+ `follow_id` BIGINT NOT NULL,
`is_del` tinyint NOT NULL DEFAULT 0, -- 是否删除, 0否, 1是
- `created_on` bigint unsigned NOT NULL DEFAULT '0',
- `modified_on` bigint unsigned NOT NULL DEFAULT '0',
- `deleted_on` bigint unsigned NOT NULL DEFAULT '0',
+ `created_on` BIGINT NOT NULL DEFAULT '0',
+ `modified_on` BIGINT NOT NULL DEFAULT '0',
+ `deleted_on` BIGINT NOT NULL DEFAULT '0',
PRIMARY KEY (`id`) USING BTREE,
KEY `idx_following_user_follow` (`user_id`,`follow_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
@@ -358,19 +396,19 @@ CREATE TABLE `p_following` (
-- ----------------------------
DROP TABLE IF EXISTS `p_contact`;
CREATE TABLE `p_contact` (
- `id` bigint unsigned NOT NULL AUTO_INCREMENT COMMENT '联系人ID',
- `user_id` bigint unsigned NOT NULL COMMENT '用户ID',
- `friend_id` bigint unsigned NOT NULL COMMENT '好友ID',
- `group_id` bigint unsigned NOT NULL DEFAULT '0' COMMENT '好友分组ID:默认为0无分组',
+ `id` BIGINT NOT NULL AUTO_INCREMENT COMMENT '联系人ID',
+ `user_id` BIGINT NOT NULL COMMENT '用户ID',
+ `friend_id` BIGINT NOT NULL COMMENT '好友ID',
+ `group_id` BIGINT NOT NULL DEFAULT '0' COMMENT '好友分组ID:默认为0无分组',
`remark` varchar(32) NOT NULL DEFAULT '' COMMENT '好友备注',
`status` tinyint NOT NULL DEFAULT '0' COMMENT '好友状态: 1请求好友, 2已好友, 3拒绝好友, 4已删好友',
`is_top` tinyint NOT NULL DEFAULT '0' COMMENT '是否置顶, 0否, 1是',
`is_black` tinyint NOT NULL DEFAULT '0' COMMENT '是否为黑名单, 0否, 1是',
`is_del` tinyint NOT NULL DEFAULT '0' COMMENT '是否删除好友, 0否, 1是',
`notice_enable` tinyint NOT NULL DEFAULT '0' COMMENT '是否有消息提醒, 0否, 1是',
- `created_on` bigint unsigned NOT NULL DEFAULT '0' COMMENT '创建时间',
- `modified_on` bigint unsigned NOT NULL DEFAULT '0' COMMENT '修改时间',
- `deleted_on` bigint unsigned NOT NULL DEFAULT '0' COMMENT '删除时间',
+ `created_on` BIGINT NOT NULL DEFAULT '0' COMMENT '创建时间',
+ `modified_on` BIGINT NOT NULL DEFAULT '0' COMMENT '修改时间',
+ `deleted_on` BIGINT NOT NULL DEFAULT '0' COMMENT '删除时间',
PRIMARY KEY (`id`) USING BTREE,
UNIQUE KEY `idx_contact_user_friend` (`user_id`,`friend_id`) USING BTREE,
KEY `idx_contact_user_friend_status` (`user_id`, `friend_id`, `status`) USING BTREE
@@ -381,13 +419,13 @@ CREATE TABLE `p_contact` (
-- ----------------------------
DROP TABLE IF EXISTS `p_contact_group`;
CREATE TABLE `p_contact_group` (
- `id` bigint unsigned NOT NULL AUTO_INCREMENT COMMENT '联系人ID',
+ `id` BIGINT NOT NULL AUTO_INCREMENT COMMENT '联系人ID',
`user_id` int NOT NULL DEFAULT '0' COMMENT '用户id',
`name` varchar(32) NOT NULL DEFAULT '' COMMENT '分组名称',
`is_del` tinyint NOT NULL DEFAULT '1' COMMENT '是否删除, 0否, 1是',
- `created_on` bigint unsigned NOT NULL DEFAULT '0' COMMENT '创建时间',
- `modified_on` bigint unsigned NOT NULL DEFAULT '0' COMMENT '修改时间',
- `deleted_on` bigint unsigned NOT NULL DEFAULT '0' COMMENT '删除时间',
+ `created_on` BIGINT NOT NULL DEFAULT '0' COMMENT '创建时间',
+ `modified_on` BIGINT NOT NULL DEFAULT '0' COMMENT '修改时间',
+ `deleted_on` BIGINT NOT NULL DEFAULT '0' COMMENT '删除时间',
PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='联系人分组';
@@ -396,15 +434,15 @@ CREATE TABLE `p_contact_group` (
-- ----------------------------
DROP TABLE IF EXISTS `p_wallet_recharge`;
CREATE TABLE `p_wallet_recharge` (
- `id` bigint unsigned NOT NULL AUTO_INCREMENT COMMENT '充值ID',
- `user_id` bigint unsigned NOT NULL DEFAULT '0' COMMENT '用户ID',
- `amount` bigint NOT NULL DEFAULT '0' COMMENT '充值金额',
+ `id` BIGINT NOT NULL AUTO_INCREMENT COMMENT '充值ID',
+ `user_id` BIGINT NOT NULL DEFAULT '0' COMMENT '用户ID',
+ `amount` BIGINT NOT NULL DEFAULT '0' COMMENT '充值金额',
`trade_no` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '支付宝订单号',
`trade_status` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '交易状态',
- `created_on` bigint unsigned NOT NULL DEFAULT '0' COMMENT '创建时间',
- `modified_on` bigint unsigned NOT NULL DEFAULT '0' COMMENT '修改时间',
- `deleted_on` bigint unsigned NOT NULL DEFAULT '0' COMMENT '删除时间',
- `is_del` tinyint unsigned NOT NULL DEFAULT '0' COMMENT '是否删除 0 为未删除、1 为已删除',
+ `created_on` BIGINT NOT NULL DEFAULT '0' COMMENT '创建时间',
+ `modified_on` BIGINT NOT NULL DEFAULT '0' COMMENT '修改时间',
+ `deleted_on` BIGINT NOT NULL DEFAULT '0' COMMENT '删除时间',
+ `is_del` tinyint NOT NULL DEFAULT '0' COMMENT '是否删除 0 为未删除、1 为已删除',
PRIMARY KEY (`id`) USING BTREE,
KEY `idx_wallet_recharge_user_id` (`user_id`) USING BTREE,
KEY `idx_wallet_recharge_trade_no` (`trade_no`) USING BTREE,
@@ -416,16 +454,16 @@ CREATE TABLE `p_wallet_recharge` (
-- ----------------------------
DROP TABLE IF EXISTS `p_wallet_statement`;
CREATE TABLE `p_wallet_statement` (
- `id` bigint unsigned NOT NULL AUTO_INCREMENT COMMENT '账单ID',
- `user_id` bigint unsigned NOT NULL DEFAULT '0' COMMENT '用户ID',
- `change_amount` bigint NOT NULL DEFAULT '0' COMMENT '变动金额',
- `balance_snapshot` bigint NOT NULL DEFAULT '0' COMMENT '资金快照',
+ `id` BIGINT NOT NULL AUTO_INCREMENT COMMENT '账单ID',
+ `user_id` BIGINT NOT NULL DEFAULT '0' COMMENT '用户ID',
+ `change_amount` BIGINT NOT NULL DEFAULT '0' COMMENT '变动金额',
+ `balance_snapshot` BIGINT NOT NULL DEFAULT '0' COMMENT '资金快照',
`reason` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '变动原因',
- `post_id` bigint unsigned NOT NULL DEFAULT '0' COMMENT '关联动态',
- `created_on` bigint unsigned NOT NULL DEFAULT '0' COMMENT '创建时间',
- `modified_on` bigint unsigned NOT NULL DEFAULT '0' COMMENT '修改时间',
- `deleted_on` bigint unsigned NOT NULL DEFAULT '0' COMMENT '删除时间',
- `is_del` tinyint unsigned NOT NULL DEFAULT '0' COMMENT '是否删除 0 为未删除、1 为已删除',
+ `post_id` BIGINT NOT NULL DEFAULT '0' COMMENT '关联动态',
+ `created_on` BIGINT NOT NULL DEFAULT '0' COMMENT '创建时间',
+ `modified_on` BIGINT NOT NULL DEFAULT '0' COMMENT '修改时间',
+ `deleted_on` BIGINT NOT NULL DEFAULT '0' COMMENT '删除时间',
+ `is_del` tinyint NOT NULL DEFAULT '0' COMMENT '是否删除 0 为未删除、1 为已删除',
PRIMARY KEY (`id`) USING BTREE,
KEY `idx_wallet_statement_user_id` (`user_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=10010 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='钱包流水';
diff --git a/scripts/paopao-postgres.sql b/scripts/paopao-postgres.sql
index 5fac9de0..34736ce4 100644
--- a/scripts/paopao-postgres.sql
+++ b/scripts/paopao-postgres.sql
@@ -43,8 +43,10 @@ CREATE TABLE p_comment (
user_id BIGINT NOT NULL DEFAULT 0,
ip VARCHAR(64) NOT NULL DEFAULT '',
ip_loc VARCHAR(64) NOT NULL DEFAULT '',
- thumbs_up_count int NOT NULL DEFAULT 0, -- 点赞数
- thumbs_down_count int NOT NULL DEFAULT 0, -- 点踩数
+ is_essence SMALLINT NOT NULL DEFAULT 0,
+ reply_count INT NOT NULL DEFAULT 0, -- 回复数
+ thumbs_up_count INT NOT NULL DEFAULT 0, -- 点赞数
+ thumbs_down_count INT NOT NULL DEFAULT 0, -- 点踩数
created_on BIGINT NOT NULL DEFAULT 0,
modified_on BIGINT NOT NULL DEFAULT 0,
deleted_on BIGINT NOT NULL DEFAULT 0,
@@ -89,6 +91,20 @@ CREATE TABLE p_comment_reply (
);
CREATE INDEX idx_comment_reply_comment_id ON p_comment_reply USING btree (comment_id);
+CREATE TABLE p_comment_metric (
+ id BIGSERIAL PRIMARY KEY,
+ comment_id BIGINT NOT NULL,
+ rank_score BIGINT NOT NULL DEFAULT 0,
+ incentive_score INT NOT NULL DEFAULT 0,
+ decay_factor INT NOT NULL DEFAULT 0,
+ motivation_factor INT NOT NULL DEFAULT 0,
+ is_del SMALLINT NOT NULL DEFAULT 0,
+ created_on BIGINT NOT NULL DEFAULT 0,
+ modified_on BIGINT NOT NULL DEFAULT 0,
+ deleted_on BIGINT NOT NULL DEFAULT 0
+);
+CREATE INDEX idx_comment_metric_comment_id_rank_score ON p_comment_metric USING btree (comment_id, rank_score);
+
DROP TABLE IF EXISTS p_tweet_comment_thumbs;
CREATE TABLE p_tweet_comment_thumbs (
id BIGSERIAL PRIMARY KEY,
@@ -280,6 +296,18 @@ CREATE TABLE p_user (
CREATE UNIQUE INDEX idx_user_username ON p_user USING btree (username);
CREATE INDEX idx_user_phone ON p_user USING btree (phone);
+CREATE TABLE p_user_metric (
+ id BIGSERIAL PRIMARY KEY,
+ user_id BIGINT NOT NULL,
+ tweets_count INT NOT NULL DEFAULT 0,
+ latest_trends_on BIGINT NOT NULL DEFAULT 0,
+ is_del SMALLINT NOT NULL DEFAULT 0,
+ created_on BIGINT NOT NULL DEFAULT 0,
+ modified_on BIGINT NOT NULL DEFAULT 0,
+ deleted_on BIGINT NOT NULL DEFAULT 0
+);
+CREATE INDEX idx_user_metric_user_id_tweets_count_trends ON p_user_metric USING btree (user_id, tweets_count, latest_trends_on);
+
DROP TABLE IF EXISTS p_following;
CREATE TABLE p_following (
id BIGSERIAL PRIMARY KEY,
diff --git a/scripts/paopao-sqlite3.sql b/scripts/paopao-sqlite3.sql
index 0c5de46f..49fd68c0 100644
--- a/scripts/paopao-sqlite3.sql
+++ b/scripts/paopao-sqlite3.sql
@@ -46,6 +46,7 @@ CREATE TABLE "p_comment" (
"user_id" integer NOT NULL,
"ip" text(64) NOT NULL,
"ip_loc" text(64) NOT NULL,
+ "is_essence" integer NOT NULL DEFAULT 0,
"thumbs_up_count" integer NOT NULL DEFAULT 0, -- 点赞数
"thumbs_down_count" integer NOT NULL DEFAULT 0, -- 点踩数
"created_on" integer NOT NULL,
@@ -94,6 +95,23 @@ CREATE TABLE "p_comment_reply" (
PRIMARY KEY ("id")
);
+-- ----------------------------
+-- Table structure for p_comment_metric
+-- ----------------------------
+CREATE TABLE p_comment_metric (
+ "id" integer,
+ "comment_id" integer NOT NULL,
+ "rank_score" integer NOT NULL DEFAULT 0,
+ "incentive_score" integer NOT NULL DEFAULT 0,
+ "decay_factor" integer NOT NULL DEFAULT 0,
+ "motivation_factor" integer NOT NULL DEFAULT 0,
+ "is_del" integer NOT NULL DEFAULT 0,
+ "created_on" integer NOT NULL DEFAULT 0,
+ "modified_on" integer NOT NULL DEFAULT 0,
+ "deleted_on" integer NOT NULL DEFAULT 0,
+ PRIMARY KEY ("id")
+);
+
-- ----------------------------
-- Table structure for p_tweet_comment_thumbs
-- ----------------------------
@@ -354,6 +372,21 @@ CREATE TABLE "p_user" (
PRIMARY KEY ("id")
);
+-- ----------------------------
+-- Table structure for p_user_metric
+-- ----------------------------
+CREATE TABLE "p_user_metric" (
+ "id" integer,
+ "user_id" integer NOT NULL,
+ "tweets_count" integer NOT NULL DEFAULT 0,
+ "latest_trends_on" integer NOT NULL DEFAULT 0,
+ "is_del" integer NOT NULL DEFAULT 0,
+ "created_on" integer NOT NULL DEFAULT 0,
+ "modified_on" integer NOT NULL DEFAULT 0,
+ "deleted_on" integer NOT NULL DEFAULT 0,
+ PRIMARY KEY ("id")
+);
+
-- ----------------------------
-- Table structure for p_wallet_recharge
-- ----------------------------
@@ -488,6 +521,15 @@ ON "p_comment_reply" (
"comment_id" ASC
);
+-- ----------------------------
+-- Indexes structure for table p_comment_metric
+-- ----------------------------
+CREATE INDEX "idx_comment_metric_comment_id_rank_score"
+ON "p_comment_metric" (
+ "comment_id" ASC,
+ "rank_score" ASC
+);
+
-- ----------------------------
-- Indexes structure for table idx_tweet_comment_thumbs_uid_tid
-- ----------------------------
@@ -643,6 +685,16 @@ ON "p_user" (
"username" ASC
);
+-- ----------------------------
+-- Indexes structure for table p_user_metric
+-- ----------------------------
+CREATE INDEX "idx_user_metric_user_id_tweets_count_trends"
+ON "p_user_metric" (
+ "user_id" ASC,
+ "tweets_count" ASC,
+ "latest_trends_on" ASC
+);
+
-- ----------------------------
-- Indexes structure for table p_wallet_recharge
-- ----------------------------
diff --git a/web/dist/assets/404-e41e3193.js b/web/dist/assets/404-a87dcc10.js
similarity index 75%
rename from web/dist/assets/404-e41e3193.js
rename to web/dist/assets/404-a87dcc10.js
index 044017e5..b0c89f11 100644
--- a/web/dist/assets/404-e41e3193.js
+++ b/web/dist/assets/404-a87dcc10.js
@@ -1 +1 @@
-import{_ as s}from"./main-nav.vue_vue_type_style_index_0_lang-2982e04a.js";import{u as i}from"./vue-router-e5a2430e.js";import{F as a,e as c,a2 as u}from"./naive-ui-d8de3dda.js";import{d as l,f as d,k as t,w as o,e as f,A as x}from"./@vue-a481fc63.js";import{_ as g}from"./index-4a465428.js";import"./vuex-44de225f.js";import"./vooks-6d99783e.js";import"./evtd-b614532e.js";import"./@vicons-7a4ef312.js";import"./seemly-76b7b838.js";import"./vueuc-39372edb.js";import"./@css-render-7124a1a5.js";import"./vdirs-b0483831.js";import"./@juggle-41516555.js";import"./css-render-6a5c5852.js";import"./@emotion-8a8e73f6.js";import"./lodash-es-8412e618.js";import"./treemate-25c27bff.js";import"./async-validator-dee29e8b.js";import"./date-fns-975a2d8f.js";import"./axios-4a70c6fc.js";import"./moment-2ab8298d.js";/* empty css */const v=l({__name:"404",setup(h){const e=i(),_=()=>{e.push({path:"/"})};return(k,w)=>{const n=s,p=c,r=u,m=a;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 O=g(v,[["__scopeId","data-v-e62daa85"]]);export{O as default};
+import{_ as s}from"./main-nav.vue_vue_type_style_index_0_lang-93352cc4.js";import{u as i}from"./vue-router-e5a2430e.js";import{G as a,e as c,a2 as u}from"./naive-ui-defd0b2d.js";import{d as l,f as d,k as t,w as o,e as f,A as x}from"./@vue-a481fc63.js";import{_ as g}from"./index-daff1b26.js";import"./vuex-44de225f.js";import"./vooks-6d99783e.js";import"./evtd-b614532e.js";import"./@vicons-c265fba6.js";import"./seemly-76b7b838.js";import"./vueuc-39372edb.js";import"./@css-render-7124a1a5.js";import"./vdirs-b0483831.js";import"./@juggle-41516555.js";import"./css-render-6a5c5852.js";import"./@emotion-8a8e73f6.js";import"./lodash-es-8412e618.js";import"./treemate-25c27bff.js";import"./async-validator-dee29e8b.js";import"./date-fns-975a2d8f.js";import"./axios-4a70c6fc.js";import"./moment-2ab8298d.js";/* empty css */const v=l({__name:"404",setup(h){const e=i(),_=()=>{e.push({path:"/"})};return(k,w)=>{const n=s,p=c,r=u,m=a;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 O=g(v,[["__scopeId","data-v-e62daa85"]]);export{O as default};
diff --git a/web/dist/assets/@vicons-7a4ef312.js b/web/dist/assets/@vicons-c265fba6.js
similarity index 57%
rename from web/dist/assets/@vicons-7a4ef312.js
rename to web/dist/assets/@vicons-c265fba6.js
index da66411f..d28bc3f5 100644
--- a/web/dist/assets/@vicons-7a4ef312.js
+++ b/web/dist/assets/@vicons-c265fba6.js
@@ -1 +1 @@
-import{d as n,e as o,f as e,j as t,z as i}from"./@vue-a481fc63.js";const c={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},h=t("path",{d:"M216.08 192v143.85a40.08 40.08 0 0 0 80.15 0l.13-188.55a67.94 67.94 0 1 0-135.87 0v189.82a95.51 95.51 0 1 0 191 0V159.74",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-miterlimit":"10","stroke-width":"32"},null,-1),d=[h],r1=n({name:"AttachOutline",render:function(s,l){return o(),e("svg",c,d)}}),a={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},w=t("circle",{fill:"none",stroke:"currentColor","stroke-miterlimit":"10","stroke-width":"32",cx:"256",cy:"56",r:"40"},null,-1),u=t("path",{fill:"none",stroke:"currentColor","stroke-miterlimit":"10","stroke-width":"32",d:"M199.3 295.62h0l-30.4 172.2a24 24 0 0 0 19.5 27.8a23.76 23.76 0 0 0 27.6-19.5l21-119.9v.2s5.2-32.5 17.5-32.5h3.1c12.5 0 17.5 32.5 17.5 32.5v-.1l21 119.9a23.92 23.92 0 1 0 47.1-8.4l-30.4-172.2l-4.9-29.7c-2.9-18.1-4.2-47.6.5-59.7c4-10.4 14.13-14.2 23.2-14.2H424a24 24 0 0 0 0-48H88a24 24 0 0 0 0 48h92.5c9.23 0 19.2 3.8 23.2 14.2c4.7 12.1 3.4 41.6.5 59.7z"},null,-1),_=[w,u],s1=n({name:"BodyOutline",render:function(s,l){return o(),e("svg",a,_)}}),k={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},p=t("path",{d:"M400 480a16 16 0 0 1-10.63-4L256 357.41L122.63 476A16 16 0 0 1 96 464V96a64.07 64.07 0 0 1 64-64h192a64.07 64.07 0 0 1 64 64v368a16 16 0 0 1-16 16z",fill:"currentColor"},null,-1),x=[p],l1=n({name:"Bookmark",render:function(s,l){return o(),e("svg",k,x)}}),m={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},g=t("path",{d:"M352 48H160a48 48 0 0 0-48 48v368l144-128l144 128V96a48 48 0 0 0-48-48z",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32"},null,-1),v=[g],i1=n({name:"BookmarkOutline",render:function(s,l){return o(),e("svg",m,v)}}),$={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},f=t("path",{d:"M128 80V64a48.14 48.14 0 0 1 48-48h224a48.14 48.14 0 0 1 48 48v368l-80-64",fill:"none",stroke:"currentColor","stroke-linejoin":"round","stroke-width":"32"},null,-1),C=t("path",{d:"M320 96H112a48.14 48.14 0 0 0-48 48v352l152-128l152 128V144a48.14 48.14 0 0 0-48-48z",fill:"none",stroke:"currentColor","stroke-linejoin":"round","stroke-width":"32"},null,-1),M=[f,C],c1=n({name:"BookmarksOutline",render:function(s,l){return o(),e("svg",$,M)}}),O={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},j=t("path",{d:"M408 64H104a56.16 56.16 0 0 0-56 56v192a56.16 56.16 0 0 0 56 56h40v80l93.72-78.14a8 8 0 0 1 5.13-1.86H408a56.16 56.16 0 0 0 56-56V120a56.16 56.16 0 0 0-56-56z",fill:"none",stroke:"currentColor","stroke-linejoin":"round","stroke-width":"32"},null,-1),z=[j],h1=n({name:"ChatboxOutline",render:function(s,l){return o(),e("svg",O,z)}}),B={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},L=t("path",{d:"M431 320.6c-1-3.6 1.2-8.6 3.3-12.2a33.68 33.68 0 0 1 2.1-3.1A162 162 0 0 0 464 215c.3-92.2-77.5-167-173.7-167c-83.9 0-153.9 57.1-170.3 132.9a160.7 160.7 0 0 0-3.7 34.2c0 92.3 74.8 169.1 171 169.1c15.3 0 35.9-4.6 47.2-7.7s22.5-7.2 25.4-8.3a26.44 26.44 0 0 1 9.3-1.7a26 26 0 0 1 10.1 2l56.7 20.1a13.52 13.52 0 0 0 3.9 1a8 8 0 0 0 8-8a12.85 12.85 0 0 0-.5-2.7z",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-miterlimit":"10","stroke-width":"32"},null,-1),H=t("path",{d:"M66.46 232a146.23 146.23 0 0 0 6.39 152.67c2.31 3.49 3.61 6.19 3.21 8s-11.93 61.87-11.93 61.87a8 8 0 0 0 2.71 7.68A8.17 8.17 0 0 0 72 464a7.26 7.26 0 0 0 2.91-.6l56.21-22a15.7 15.7 0 0 1 12 .2c18.94 7.38 39.88 12 60.83 12A159.21 159.21 0 0 0 284 432.11",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-miterlimit":"10","stroke-width":"32"},null,-1),V=[L,H],d1=n({name:"ChatbubblesOutline",render:function(s,l){return o(),e("svg",B,V)}}),A={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},y=t("path",{d:"M256 48C141.31 48 48 141.31 48 256s93.31 208 208 208s208-93.31 208-208S370.69 48 256 48zm108.25 138.29l-134.4 160a16 16 0 0 1-12 5.71h-.27a16 16 0 0 1-11.89-5.3l-57.6-64a16 16 0 1 1 23.78-21.4l45.29 50.32l122.59-145.91a16 16 0 0 1 24.5 20.58z",fill:"currentColor"},null,-1),b=[y],a1=n({name:"CheckmarkCircle",render:function(s,l){return o(),e("svg",A,b)}}),S={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},P=t("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32",d:"M464 128L240 384l-96-96"},null,-1),T=t("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32",d:"M144 384l-96-96"},null,-1),D=t("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32",d:"M368 128L232 284"},null,-1),E=[P,T,D],w1=n({name:"CheckmarkDoneOutline",render:function(s,l){return o(),e("svg",S,E)}}),R={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},F=t("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32",d:"M416 128L192 384l-96-96"},null,-1),q=[F],u1=n({name:"CheckmarkOutline",render:function(s,l){return o(),e("svg",R,q)}}),I={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},N=t("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32",d:"M368 368L144 144"},null,-1),U=t("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32",d:"M368 144L144 368"},null,-1),W=[N,U],_1=n({name:"CloseOutline",render:function(s,l){return o(),e("svg",I,W)}}),G={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},J=t("path",{d:"M320 336h76c55 0 100-21.21 100-75.6s-53-73.47-96-75.6C391.11 99.74 329 48 256 48c-69 0-113.44 45.79-128 91.2c-60 5.7-112 35.88-112 98.4S70 336 136 336h56",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32"},null,-1),K=t("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32",d:"M192 400.1l64 63.9l64-63.9"},null,-1),Q=t("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32",d:"M256 224v224.03"},null,-1),X=[J,K,Q],k1=n({name:"CloudDownloadOutline",render:function(s,l){return o(),e("svg",G,X)}}),Y={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},Z=t("path",{d:"M448 256c0-106-86-192-192-192S64 150 64 256s86 192 192 192s192-86 192-192z",fill:"none",stroke:"currentColor","stroke-miterlimit":"10","stroke-width":"32"},null,-1),tt=t("path",{d:"M350.67 150.93l-117.2 46.88a64 64 0 0 0-35.66 35.66l-46.88 117.2a8 8 0 0 0 10.4 10.4l117.2-46.88a64 64 0 0 0 35.66-35.66l46.88-117.2a8 8 0 0 0-10.4-10.4zM256 280a24 24 0 1 1 24-24a24 24 0 0 1-24 24z",fill:"currentColor"},null,-1),nt=[Z,tt],p1=n({name:"CompassOutline",render:function(s,l){return o(),e("svg",Y,nt)}}),ot={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},et=t("path",{d:"M448 341.37V170.61A32 32 0 0 0 432.11 143l-152-88.46a47.94 47.94 0 0 0-48.24 0L79.89 143A32 32 0 0 0 64 170.61v170.76A32 32 0 0 0 79.89 369l152 88.46a48 48 0 0 0 48.24 0l152-88.46A32 32 0 0 0 448 341.37z",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32"},null,-1),rt=t("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32",d:"M69 153.99l187 110l187-110"},null,-1),st=t("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32",d:"M256 463.99v-200"},null,-1),lt=[et,rt,st],x1=n({name:"CubeOutline",render:function(s,l){return o(),e("svg",ot,lt)}}),it={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},ct=i('',5),ht=[ct],m1=n({name:"EyeOffOutline",render:function(s,l){return o(),e("svg",it,ht)}}),dt={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},at=t("path",{d:"M255.66 112c-77.94 0-157.89 45.11-220.83 135.33a16 16 0 0 0-.27 17.77C82.92 340.8 161.8 400 255.66 400c92.84 0 173.34-59.38 221.79-135.25a16.14 16.14 0 0 0 0-17.47C428.89 172.28 347.8 112 255.66 112z",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32"},null,-1),wt=t("circle",{cx:"256",cy:"256",r:"80",fill:"none",stroke:"currentColor","stroke-miterlimit":"10","stroke-width":"32"},null,-1),ut=[at,wt],g1=n({name:"EyeOutline",render:function(s,l){return o(),e("svg",dt,ut)}}),_t={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},kt=t("path",{d:"M112 320c0-93 124-165 96-272c66 0 192 96 192 272a144 144 0 0 1-288 0z",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32"},null,-1),pt=t("path",{d:"M320 368c0 57.71-32 80-64 80s-64-22.29-64-80s40-86 32-128c42 0 96 70.29 96 128z",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32"},null,-1),xt=[kt,pt],v1=n({name:"FlameOutline",render:function(s,l){return o(),e("svg",_t,xt)}}),mt={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},gt=t("path",{d:"M256 448a32 32 0 0 1-18-5.57c-78.59-53.35-112.62-89.93-131.39-112.8c-40-48.75-59.15-98.8-58.61-153C48.63 114.52 98.46 64 159.08 64c44.08 0 74.61 24.83 92.39 45.51a6 6 0 0 0 9.06 0C278.31 88.81 308.84 64 352.92 64c60.62 0 110.45 50.52 111.08 112.64c.54 54.21-18.63 104.26-58.61 153c-18.77 22.87-52.8 59.45-131.39 112.8a32 32 0 0 1-18 5.56z",fill:"currentColor"},null,-1),vt=[gt],$1=n({name:"Heart",render:function(s,l){return o(),e("svg",mt,vt)}}),$t={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},ft=t("path",{d:"M352.92 80C288 80 256 144 256 144s-32-64-96.92-64c-52.76 0-94.54 44.14-95.08 96.81c-1.1 109.33 86.73 187.08 183 252.42a16 16 0 0 0 18 0c96.26-65.34 184.09-143.09 183-252.42c-.54-52.67-42.32-96.81-95.08-96.81z",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32"},null,-1),Ct=[ft],f1=n({name:"HeartOutline",render:function(s,l){return o(),e("svg",$t,Ct)}}),Mt={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},Ot=t("path",{d:"M80 212v236a16 16 0 0 0 16 16h96V328a24 24 0 0 1 24-24h80a24 24 0 0 1 24 24v136h96a16 16 0 0 0 16-16V212",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32"},null,-1),jt=t("path",{d:"M480 256L266.89 52c-5-5.28-16.69-5.34-21.78 0L32 256",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32"},null,-1),zt=t("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32",d:"M400 179V64h-48v69"},null,-1),Bt=[Ot,jt,zt],C1=n({name:"HomeOutline",render:function(s,l){return o(),e("svg",Mt,Bt)}}),Lt={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},Ht=t("rect",{x:"48",y:"80",width:"416",height:"352",rx:"48",ry:"48",fill:"none",stroke:"currentColor","stroke-linejoin":"round","stroke-width":"32"},null,-1),Vt=t("circle",{cx:"336",cy:"176",r:"32",fill:"none",stroke:"currentColor","stroke-miterlimit":"10","stroke-width":"32"},null,-1),At=t("path",{d:"M304 335.79l-90.66-90.49a32 32 0 0 0-43.87-1.3L48 352",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32"},null,-1),yt=t("path",{d:"M224 432l123.34-123.34a32 32 0 0 1 43.11-2L464 368",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32"},null,-1),bt=[Ht,Vt,At,yt],M1=n({name:"ImageOutline",render:function(s,l){return o(),e("svg",Lt,bt)}}),St={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},Pt=t("path",{d:"M321.89 171.42C233 114 141 155.22 56 65.22c-19.8-21-8.3 235.5 98.1 332.7c77.79 71 197.9 63.08 238.4-5.92s18.28-163.17-70.61-220.58z",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32"},null,-1),Tt=t("path",{d:"M173 253c86 81 175 129 292 147",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32"},null,-1),Dt=[Pt,Tt],O1=n({name:"LeafOutline",render:function(s,l){return o(),e("svg",St,Dt)}}),Et={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},Rt=t("path",{d:"M208 352h-64a96 96 0 0 1 0-192h64",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"36"},null,-1),Ft=t("path",{d:"M304 160h64a96 96 0 0 1 0 192h-64",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"36"},null,-1),qt=t("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"36",d:"M163.29 256h187.42"},null,-1),It=[Rt,Ft,qt],j1=n({name:"LinkOutline",render:function(s,l){return o(),e("svg",Et,It)}}),Nt={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},Ut=t("path",{d:"M336 208v-95a80 80 0 0 0-160 0v95",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32"},null,-1),Wt=t("rect",{x:"96",y:"208",width:"320",height:"272",rx:"48",ry:"48",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32"},null,-1),Gt=[Ut,Wt],z1=n({name:"LockClosedOutline",render:function(s,l){return o(),e("svg",Nt,Gt)}}),Jt={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},Kt=t("path",{d:"M336 112a80 80 0 0 0-160 0v96",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32"},null,-1),Qt=t("rect",{x:"96",y:"208",width:"320",height:"272",rx:"48",ry:"48",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32"},null,-1),Xt=[Kt,Qt],B1=n({name:"LockOpenOutline",render:function(s,l){return o(),e("svg",Jt,Xt)}}),Yt={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},Zt=t("path",{d:"M304 336v40a40 40 0 0 1-40 40H104a40 40 0 0 1-40-40V136a40 40 0 0 1 40-40h152c22.09 0 48 17.91 48 40v40",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32"},null,-1),tn=t("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32",d:"M368 336l80-80l-80-80"},null,-1),nn=t("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32",d:"M176 256h256"},null,-1),on=[Zt,tn,nn],L1=n({name:"LogOutOutline",render:function(s,l){return o(),e("svg",Yt,on)}}),en={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},rn=t("path",{d:"M102.41 32C62.38 32 32 64.12 32 103.78v304.45C32 447.86 64.38 480 104.41 480h303.2c40 0 72.39-32.14 72.39-71.77v-3.11c-1.35-.56-115.47-48.57-174.5-76.7c-39.82 48.57-91.18 78-144.5 78c-90.18 0-120.8-78.22-78.1-129.72c9.31-11.22 25.15-21.94 49.73-28c38.45-9.36 99.64 5.85 157 24.61a309.41 309.41 0 0 0 25.46-61.67H138.34V194h91.13v-31.83H119.09v-17.75h110.38V99s0-7.65 7.82-7.65h44.55v53H391v17.75H281.84V194h89.08a359.41 359.41 0 0 1-37.72 94.43c27 9.69 49.31 18.88 67.39 24.89c60.32 20 77.23 22.45 79.41 22.7V103.78C480 64.12 447.6 32 407.61 32h-305.2zM152 274.73q-5.81.06-11.67.63c-11.3 1.13-32.5 6.07-44.09 16.23c-34.74 30-13.94 84.93 56.37 84.93c40.87 0 81.71-25.9 113.79-67.37c-41.36-20-77-34.85-114.4-34.42z",fill:"currentColor"},null,-1),sn=[rn],H1=n({name:"LogoAlipay",render:function(s,l){return o(),e("svg",en,sn)}}),ln={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},cn=i('',6),hn=[cn],V1=n({name:"MegaphoneOutline",render:function(s,l){return o(),e("svg",ln,hn)}}),dn={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},an=t("path",{d:"M53.12 199.94l400-151.39a8 8 0 0 1 10.33 10.33l-151.39 400a8 8 0 0 1-15-.34l-67.4-166.09a16 16 0 0 0-10.11-10.11L53.46 215a8 8 0 0 1-.34-15.06z",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32"},null,-1),wn=t("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32",d:"M460 52L227 285"},null,-1),un=[an,wn],A1=n({name:"PaperPlaneOutline",render:function(s,l){return o(),e("svg",dn,un)}}),_n={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},kn=t("path",{d:"M402 168c-2.93 40.67-33.1 72-66 72s-63.12-31.32-66-72c-3-42.31 26.37-72 66-72s69 30.46 66 72z",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32"},null,-1),pn=t("path",{d:"M336 304c-65.17 0-127.84 32.37-143.54 95.41c-2.08 8.34 3.15 16.59 11.72 16.59h263.65c8.57 0 13.77-8.25 11.72-16.59C463.85 335.36 401.18 304 336 304z",fill:"none",stroke:"currentColor","stroke-miterlimit":"10","stroke-width":"32"},null,-1),xn=t("path",{d:"M200 185.94c-2.34 32.48-26.72 58.06-53 58.06s-50.7-25.57-53-58.06C91.61 152.15 115.34 128 147 128s55.39 24.77 53 57.94z",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32"},null,-1),mn=t("path",{d:"M206 306c-18.05-8.27-37.93-11.45-59-11.45c-52 0-102.1 25.85-114.65 76.2c-1.65 6.66 2.53 13.25 9.37 13.25H154",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-miterlimit":"10","stroke-width":"32"},null,-1),gn=[kn,pn,xn,mn],y1=n({name:"PeopleOutline",render:function(s,l){return o(),e("svg",_n,gn)}}),vn={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},$n=t("path",{d:"M376 144c-3.92 52.87-44 96-88 96s-84.15-43.12-88-96c-4-55 35-96 88-96s92 42 88 96z",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32"},null,-1),fn=t("path",{d:"M288 304c-87 0-175.3 48-191.64 138.6c-2 10.92 4.21 21.4 15.65 21.4H464c11.44 0 17.62-10.48 15.65-21.4C463.3 352 375 304 288 304z",fill:"none",stroke:"currentColor","stroke-miterlimit":"10","stroke-width":"32"},null,-1),Cn=t("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32",d:"M88 176v112"},null,-1),Mn=t("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32",d:"M144 232H32"},null,-1),On=[$n,fn,Cn,Mn],b1=n({name:"PersonAddOutline",render:function(s,l){return o(),e("svg",vn,On)}}),jn={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},zn=t("path",{d:"M344 144c-3.92 52.87-44 96-88 96s-84.15-43.12-88-96c-4-55 35-96 88-96s92 42 88 96z",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32"},null,-1),Bn=t("path",{d:"M256 304c-87 0-175.3 48-191.64 138.6C62.39 453.52 68.57 464 80 464h352c11.44 0 17.62-10.48 15.65-21.4C431.3 352 343 304 256 304z",fill:"none",stroke:"currentColor","stroke-miterlimit":"10","stroke-width":"32"},null,-1),Ln=[zn,Bn],S1=n({name:"PersonOutline",render:function(s,l){return o(),e("svg",jn,Ln)}}),Hn={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},Vn=t("path",{d:"M376 144c-3.92 52.87-44 96-88 96s-84.15-43.12-88-96c-4-55 35-96 88-96s92 42 88 96z",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32"},null,-1),An=t("path",{d:"M288 304c-87 0-175.3 48-191.64 138.6c-2 10.92 4.21 21.4 15.65 21.4H464c11.44 0 17.62-10.48 15.65-21.4C463.3 352 375 304 288 304z",fill:"none",stroke:"currentColor","stroke-miterlimit":"10","stroke-width":"32"},null,-1),yn=t("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32",d:"M144 232H32"},null,-1),bn=[Vn,An,yn],P1=n({name:"PersonRemoveOutline",render:function(s,l){return o(),e("svg",Hn,bn)}}),Sn={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},Pn=t("path",{d:"M336 336h40a40 40 0 0 0 40-40V88a40 40 0 0 0-40-40H136a40 40 0 0 0-40 40v208a40 40 0 0 0 40 40h40",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32"},null,-1),Tn=t("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32",d:"M176 240l80-80l80 80"},null,-1),Dn=t("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32",d:"M256 464V176"},null,-1),En=[Pn,Tn,Dn],T1=n({name:"PushOutline",render:function(s,l){return o(),e("svg",Sn,En)}}),Rn={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},Fn=t("path",{d:"M456.69 421.39L362.6 327.3a173.81 173.81 0 0 0 34.84-104.58C397.44 126.38 319.06 48 222.72 48S48 126.38 48 222.72s78.38 174.72 174.72 174.72A173.81 173.81 0 0 0 327.3 362.6l94.09 94.09a25 25 0 0 0 35.3-35.3zM97.92 222.72a124.8 124.8 0 1 1 124.8 124.8a124.95 124.95 0 0 1-124.8-124.8z",fill:"currentColor"},null,-1),qn=[Fn],D1=n({name:"Search",render:function(s,l){return o(),e("svg",Rn,qn)}}),In={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},Nn=t("path",{d:"M262.29 192.31a64 64 0 1 0 57.4 57.4a64.13 64.13 0 0 0-57.4-57.4zM416.39 256a154.34 154.34 0 0 1-1.53 20.79l45.21 35.46a10.81 10.81 0 0 1 2.45 13.75l-42.77 74a10.81 10.81 0 0 1-13.14 4.59l-44.9-18.08a16.11 16.11 0 0 0-15.17 1.75A164.48 164.48 0 0 1 325 400.8a15.94 15.94 0 0 0-8.82 12.14l-6.73 47.89a11.08 11.08 0 0 1-10.68 9.17h-85.54a11.11 11.11 0 0 1-10.69-8.87l-6.72-47.82a16.07 16.07 0 0 0-9-12.22a155.3 155.3 0 0 1-21.46-12.57a16 16 0 0 0-15.11-1.71l-44.89 18.07a10.81 10.81 0 0 1-13.14-4.58l-42.77-74a10.8 10.8 0 0 1 2.45-13.75l38.21-30a16.05 16.05 0 0 0 6-14.08c-.36-4.17-.58-8.33-.58-12.5s.21-8.27.58-12.35a16 16 0 0 0-6.07-13.94l-38.19-30A10.81 10.81 0 0 1 49.48 186l42.77-74a10.81 10.81 0 0 1 13.14-4.59l44.9 18.08a16.11 16.11 0 0 0 15.17-1.75A164.48 164.48 0 0 1 187 111.2a15.94 15.94 0 0 0 8.82-12.14l6.73-47.89A11.08 11.08 0 0 1 213.23 42h85.54a11.11 11.11 0 0 1 10.69 8.87l6.72 47.82a16.07 16.07 0 0 0 9 12.22a155.3 155.3 0 0 1 21.46 12.57a16 16 0 0 0 15.11 1.71l44.89-18.07a10.81 10.81 0 0 1 13.14 4.58l42.77 74a10.8 10.8 0 0 1-2.45 13.75l-38.21 30a16.05 16.05 0 0 0-6.05 14.08c.33 4.14.55 8.3.55 12.47z",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32"},null,-1),Un=[Nn],E1=n({name:"SettingsOutline",render:function(s,l){return o(),e("svg",In,Un)}}),Wn={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},Gn=t("path",{d:"M336 192h40a40 40 0 0 1 40 40v192a40 40 0 0 1-40 40H136a40 40 0 0 1-40-40V232a40 40 0 0 1 40-40h40",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32"},null,-1),Jn=t("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32",d:"M336 128l-80-80l-80 80"},null,-1),Kn=t("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32",d:"M256 321V48"},null,-1),Qn=[Gn,Jn,Kn],R1=n({name:"ShareOutline",render:function(s,l){return o(),e("svg",Wn,Qn)}}),Xn={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},Yn=i('',5),Zn=[Yn],F1=n({name:"ShareSocialOutline",render:function(s,l){return o(),e("svg",Xn,Zn)}}),to={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},no=i('',6),oo=[no],q1=n({name:"TrashOutline",render:function(s,l){return o(),e("svg",to,oo)}}),eo={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},ro=t("path",{d:"M374.79 308.78L457.5 367a16 16 0 0 0 22.5-14.62V159.62A16 16 0 0 0 457.5 145l-82.71 58.22A16 16 0 0 0 368 216.3v79.4a16 16 0 0 0 6.79 13.08z",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32"},null,-1),so=t("path",{d:"M268 384H84a52.15 52.15 0 0 1-52-52V180a52.15 52.15 0 0 1 52-52h184.48A51.68 51.68 0 0 1 320 179.52V332a52.15 52.15 0 0 1-52 52z",fill:"none",stroke:"currentColor","stroke-miterlimit":"10","stroke-width":"32"},null,-1),lo=[ro,so],I1=n({name:"VideocamOutline",render:function(s,l){return o(),e("svg",eo,lo)}}),io={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},co=i('',5),ho=[co],N1=n({name:"WalkOutline",render:function(s,l){return o(),e("svg",io,ho)}}),ao={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},wo=t("rect",{x:"48",y:"144",width:"416",height:"288",rx:"48",ry:"48",fill:"none",stroke:"currentColor","stroke-linejoin":"round","stroke-width":"32"},null,-1),uo=t("path",{d:"M411.36 144v-30A50 50 0 0 0 352 64.9L88.64 109.85A50 50 0 0 0 48 159v49",fill:"none",stroke:"currentColor","stroke-linejoin":"round","stroke-width":"32"},null,-1),_o=t("path",{d:"M368 320a32 32 0 1 1 32-32a32 32 0 0 1-32 32z",fill:"currentColor"},null,-1),ko=[wo,uo,_o],U1=n({name:"WalletOutline",render:function(s,l){return o(),e("svg",ao,ko)}}),po={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},xo=t("g",{fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[t("path",{d:"M9 7H6a2 2 0 0 0-2 2v9a2 2 0 0 0 2 2h9a2 2 0 0 0 2-2v-3"}),t("path",{d:"M9 15h3l8.5-8.5a1.5 1.5 0 0 0-3-3L9 12v3"}),t("path",{d:"M16 5l3 3"})],-1),mo=[xo],W1=n({name:"Edit",render:function(s,l){return o(),e("svg",po,mo)}}),go={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},vo=i('',1),$o=[vo],G1=n({name:"Hash",render:function(s,l){return o(),e("svg",go,$o)}}),fo={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},Co=i('',1),Mo=[Co],J1=n({name:"Trash",render:function(s,l){return o(),e("svg",fo,Mo)}}),Oo={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},jo=t("path",{d:"M14.71 6.71a.996.996 0 0 0-1.41 0L8.71 11.3a.996.996 0 0 0 0 1.41l4.59 4.59a.996.996 0 1 0 1.41-1.41L10.83 12l3.88-3.88c.39-.39.38-1.03 0-1.41z",fill:"currentColor"},null,-1),zo=[jo],K1=n({name:"ChevronLeftRound",render:function(s,l){return o(),e("svg",Oo,zo)}}),Bo={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},Lo=t("path",{d:"M9.37 5.51A7.35 7.35 0 0 0 9.1 7.5c0 4.08 3.32 7.4 7.4 7.4c.68 0 1.35-.09 1.99-.27A7.014 7.014 0 0 1 12 19c-3.86 0-7-3.14-7-7c0-2.93 1.81-5.45 4.37-6.49zM12 3a9 9 0 1 0 9 9c0-.46-.04-.92-.1-1.36a5.389 5.389 0 0 1-4.4 2.26a5.403 5.403 0 0 1-3.14-9.8c-.44-.06-.9-.1-1.36-.1z",fill:"currentColor"},null,-1),Ho=[Lo],Q1=n({name:"DarkModeOutlined",render:function(s,l){return o(),e("svg",Bo,Ho)}}),Vo={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},Ao=t("path",{d:"M2 17c0 .55.45 1 1 1h18c.55 0 1-.45 1-1s-.45-1-1-1H3c-.55 0-1 .45-1 1zm0-5c0 .55.45 1 1 1h18c.55 0 1-.45 1-1s-.45-1-1-1H3c-.55 0-1 .45-1 1zm0-5c0 .55.45 1 1 1h18c.55 0 1-.45 1-1s-.45-1-1-1H3c-.55 0-1 .45-1 1z",fill:"currentColor"},null,-1),yo=[Ao],X1=n({name:"DehazeRound",render:function(s,l){return o(),e("svg",Vo,yo)}}),bo={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},So=t("path",{d:"M12 9c1.65 0 3 1.35 3 3s-1.35 3-3 3s-3-1.35-3-3s1.35-3 3-3m0-2c-2.76 0-5 2.24-5 5s2.24 5 5 5s5-2.24 5-5s-2.24-5-5-5zM2 13h2c.55 0 1-.45 1-1s-.45-1-1-1H2c-.55 0-1 .45-1 1s.45 1 1 1zm18 0h2c.55 0 1-.45 1-1s-.45-1-1-1h-2c-.55 0-1 .45-1 1s.45 1 1 1zM11 2v2c0 .55.45 1 1 1s1-.45 1-1V2c0-.55-.45-1-1-1s-1 .45-1 1zm0 18v2c0 .55.45 1 1 1s1-.45 1-1v-2c0-.55-.45-1-1-1s-1 .45-1 1zM5.99 4.58a.996.996 0 0 0-1.41 0a.996.996 0 0 0 0 1.41l1.06 1.06c.39.39 1.03.39 1.41 0s.39-1.03 0-1.41L5.99 4.58zm12.37 12.37a.996.996 0 0 0-1.41 0a.996.996 0 0 0 0 1.41l1.06 1.06c.39.39 1.03.39 1.41 0a.996.996 0 0 0 0-1.41l-1.06-1.06zm1.06-10.96a.996.996 0 0 0 0-1.41a.996.996 0 0 0-1.41 0l-1.06 1.06c-.39.39-.39 1.03 0 1.41s1.03.39 1.41 0l1.06-1.06zM7.05 18.36a.996.996 0 0 0 0-1.41a.996.996 0 0 0-1.41 0l-1.06 1.06c-.39.39-.39 1.03 0 1.41s1.03.39 1.41 0l1.06-1.06z",fill:"currentColor"},null,-1),Po=[So],Y1=n({name:"LightModeOutlined",render:function(s,l){return o(),e("svg",bo,Po)}}),To={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},Do=t("path",{d:"M6 10c-1.1 0-2 .9-2 2s.9 2 2 2s2-.9 2-2s-.9-2-2-2zm12 0c-1.1 0-2 .9-2 2s.9 2 2 2s2-.9 2-2s-.9-2-2-2zm-6 0c-1.1 0-2 .9-2 2s.9 2 2 2s2-.9 2-2s-.9-2-2-2z",fill:"currentColor"},null,-1),Eo=[Do],Z1=n({name:"MoreHorizFilled",render:function(s,l){return o(),e("svg",To,Eo)}}),Ro={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},Fo=t("path",{d:"M12 8c1.1 0 2-.9 2-2s-.9-2-2-2s-2 .9-2 2s.9 2 2 2zm0 2c-1.1 0-2 .9-2 2s.9 2 2 2s2-.9 2-2s-.9-2-2-2zm0 6c-1.1 0-2 .9-2 2s.9 2 2 2s2-.9 2-2s-.9-2-2-2z",fill:"currentColor"},null,-1),qo=[Fo],te=n({name:"MoreVertOutlined",render:function(s,l){return o(),e("svg",Ro,qo)}}),Io={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},No=t("path",{d:"M15 3H6c-.83 0-1.54.5-1.84 1.22l-3.02 7.05c-.09.23-.14.47-.14.73v2c0 1.1.9 2 2 2h6.31l-.95 4.57l-.03.32c0 .41.17.79.44 1.06L9.83 23l6.59-6.59c.36-.36.58-.86.58-1.41V5c0-1.1-.9-2-2-2zm0 12l-4.34 4.34L12 14H3v-2l3-7h9v10zm4-12h4v12h-4z",fill:"currentColor"},null,-1),Uo=[No],ne=n({name:"ThumbDownOutlined",render:function(s,l){return o(),e("svg",Io,Uo)}}),Wo={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},Go=t("path",{opacity:".3",d:"M3 12v2h9l-1.34 5.34L15 15V5H6z",fill:"currentColor"},null,-1),Jo=t("path",{d:"M15 3H6c-.83 0-1.54.5-1.84 1.22l-3.02 7.05c-.09.23-.14.47-.14.73v2c0 1.1.9 2 2 2h6.31l-.95 4.57l-.03.32c0 .41.17.79.44 1.06L9.83 23l6.59-6.59c.36-.36.58-.86.58-1.41V5c0-1.1-.9-2-2-2zm0 12l-4.34 4.34L12 14H3v-2l3-7h9v10zm4-12h4v12h-4z",fill:"currentColor"},null,-1),Ko=[Go,Jo],oe=n({name:"ThumbDownTwotone",render:function(s,l){return o(),e("svg",Wo,Ko)}}),Qo={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},Xo=t("path",{d:"M9 21h9c.83 0 1.54-.5 1.84-1.22l3.02-7.05c.09-.23.14-.47.14-.73v-2c0-1.1-.9-2-2-2h-6.31l.95-4.57l.03-.32c0-.41-.17-.79-.44-1.06L14.17 1L7.58 7.59C7.22 7.95 7 8.45 7 9v10c0 1.1.9 2 2 2zM9 9l4.34-4.34L12 10h9v2l-3 7H9V9zM1 9h4v12H1z",fill:"currentColor"},null,-1),Yo=[Xo],ee=n({name:"ThumbUpOutlined",render:function(s,l){return o(),e("svg",Qo,Yo)}}),Zo={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},t1=t("path",{opacity:".3",d:"M21 12v-2h-9l1.34-5.34L9 9v10h9z",fill:"currentColor"},null,-1),n1=t("path",{d:"M9 21h9c.83 0 1.54-.5 1.84-1.22l3.02-7.05c.09-.23.14-.47.14-.73v-2c0-1.1-.9-2-2-2h-6.31l.95-4.57l.03-.32c0-.41-.17-.79-.44-1.06L14.17 1L7.58 7.59C7.22 7.95 7 8.45 7 9v10c0 1.1.9 2 2 2zM9 9l4.34-4.34L12 10h9v2l-3 7H9V9zM1 9h4v12H1z",fill:"currentColor"},null,-1),o1=[t1,n1],re=n({name:"ThumbUpTwotone",render:function(s,l){return o(),e("svg",Zo,o1)}});export{Y1 as $,r1 as A,c1 as B,d1 as C,P1 as D,g1 as E,v1 as F,b1 as G,C1 as H,M1 as I,a1 as J,R1 as K,O1 as L,V1 as M,u1 as N,_1 as O,y1 as P,w1 as Q,j1 as R,D1 as S,J1 as T,k1 as U,I1 as V,U1 as W,H1 as X,W1 as Y,X1 as Z,K1 as _,E1 as a,Q1 as a0,G1 as b,L1 as c,p1 as d,ee as e,re as f,ne as g,oe as h,Z1 as i,f1 as j,$1 as k,h1 as l,i1 as m,l1 as n,F1 as o,A1 as p,q1 as q,z1 as r,B1 as s,T1 as t,m1 as u,s1 as v,S1 as w,te as x,x1 as y,N1 as z};
+import{d as o,e as n,f as e,j as t,z as i}from"./@vue-a481fc63.js";const c={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},h=t("path",{d:"M216.08 192v143.85a40.08 40.08 0 0 0 80.15 0l.13-188.55a67.94 67.94 0 1 0-135.87 0v189.82a95.51 95.51 0 1 0 191 0V159.74",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-miterlimit":"10","stroke-width":"32"},null,-1),d=[h],d1=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],a1=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],w1=o({name:"Bookmark",render:function(s,l){return n(),e("svg",k,x)}}),g={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},m=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=[m],u1=o({name:"BookmarkOutline",render:function(s,l){return n(),e("svg",g,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],_1=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],k1=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],p1=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",{d:"M256 48C141.31 48 48 141.31 48 256s93.31 208 208 208s208-93.31 208-208S370.69 48 256 48zm108.25 138.29l-134.4 160a16 16 0 0 1-12 5.71h-.27a16 16 0 0 1-11.89-5.3l-57.6-64a16 16 0 1 1 23.78-21.4l45.29 50.32l122.59-145.91a16 16 0 0 1 24.5 20.58z",fill:"currentColor"},null,-1),b=[y],x1=o({name:"CheckmarkCircle",render:function(s,l){return n(),e("svg",A,b)}}),T={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},S=t("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32",d:"M464 128L240 384l-96-96"},null,-1),D=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),E=[S,D,P],g1=o({name:"CheckmarkDoneOutline",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"},U=t("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32",d:"M416 128L192 384l-96-96"},null,-1),F=[U],m1=o({name:"CheckmarkOutline",render:function(s,l){return n(),e("svg",R,F)}}),q={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},I=t("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32",d:"M368 368L144 144"},null,-1),N=t("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32",d:"M368 144L144 368"},null,-1),W=[I,N],v1=o({name:"CloseOutline",render:function(s,l){return n(),e("svg",q,W)}}),G={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},J=t("path",{d:"M320 336h76c55 0 100-21.21 100-75.6s-53-73.47-96-75.6C391.11 99.74 329 48 256 48c-69 0-113.44 45.79-128 91.2c-60 5.7-112 35.88-112 98.4S70 336 136 336h56",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32"},null,-1),K=t("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32",d:"M192 400.1l64 63.9l64-63.9"},null,-1),Q=t("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32",d:"M256 224v224.03"},null,-1),X=[J,K,Q],$1=o({name:"CloudDownloadOutline",render:function(s,l){return n(),e("svg",G,X)}}),Y={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},Z=t("path",{d:"M448 256c0-106-86-192-192-192S64 150 64 256s86 192 192 192s192-86 192-192z",fill:"none",stroke:"currentColor","stroke-miterlimit":"10","stroke-width":"32"},null,-1),tt=t("path",{d:"M350.67 150.93l-117.2 46.88a64 64 0 0 0-35.66 35.66l-46.88 117.2a8 8 0 0 0 10.4 10.4l117.2-46.88a64 64 0 0 0 35.66-35.66l46.88-117.2a8 8 0 0 0-10.4-10.4zM256 280a24 24 0 1 1 24-24a24 24 0 0 1-24 24z",fill:"currentColor"},null,-1),ot=[Z,tt],f1=o({name:"CompassOutline",render:function(s,l){return n(),e("svg",Y,ot)}}),nt={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},et=t("path",{d:"M448 341.37V170.61A32 32 0 0 0 432.11 143l-152-88.46a47.94 47.94 0 0 0-48.24 0L79.89 143A32 32 0 0 0 64 170.61v170.76A32 32 0 0 0 79.89 369l152 88.46a48 48 0 0 0 48.24 0l152-88.46A32 32 0 0 0 448 341.37z",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32"},null,-1),rt=t("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32",d:"M69 153.99l187 110l187-110"},null,-1),st=t("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32",d:"M256 463.99v-200"},null,-1),lt=[et,rt,st],C1=o({name:"CubeOutline",render:function(s,l){return n(),e("svg",nt,lt)}}),it={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},ct=i('',5),ht=[ct],M1=o({name:"EyeOffOutline",render:function(s,l){return n(),e("svg",it,ht)}}),dt={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},at=t("path",{d:"M255.66 112c-77.94 0-157.89 45.11-220.83 135.33a16 16 0 0 0-.27 17.77C82.92 340.8 161.8 400 255.66 400c92.84 0 173.34-59.38 221.79-135.25a16.14 16.14 0 0 0 0-17.47C428.89 172.28 347.8 112 255.66 112z",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32"},null,-1),wt=t("circle",{cx:"256",cy:"256",r:"80",fill:"none",stroke:"currentColor","stroke-miterlimit":"10","stroke-width":"32"},null,-1),ut=[at,wt],O1=o({name:"EyeOutline",render:function(s,l){return n(),e("svg",dt,ut)}}),_t={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},kt=t("path",{d:"M112 320c0-93 124-165 96-272c66 0 192 96 192 272a144 144 0 0 1-288 0z",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32"},null,-1),pt=t("path",{d:"M320 368c0 57.71-32 80-64 80s-64-22.29-64-80s40-86 32-128c42 0 96 70.29 96 128z",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32"},null,-1),xt=[kt,pt],j1=o({name:"FlameOutline",render:function(s,l){return n(),e("svg",_t,xt)}}),gt={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},mt=t("path",{d:"M256 448a32 32 0 0 1-18-5.57c-78.59-53.35-112.62-89.93-131.39-112.8c-40-48.75-59.15-98.8-58.61-153C48.63 114.52 98.46 64 159.08 64c44.08 0 74.61 24.83 92.39 45.51a6 6 0 0 0 9.06 0C278.31 88.81 308.84 64 352.92 64c60.62 0 110.45 50.52 111.08 112.64c.54 54.21-18.63 104.26-58.61 153c-18.77 22.87-52.8 59.45-131.39 112.8a32 32 0 0 1-18 5.56z",fill:"currentColor"},null,-1),vt=[mt],z1=o({name:"Heart",render:function(s,l){return n(),e("svg",gt,vt)}}),$t={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},ft=t("path",{d:"M352.92 80C288 80 256 144 256 144s-32-64-96.92-64c-52.76 0-94.54 44.14-95.08 96.81c-1.1 109.33 86.73 187.08 183 252.42a16 16 0 0 0 18 0c96.26-65.34 184.09-143.09 183-252.42c-.54-52.67-42.32-96.81-95.08-96.81z",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32"},null,-1),Ct=[ft],B1=o({name:"HeartOutline",render:function(s,l){return n(),e("svg",$t,Ct)}}),Mt={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},Ot=t("path",{d:"M80 212v236a16 16 0 0 0 16 16h96V328a24 24 0 0 1 24-24h80a24 24 0 0 1 24 24v136h96a16 16 0 0 0 16-16V212",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32"},null,-1),jt=t("path",{d:"M480 256L266.89 52c-5-5.28-16.69-5.34-21.78 0L32 256",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32"},null,-1),zt=t("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32",d:"M400 179V64h-48v69"},null,-1),Bt=[Ot,jt,zt],L1=o({name:"HomeOutline",render:function(s,l){return n(),e("svg",Mt,Bt)}}),Lt={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},Ht=t("rect",{x:"48",y:"80",width:"416",height:"352",rx:"48",ry:"48",fill:"none",stroke:"currentColor","stroke-linejoin":"round","stroke-width":"32"},null,-1),Vt=t("circle",{cx:"336",cy:"176",r:"32",fill:"none",stroke:"currentColor","stroke-miterlimit":"10","stroke-width":"32"},null,-1),At=t("path",{d:"M304 335.79l-90.66-90.49a32 32 0 0 0-43.87-1.3L48 352",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32"},null,-1),yt=t("path",{d:"M224 432l123.34-123.34a32 32 0 0 1 43.11-2L464 368",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32"},null,-1),bt=[Ht,Vt,At,yt],H1=o({name:"ImageOutline",render:function(s,l){return n(),e("svg",Lt,bt)}}),Tt={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},St=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),Dt=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=[St,Dt],V1=o({name:"LeafOutline",render:function(s,l){return n(),e("svg",Tt,Pt)}}),Et={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},Rt=t("path",{d:"M208 352h-64a96 96 0 0 1 0-192h64",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"36"},null,-1),Ut=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),Ft=t("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"36",d:"M163.29 256h187.42"},null,-1),qt=[Rt,Ut,Ft],A1=o({name:"LinkOutline",render:function(s,l){return n(),e("svg",Et,qt)}}),It={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},Nt=t("path",{d:"M336 208v-95a80 80 0 0 0-160 0v95",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32"},null,-1),Wt=t("rect",{x:"96",y:"208",width:"320",height:"272",rx:"48",ry:"48",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32"},null,-1),Gt=[Nt,Wt],y1=o({name:"LockClosedOutline",render:function(s,l){return n(),e("svg",It,Gt)}}),Jt={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},Kt=t("path",{d:"M336 112a80 80 0 0 0-160 0v96",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32"},null,-1),Qt=t("rect",{x:"96",y:"208",width:"320",height:"272",rx:"48",ry:"48",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32"},null,-1),Xt=[Kt,Qt],b1=o({name:"LockOpenOutline",render:function(s,l){return n(),e("svg",Jt,Xt)}}),Yt={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},Zt=t("path",{d:"M304 336v40a40 40 0 0 1-40 40H104a40 40 0 0 1-40-40V136a40 40 0 0 1 40-40h152c22.09 0 48 17.91 48 40v40",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32"},null,-1),to=t("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32",d:"M368 336l80-80l-80-80"},null,-1),oo=t("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32",d:"M176 256h256"},null,-1),no=[Zt,to,oo],T1=o({name:"LogOutOutline",render:function(s,l){return n(),e("svg",Yt,no)}}),eo={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},ro=t("path",{d:"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),so=[ro],S1=o({name:"LogoAlipay",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=i('',6),co=[io],D1=o({name:"MegaphoneOutline",render:function(s,l){return n(),e("svg",lo,co)}}),ho={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},ao=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),wo=t("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32",d:"M460 52L227 285"},null,-1),uo=[ao,wo],P1=o({name:"PaperPlaneOutline",render:function(s,l){return n(),e("svg",ho,uo)}}),_o={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},ko=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),po=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),xo=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),go=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),mo=[ko,po,xo,go],E1=o({name:"PeopleOutline",render:function(s,l){return n(),e("svg",_o,mo)}}),vo={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},$o=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),fo=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),Co=t("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32",d:"M88 176v112"},null,-1),Mo=t("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32",d:"M144 232H32"},null,-1),Oo=[$o,fo,Co,Mo],R1=o({name:"PersonAddOutline",render:function(s,l){return n(),e("svg",vo,Oo)}}),jo={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},zo=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),Bo=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),Lo=[zo,Bo],U1=o({name:"PersonOutline",render:function(s,l){return n(),e("svg",jo,Lo)}}),Ho={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},Vo=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),Ao=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),yo=t("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32",d:"M144 232H32"},null,-1),bo=[Vo,Ao,yo],F1=o({name:"PersonRemoveOutline",render:function(s,l){return n(),e("svg",Ho,bo)}}),To={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},So=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),Do=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),Eo=[So,Do,Po],q1=o({name:"PushOutline",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"},Uo=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),Fo=[Uo],I1=o({name:"Search",render:function(s,l){return n(),e("svg",Ro,Fo)}}),qo={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},Io=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),No=[Io],N1=o({name:"SettingsOutline",render:function(s,l){return n(),e("svg",qo,No)}}),Wo={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},Go=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),Jo=t("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32",d:"M336 128l-80-80l-80 80"},null,-1),Ko=t("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32",d:"M256 321V48"},null,-1),Qo=[Go,Jo,Ko],W1=o({name:"ShareOutline",render:function(s,l){return n(),e("svg",Wo,Qo)}}),Xo={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},Yo=i('',5),Zo=[Yo],G1=o({name:"ShareSocialOutline",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=i('',6),nn=[on],J1=o({name:"TrashOutline",render:function(s,l){return n(),e("svg",tn,nn)}}),en={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},rn=t("path",{d:"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),sn=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),ln=[rn,sn],K1=o({name:"VideocamOutline",render:function(s,l){return n(),e("svg",en,ln)}}),cn={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},hn=i('',5),dn=[hn],Q1=o({name:"WalkOutline",render:function(s,l){return n(),e("svg",cn,dn)}}),an={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},wn=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),un=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),_n=t("path",{d:"M368 320a32 32 0 1 1 32-32a32 32 0 0 1-32 32z",fill:"currentColor"},null,-1),kn=[wn,un,_n],X1=o({name:"WalletOutline",render:function(s,l){return n(),e("svg",an,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),gn=[xn],Y1=o({name:"ArrowBarDown",render:function(s,l){return n(),e("svg",pn,gn)}}),mn={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],Z1=o({name:"ArrowBarToUp",render:function(s,l){return n(),e("svg",mn,$n)}}),fn={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},Cn=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),Mn=[Cn],te=o({name:"Edit",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=i('',1),zn=[jn],oe=o({name:"Hash",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=i('',1),Hn=[Ln],ne=o({name:"Trash",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:"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),yn=[An],ee=o({name:"ChevronLeftRound",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"},Tn=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),Sn=[Tn],re=o({name:"DarkModeOutlined",render:function(s,l){return n(),e("svg",bn,Sn)}}),Dn={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},Pn=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),En=[Pn],se=o({name:"DehazeRound",render:function(s,l){return n(),e("svg",Dn,En)}}),Rn={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},Un=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),Fn=[Un],le=o({name:"LightModeOutlined",render:function(s,l){return n(),e("svg",Rn,Fn)}}),qn={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},In=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),Nn=[In],ie=o({name:"MoreHorizFilled",render:function(s,l){return n(),e("svg",qn,Nn)}}),Wn={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},Gn=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),Jn=[Gn],ce=o({name:"MoreVertOutlined",render:function(s,l){return n(),e("svg",Wn,Jn)}}),Kn={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},Qn=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),Xn=[Qn],he=o({name:"ThumbDownOutlined",render:function(s,l){return n(),e("svg",Kn,Xn)}}),Yn={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},Zn=t("path",{opacity:".3",d:"M3 12v2h9l-1.34 5.34L15 15V5H6z",fill:"currentColor"},null,-1),t1=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),o1=[Zn,t1],de=o({name:"ThumbDownTwotone",render:function(s,l){return n(),e("svg",Yn,o1)}}),n1={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},e1=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),r1=[e1],ae=o({name:"ThumbUpOutlined",render:function(s,l){return n(),e("svg",n1,r1)}}),s1={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},l1=t("path",{opacity:".3",d:"M21 12v-2h-9l1.34-5.34L9 9v10h9z",fill:"currentColor"},null,-1),i1=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),c1=[l1,i1],we=o({name:"ThumbUpTwotone",render:function(s,l){return n(),e("svg",s1,c1)}});export{se as $,d1 as A,_1 as B,p1 as C,ce as D,O1 as E,j1 as F,C1 as G,L1 as H,H1 as I,F1 as J,R1 as K,V1 as L,D1 as M,x1 as N,W1 as O,E1 as P,m1 as Q,v1 as R,I1 as S,ne as T,g1 as U,K1 as V,X1 as W,A1 as X,$1 as Y,S1 as Z,te as _,N1 as a,ee as a0,le as a1,re as a2,oe as b,T1 as c,f1 as d,ae as e,we as f,he as g,de as h,Z1 as i,Y1 as j,ie as k,B1 as l,z1 as m,k1 as n,u1 as o,w1 as p,G1 as q,P1 as r,Q1 as s,a1 as t,J1 as u,y1 as v,b1 as w,q1 as x,M1 as y,U1 as z};
diff --git a/web/dist/assets/Anouncement-2531033c.js b/web/dist/assets/Anouncement-dfa91637.js
similarity index 58%
rename from web/dist/assets/Anouncement-2531033c.js
rename to web/dist/assets/Anouncement-dfa91637.js
index d6d85276..c5bcfec4 100644
--- a/web/dist/assets/Anouncement-2531033c.js
+++ b/web/dist/assets/Anouncement-dfa91637.js
@@ -1 +1 @@
-import{_ as F}from"./post-skeleton-4d2b103e.js";import{_ as N}from"./main-nav.vue_vue_type_style_index_0_lang-2982e04a.js";import{u as z}from"./vuex-44de225f.js";import{b as A}from"./vue-router-e5a2430e.js";import{E as R,_ as S}from"./index-4a465428.js";import{F as V,Q as q,I as E,G as I}from"./naive-ui-d8de3dda.js";import{d as P,H as n,b as j,f as o,k as a,w as p,e as t,bf as u,Y as l,F as D,u as G,q as H,j as s,x as _,l as L}from"./@vue-a481fc63.js";import"./vooks-6d99783e.js";import"./evtd-b614532e.js";import"./@vicons-7a4ef312.js";import"./axios-4a70c6fc.js";import"./moment-2ab8298d.js";/* empty css */import"./seemly-76b7b838.js";import"./vueuc-39372edb.js";import"./@css-render-7124a1a5.js";import"./vdirs-b0483831.js";import"./@juggle-41516555.js";import"./css-render-6a5c5852.js";import"./@emotion-8a8e73f6.js";import"./lodash-es-8412e618.js";import"./treemate-25c27bff.js";import"./async-validator-dee29e8b.js";import"./date-fns-975a2d8f.js";const M={key:0,class:"pagination-wrap"},O={key:0,class:"skeleton-wrap"},Q={key:1},T={key:0,class:"empty-wrap"},U={class:"bill-line"},Y=P({__name:"Anouncement",setup($){const d=z(),g=A(),v=n(!1),i=n([]),r=n(+g.query.p||1),f=n(20),c=n(0),h=m=>{r.value=m};return j(()=>{}),(m,J)=>{const k=N,y=q,x=F,w=E,B=I,C=V;return t(),o("div",null,[a(k,{title:"公告"}),a(C,{class:"main-content-wrap",bordered:""},{footer:p(()=>[c.value>1?(t(),o("div",M,[a(y,{page:r.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?(t(),o("div",O,[a(x,{num:f.value},null,8,["num"])])):(t(),o("div",Q,[i.value.length===0?(t(),o("div",T,[a(w,{size:"large",description:"暂无数据"})])):l("",!0),(t(!0),o(D,null,G(i.value,e=>(t(),H(B,{key:e.id},{default:p(()=>[s("div",U,[s("div",null,"NO."+_(e.id),1),s("div",null,_(e.reason),1),s("div",{class:L({income:e.change_amount>=0,out:e.change_amount<0})},_((e.change_amount>0?"+":"")+(e.change_amount/100).toFixed(2)),3),s("div",null,_(u(R)(e.created_on)),1)])]),_:2},1024))),128))]))]),_:1})])}}});const ke=S(Y,[["__scopeId","data-v-d4d04859"]]);export{ke as default};
+import{_ as N}from"./post-skeleton-8434d30b.js";import{_ as R}from"./main-nav.vue_vue_type_style_index_0_lang-93352cc4.js";import{u as z}from"./vuex-44de225f.js";import{b as A}from"./vue-router-e5a2430e.js";import{I as F,_ as S}from"./index-daff1b26.js";import{G as V,R as q,J as H,H as I}from"./naive-ui-defd0b2d.js";import{d as P,H as n,b as j,f as o,k as a,w as p,e as t,bf as u,Y as l,F as D,u as E,q as G,j as s,x as _,l as J}from"./@vue-a481fc63.js";import"./vooks-6d99783e.js";import"./evtd-b614532e.js";import"./@vicons-c265fba6.js";import"./axios-4a70c6fc.js";import"./moment-2ab8298d.js";/* empty css */import"./seemly-76b7b838.js";import"./vueuc-39372edb.js";import"./@css-render-7124a1a5.js";import"./vdirs-b0483831.js";import"./@juggle-41516555.js";import"./css-render-6a5c5852.js";import"./@emotion-8a8e73f6.js";import"./lodash-es-8412e618.js";import"./treemate-25c27bff.js";import"./async-validator-dee29e8b.js";import"./date-fns-975a2d8f.js";const L={key:0,class:"pagination-wrap"},M={key:0,class:"skeleton-wrap"},O={key:1},T={key:0,class:"empty-wrap"},U={class:"bill-line"},Y=P({__name:"Anouncement",setup($){const d=z(),g=A(),v=n(!1),i=n([]),r=n(+g.query.p||1),f=n(20),c=n(0),h=m=>{r.value=m};return j(()=>{}),(m,K)=>{const k=R,y=q,x=N,w=H,B=I,C=V;return t(),o("div",null,[a(k,{title:"公告"}),a(C,{class:"main-content-wrap",bordered:""},{footer:p(()=>[c.value>1?(t(),o("div",L,[a(y,{page:r.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?(t(),o("div",M,[a(x,{num:f.value},null,8,["num"])])):(t(),o("div",O,[i.value.length===0?(t(),o("div",T,[a(w,{size:"large",description:"暂无数据"})])):l("",!0),(t(!0),o(D,null,E(i.value,e=>(t(),G(B,{key:e.id},{default:p(()=>[s("div",U,[s("div",null,"NO."+_(e.id),1),s("div",null,_(e.reason),1),s("div",{class:J({income:e.change_amount>=0,out:e.change_amount<0})},_((e.change_amount>0?"+":"")+(e.change_amount/100).toFixed(2)),3),s("div",null,_(u(F)(e.created_on)),1)])]),_:2},1024))),128))]))]),_:1})])}}});const ke=S(Y,[["__scopeId","data-v-d4d04859"]]);export{ke as default};
diff --git a/web/dist/assets/Collection-25bed151.js b/web/dist/assets/Collection-25bed151.js
new file mode 100644
index 00000000..b8c29f02
--- /dev/null
+++ b/web/dist/assets/Collection-25bed151.js
@@ -0,0 +1 @@
+import{_ as T}from"./whisper-9b4eeceb.js";import{_ as U,a as q}from"./post-item.vue_vue_type_style_index_0_lang-c2092e3d.js";import{_ as N}from"./post-skeleton-8434d30b.js";import{_ as V}from"./main-nav.vue_vue_type_style_index_0_lang-93352cc4.js";import{u as W}from"./vuex-44de225f.js";import{b as D}from"./vue-router-e5a2430e.js";import{R as E,u as G,f as J,_ as L}from"./index-daff1b26.js";import{d as Y,H as a,b as j,f as t,k as s,w as f,bf as c,Y as y,e as o,F as C,u as x,q as F}from"./@vue-a481fc63.js";import{F as K,G as Q,R as X,J as Z,H as ee}from"./naive-ui-defd0b2d.js";import"./content-64a02a2f.js";import"./@vicons-c265fba6.js";import"./paopao-video-player-2fe58954.js";import"./copy-to-clipboard-4ef7d3eb.js";import"./@babel-725317a4.js";import"./toggle-selection-93f4ad84.js";import"./vooks-6d99783e.js";import"./evtd-b614532e.js";import"./axios-4a70c6fc.js";import"./moment-2ab8298d.js";/* empty css */import"./seemly-76b7b838.js";import"./vueuc-39372edb.js";import"./@css-render-7124a1a5.js";import"./vdirs-b0483831.js";import"./@juggle-41516555.js";import"./css-render-6a5c5852.js";import"./@emotion-8a8e73f6.js";import"./lodash-es-8412e618.js";import"./treemate-25c27bff.js";import"./async-validator-dee29e8b.js";import"./date-fns-975a2d8f.js";const oe={key:0,class:"skeleton-wrap"},te={key:1},se={key:0,class:"empty-wrap"},ne={key:1},ae={key:2},ie={key:0,class:"pagination-wrap"},le=Y({__name:"Collection",setup(re){const i=W(),S=D(),$=K(),l=a(!1),r=a([]),u=a(+S.query.p||1),p=a(20),m=a(0),d=a(!1),g=a({id:0,avatar:"",username:"",nickname:"",is_admin:!1,is_friend:!0,is_following:!1,created_on:0,follows:0,followings:0,status:1}),v=e=>{g.value=e,d.value=!0},b=()=>{d.value=!1},w=e=>{$.success({title:"提示",content:"确定"+(e.user.is_following?"取消关注":"关注")+"该用户吗?",positiveText:"确定",negativeText:"取消",onPositiveClick:()=>{e.user.is_following?G({user_id:e.user.id}).then(_=>{window.$message.success("操作成功"),e.user.is_following=!1}).catch(_=>{}):J({user_id:e.user.id}).then(_=>{window.$message.success("关注成功"),e.user.is_following=!0}).catch(_=>{})}})},h=()=>{l.value=!0,E({page:u.value,page_size:p.value}).then(e=>{l.value=!1,r.value=e.list,m.value=Math.ceil(e.pager.total_rows/p.value),window.scrollTo(0,0)}).catch(e=>{l.value=!1})},R=e=>{u.value=e,h()};return j(()=>{h()}),(e,_)=>{const O=V,P=N,z=Z,A=U,k=ee,B=q,H=T,I=Q,M=X;return o(),t("div",null,[s(O,{title:"收藏"}),s(I,{class:"main-content-wrap",bordered:""},{default:f(()=>[l.value?(o(),t("div",oe,[s(P,{num:p.value},null,8,["num"])])):(o(),t("div",te,[r.value.length===0?(o(),t("div",se,[s(z,{size:"large",description:"暂无数据"})])):y("",!0),c(i).state.desktopModelShow?(o(),t("div",ne,[(o(!0),t(C,null,x(r.value,n=>(o(),F(k,{key:n.id},{default:f(()=>[s(A,{post:n,isOwner:c(i).state.userInfo.id==n.user_id,addFollowAction:!0,onSendWhisper:v,onHandleFollowAction:w},null,8,["post","isOwner"])]),_:2},1024))),128))])):(o(),t("div",ae,[(o(!0),t(C,null,x(r.value,n=>(o(),F(k,{key:n.id},{default:f(()=>[s(B,{post:n,isOwner:c(i).state.userInfo.id==n.user_id,addFollowAction:!0,onSendWhisper:v,onHandleFollowAction:w},null,8,["post","isOwner"])]),_:2},1024))),128))]))])),s(H,{show:d.value,user:g.value,onSuccess:b},null,8,["show","user"])]),_:1}),m.value>0?(o(),t("div",ie,[s(M,{page:u.value,"onUpdate:page":R,"page-slot":c(i).state.collapsedRight?5:8,"page-count":m.value},null,8,["page","page-slot","page-count"])])):y("",!0)])}}});const Ne=L(le,[["__scopeId","data-v-c8f8eee7"]]);export{Ne as default};
diff --git a/web/dist/assets/Collection-501380ec.css b/web/dist/assets/Collection-501380ec.css
new file mode 100644
index 00000000..32fe8884
--- /dev/null
+++ b/web/dist/assets/Collection-501380ec.css
@@ -0,0 +1 @@
+.pagination-wrap[data-v-c8f8eee7]{padding:10px;display:flex;justify-content:center;overflow:hidden}.dark .main-content-wrap[data-v-c8f8eee7],.dark .empty-wrap[data-v-c8f8eee7],.dark .skeleton-wrap[data-v-c8f8eee7]{background-color:#101014bf}
diff --git a/web/dist/assets/Collection-5c3a44e2.css b/web/dist/assets/Collection-5c3a44e2.css
deleted file mode 100644
index 317e31eb..00000000
--- a/web/dist/assets/Collection-5c3a44e2.css
+++ /dev/null
@@ -1 +0,0 @@
-.pagination-wrap[data-v-760779af]{padding:10px;display:flex;justify-content:center;overflow:hidden}.dark .main-content-wrap[data-v-760779af],.dark .empty-wrap[data-v-760779af],.dark .skeleton-wrap[data-v-760779af]{background-color:#101014bf}
diff --git a/web/dist/assets/Collection-6b9226c9.js b/web/dist/assets/Collection-6b9226c9.js
deleted file mode 100644
index 8c6e5607..00000000
--- a/web/dist/assets/Collection-6b9226c9.js
+++ /dev/null
@@ -1 +0,0 @@
-import{_ as I}from"./whisper-7dcedd50.js";import{_ as N,a as Q}from"./post-item.vue_vue_type_style_index_0_lang-a5e9cab2.js";import{_ as V}from"./post-skeleton-4d2b103e.js";import{_ as W}from"./main-nav.vue_vue_type_style_index_0_lang-2982e04a.js";import{u as E}from"./vuex-44de225f.js";import{b as G}from"./vue-router-e5a2430e.js";import{Q as H,_ as L}from"./index-4a465428.js";import{d as T,H as s,b as U,f as o,k as n,w as u,bf as h,Y as w,e,F as k,u as y,q as C}from"./@vue-a481fc63.js";import{F as Y,Q as j,I as A,G as D}from"./naive-ui-d8de3dda.js";import"./content-0e30acaf.js";import"./@vicons-7a4ef312.js";import"./paopao-video-player-2fe58954.js";import"./copy-to-clipboard-4ef7d3eb.js";import"./@babel-725317a4.js";import"./toggle-selection-93f4ad84.js";import"./vooks-6d99783e.js";import"./evtd-b614532e.js";import"./axios-4a70c6fc.js";import"./moment-2ab8298d.js";/* empty css */import"./seemly-76b7b838.js";import"./vueuc-39372edb.js";import"./@css-render-7124a1a5.js";import"./vdirs-b0483831.js";import"./@juggle-41516555.js";import"./css-render-6a5c5852.js";import"./@emotion-8a8e73f6.js";import"./lodash-es-8412e618.js";import"./treemate-25c27bff.js";import"./async-validator-dee29e8b.js";import"./date-fns-975a2d8f.js";const J={key:0,class:"skeleton-wrap"},K={key:1},O={key:0,class:"empty-wrap"},X={key:1},Z={key:2},ee={key:0,class:"pagination-wrap"},oe=T({__name:"Collection",setup(te){const m=E(),S=G(),_=s(!1),i=s([]),l=s(+S.query.p||1),p=s(20),r=s(0),c=s(!1),d=s({id:0,avatar:"",username:"",nickname:"",is_admin:!1,is_friend:!0,is_following:!1,created_on:0,follows:0,followings:0,status:1}),f=t=>{d.value=t,c.value=!0},b=()=>{c.value=!1},v=()=>{_.value=!0,H({page:l.value,page_size:p.value}).then(t=>{_.value=!1,i.value=t.list,r.value=Math.ceil(t.pager.total_rows/p.value),window.scrollTo(0,0)}).catch(t=>{_.value=!1})},x=t=>{l.value=t,v()};return U(()=>{v()}),(t,ne)=>{const $=W,z=V,B=A,F=N,g=D,M=Q,P=I,R=Y,q=j;return e(),o("div",null,[n($,{title:"收藏"}),n(R,{class:"main-content-wrap",bordered:""},{default:u(()=>[_.value?(e(),o("div",J,[n(z,{num:p.value},null,8,["num"])])):(e(),o("div",K,[i.value.length===0?(e(),o("div",O,[n(B,{size:"large",description:"暂无数据"})])):w("",!0),h(m).state.desktopModelShow?(e(),o("div",X,[(e(!0),o(k,null,y(i.value,a=>(e(),C(g,{key:a.id},{default:u(()=>[n(F,{post:a,onSendWhisper:f},null,8,["post"])]),_:2},1024))),128))])):(e(),o("div",Z,[(e(!0),o(k,null,y(i.value,a=>(e(),C(g,{key:a.id},{default:u(()=>[n(M,{post:a,onSendWhisper:f},null,8,["post"])]),_:2},1024))),128))]))])),n(P,{show:c.value,user:d.value,onSuccess:b},null,8,["show","user"])]),_:1}),r.value>0?(e(),o("div",ee,[n(q,{page:l.value,"onUpdate:page":x,"page-slot":h(m).state.collapsedRight?5:8,"page-count":r.value},null,8,["page","page-slot","page-count"])])):w("",!0)])}}});const Ne=L(oe,[["__scopeId","data-v-760779af"]]);export{Ne as default};
diff --git a/web/dist/assets/Contacts-6bba6585.js b/web/dist/assets/Contacts-6bba6585.js
new file mode 100644
index 00000000..539a3f8e
--- /dev/null
+++ b/web/dist/assets/Contacts-6bba6585.js
@@ -0,0 +1 @@
+import{_ as O}from"./whisper-9b4eeceb.js";import{d as N,c as T,r as j,e as s,f as c,k as t,w as n,j as _,y as A,A as J,x as v,bf as g,h as S,H as a,b as U,Y as z,F as I,u as W,q as E}from"./@vue-a481fc63.js";import{J as G,_ as P,b as L}from"./index-daff1b26.js";import{k as Y,r as K}from"./@vicons-c265fba6.js";import{j as x,o as Q,e as X,P as Z,O as ee,G as te,R as ne,J as oe,H as se}from"./naive-ui-defd0b2d.js";import{_ as ae}from"./post-skeleton-8434d30b.js";import{_ as ce}from"./main-nav.vue_vue_type_style_index_0_lang-93352cc4.js";import{u as _e}from"./vuex-44de225f.js";import{b as ie}from"./vue-router-e5a2430e.js";import"./axios-4a70c6fc.js";import"./moment-2ab8298d.js";/* empty css */import"./seemly-76b7b838.js";import"./vueuc-39372edb.js";import"./evtd-b614532e.js";import"./@css-render-7124a1a5.js";import"./vooks-6d99783e.js";import"./vdirs-b0483831.js";import"./@juggle-41516555.js";import"./css-render-6a5c5852.js";import"./@emotion-8a8e73f6.js";import"./lodash-es-8412e618.js";import"./treemate-25c27bff.js";import"./async-validator-dee29e8b.js";import"./date-fns-975a2d8f.js";const re={class:"contact-item"},le={class:"nickname-wrap"},pe={class:"username-wrap"},ue={class:"user-info"},me={class:"info-item"},de={class:"info-item"},fe={class:"item-header-extra"},ve=N({__name:"contact-item",props:{contact:{}},emits:["send-whisper"],setup(C,{emit:h}){const i=C,r=e=>()=>S(x,null,{default:()=>S(e)}),l=T(()=>[{label:"私信",key:"whisper",icon:r(K)}]),u=e=>{switch(e){case"whisper":const o={id:i.contact.user_id,avatar:i.contact.avatar,username:i.contact.username,nickname:i.contact.nickname,is_admin:!1,is_friend:!0,is_following:!1,created_on:0,follows:0,followings:0,status:1};h("send-whisper",o);break}};return(e,o)=>{const m=Q,d=j("router-link"),w=X,k=Z,y=ee;return s(),c("div",re,[t(y,{"content-indented":""},{avatar:n(()=>[t(m,{size:54,src:e.contact.avatar},null,8,["src"])]),header:n(()=>[_("span",le,[t(d,{onClick:o[0]||(o[0]=A(()=>{},["stop"])),class:"username-link",to:{name:"user",query:{s:e.contact.username}}},{default:n(()=>[J(v(e.contact.nickname),1)]),_:1},8,["to"])]),_("span",pe," @"+v(e.contact.username),1),_("div",ue,[_("span",me," UID. "+v(e.contact.user_id),1),_("span",de,v(g(G)(e.contact.created_on))+" 加入 ",1)])]),"header-extra":n(()=>[_("div",fe,[t(k,{placement:"bottom-end",trigger:"click",size:"small",options:l.value,onSelect:u},{default:n(()=>[t(w,{quaternary:"",circle:""},{icon:n(()=>[t(g(x),null,{default:n(()=>[t(g(Y))]),_:1})]),_:1})]),_:1},8,["options"])])]),_:1})])}}});const ge=P(ve,[["__scopeId","data-v-d62f19da"]]),he={key:0,class:"skeleton-wrap"},we={key:1},ke={key:0,class:"empty-wrap"},ye={key:0,class:"pagination-wrap"},Ce=N({__name:"Contacts",setup(C){const h=_e(),i=ie(),r=a(!1),l=a([]),u=a(+i.query.p||1),e=a(20),o=a(0),m=a(!1),d=a({id:0,avatar:"",username:"",nickname:"",is_admin:!1,is_friend:!0,is_following:!1,created_on:0,follows:0,followings:0,status:1}),w=p=>{d.value=p,m.value=!0},k=()=>{m.value=!1},y=p=>{u.value=p,$()};U(()=>{$()});const $=(p=!1)=>{l.value.length===0&&(r.value=!0),L({page:u.value,page_size:e.value}).then(f=>{r.value=!1,l.value=f.list,o.value=Math.ceil(f.pager.total_rows/e.value),p&&setTimeout(()=>{window.scrollTo(0,99999)},50)}).catch(f=>{r.value=!1})};return(p,f)=>{const q=ce,B=ae,M=oe,R=ge,V=se,D=O,F=te,H=ne;return s(),c(I,null,[_("div",null,[t(q,{title:"好友"}),t(F,{class:"main-content-wrap",bordered:""},{default:n(()=>[r.value?(s(),c("div",he,[t(B,{num:e.value},null,8,["num"])])):(s(),c("div",we,[l.value.length===0?(s(),c("div",ke,[t(M,{size:"large",description:"暂无数据"})])):z("",!0),(s(!0),c(I,null,W(l.value,b=>(s(),E(V,{class:"list-item",key:b.user_id},{default:n(()=>[t(R,{contact:b,onSendWhisper:w},null,8,["contact"])]),_:2},1024))),128))])),t(D,{show:m.value,user:d.value,onSuccess:k},null,8,["show","user"])]),_:1})]),o.value>0?(s(),c("div",ye,[t(H,{page:u.value,"onUpdate:page":y,"page-slot":g(h).state.collapsedRight?5:8,"page-count":o.value},null,8,["page","page-slot","page-count"])])):z("",!0)],64)}}});const Le=P(Ce,[["__scopeId","data-v-e20fef94"]]);export{Le as default};
diff --git a/web/dist/assets/Contacts-cf96d2d4.js b/web/dist/assets/Contacts-cf96d2d4.js
deleted file mode 100644
index 44e5f346..00000000
--- a/web/dist/assets/Contacts-cf96d2d4.js
+++ /dev/null
@@ -1 +0,0 @@
-import{_ as T}from"./whisper-7dcedd50.js";import{d as F,c as j,r as A,e as s,f as c,k as t,w as n,j as i,y as H,A as L,x as v,bf as g,h as I,H as a,b as U,Y as S,F as z,u as W,q as E}from"./@vue-a481fc63.js";import{F as G,_ as N,b as Q}from"./index-4a465428.js";import{i as Y,p as J}from"./@vicons-7a4ef312.js";import{j as x,o as K,e as X,O as Z,L as ee,F as te,Q as ne,I as oe,G as se}from"./naive-ui-d8de3dda.js";import{_ as ae}from"./post-skeleton-4d2b103e.js";import{_ as ce}from"./main-nav.vue_vue_type_style_index_0_lang-2982e04a.js";import{u as ie}from"./vuex-44de225f.js";import{b as _e}from"./vue-router-e5a2430e.js";import"./axios-4a70c6fc.js";import"./moment-2ab8298d.js";/* empty css */import"./seemly-76b7b838.js";import"./vueuc-39372edb.js";import"./evtd-b614532e.js";import"./@css-render-7124a1a5.js";import"./vooks-6d99783e.js";import"./vdirs-b0483831.js";import"./@juggle-41516555.js";import"./css-render-6a5c5852.js";import"./@emotion-8a8e73f6.js";import"./lodash-es-8412e618.js";import"./treemate-25c27bff.js";import"./async-validator-dee29e8b.js";import"./date-fns-975a2d8f.js";const re={class:"contact-item"},le={class:"nickname-wrap"},pe={class:"username-wrap"},ue={class:"user-info"},me={class:"info-item"},de={class:"info-item"},fe={class:"item-header-extra"},ve=F({__name:"contact-item",props:{contact:{}},emits:["send-whisper"],setup(C,{emit:h}){const _=C,r=e=>()=>I(x,null,{default:()=>I(e)}),l=j(()=>[{label:"私信",key:"whisper",icon:r(J)}]),u=e=>{switch(e){case"whisper":const o={id:_.contact.user_id,avatar:_.contact.avatar,username:_.contact.username,nickname:_.contact.nickname,is_admin:!1,is_friend:!0,is_following:!1,created_on:0,follows:0,followings:0,status:1};h("send-whisper",o);break}};return(e,o)=>{const m=K,d=A("router-link"),w=X,k=Z,y=ee;return s(),c("div",re,[t(y,{"content-indented":""},{avatar:n(()=>[t(m,{size:54,src:e.contact.avatar},null,8,["src"])]),header:n(()=>[i("span",le,[t(d,{onClick:o[0]||(o[0]=H(()=>{},["stop"])),class:"username-link",to:{name:"user",query:{s:e.contact.username}}},{default:n(()=>[L(v(e.contact.nickname),1)]),_:1},8,["to"])]),i("span",pe," @"+v(e.contact.username),1),i("div",ue,[i("span",me," UID. "+v(e.contact.user_id),1),i("span",de,v(g(G)(e.contact.created_on))+" 加入 ",1)])]),"header-extra":n(()=>[i("div",fe,[t(k,{placement:"bottom-end",trigger:"click",size:"small",options:l.value,onSelect:u},{default:n(()=>[t(w,{quaternary:"",circle:""},{icon:n(()=>[t(g(x),null,{default:n(()=>[t(g(Y))]),_:1})]),_:1})]),_:1},8,["options"])])]),_:1})])}}});const ge=N(ve,[["__scopeId","data-v-d62f19da"]]),he={key:0,class:"skeleton-wrap"},we={key:1},ke={key:0,class:"empty-wrap"},ye={key:0,class:"pagination-wrap"},Ce=F({__name:"Contacts",setup(C){const h=ie(),_=_e(),r=a(!1),l=a([]),u=a(+_.query.p||1),e=a(20),o=a(0),m=a(!1),d=a({id:0,avatar:"",username:"",nickname:"",is_admin:!1,is_friend:!0,is_following:!1,created_on:0,follows:0,followings:0,status:1}),w=p=>{d.value=p,m.value=!0},k=()=>{m.value=!1},y=p=>{u.value=p,$()};U(()=>{$()});const $=(p=!1)=>{l.value.length===0&&(r.value=!0),Q({page:u.value,page_size:e.value}).then(f=>{r.value=!1,l.value=f.list,o.value=Math.ceil(f.pager.total_rows/e.value),p&&setTimeout(()=>{window.scrollTo(0,99999)},50)}).catch(f=>{r.value=!1})};return(p,f)=>{const q=ce,B=ae,M=oe,P=ge,V=se,D=T,O=te,R=ne;return s(),c(z,null,[i("div",null,[t(q,{title:"好友"}),t(O,{class:"main-content-wrap",bordered:""},{default:n(()=>[r.value?(s(),c("div",he,[t(B,{num:e.value},null,8,["num"])])):(s(),c("div",we,[l.value.length===0?(s(),c("div",ke,[t(M,{size:"large",description:"暂无数据"})])):S("",!0),(s(!0),c(z,null,W(l.value,b=>(s(),E(V,{class:"list-item",key:b.user_id},{default:n(()=>[t(P,{contact:b,onSendWhisper:w},null,8,["contact"])]),_:2},1024))),128))])),t(D,{show:m.value,user:d.value,onSuccess:k},null,8,["show","user"])]),_:1})]),o.value>0?(s(),c("div",ye,[t(R,{page:u.value,"onUpdate:page":y,"page-slot":g(h).state.collapsedRight?5:8,"page-count":o.value},null,8,["page","page-slot","page-count"])])):S("",!0)],64)}}});const Qe=N(Ce,[["__scopeId","data-v-e20fef94"]]);export{Qe as default};
diff --git a/web/dist/assets/Following-3b99fb7a.js b/web/dist/assets/Following-c2d05a32.js
similarity index 52%
rename from web/dist/assets/Following-3b99fb7a.js
rename to web/dist/assets/Following-c2d05a32.js
index dee9585a..29ec2151 100644
--- a/web/dist/assets/Following-3b99fb7a.js
+++ b/web/dist/assets/Following-c2d05a32.js
@@ -1 +1 @@
-import{_ as K}from"./whisper-7dcedd50.js";import{d as B,c as Q,r as Y,e as _,f as u,k as o,w as t,j as p,y as X,A as x,x as k,q as N,Y as U,bf as g,h as C,H as r,b as Z,F as M,u as ee}from"./@vue-a481fc63.js";import{u as oe,b as ne}from"./vue-router-e5a2430e.js";import{F as te,J as se,K as ae,_ as O,U as le,V as ce}from"./index-4a465428.js";import{i as ie,p as _e,z as re,v as ue}from"./@vicons-7a4ef312.js";import{T as pe,j as P,o as me,M as de,e as fe,O as ge,L as ve,F as we,Q as he,f as ke,g as ye,I as be,G as $e}from"./naive-ui-d8de3dda.js";import{_ as Fe}from"./post-skeleton-4d2b103e.js";import{_ as ze}from"./main-nav.vue_vue_type_style_index_0_lang-2982e04a.js";import{u as Te}from"./vuex-44de225f.js";import"./axios-4a70c6fc.js";import"./moment-2ab8298d.js";/* empty css */import"./seemly-76b7b838.js";import"./vueuc-39372edb.js";import"./evtd-b614532e.js";import"./@css-render-7124a1a5.js";import"./vooks-6d99783e.js";import"./vdirs-b0483831.js";import"./@juggle-41516555.js";import"./css-render-6a5c5852.js";import"./@emotion-8a8e73f6.js";import"./lodash-es-8412e618.js";import"./treemate-25c27bff.js";import"./async-validator-dee29e8b.js";import"./date-fns-975a2d8f.js";const Ue={class:"follow-item"},qe={class:"nickname-wrap"},Ie={class:"username-wrap"},Se={class:"user-info"},xe={class:"info-item"},Ce={class:"info-item"},Me={class:"item-header-extra"},Pe=B({__name:"follow-item",props:{contact:{}},emits:["send-whisper"],setup(q,{emit:y}){const n=q,c=pe();oe();const s=e=>()=>C(P,null,{default:()=>C(e)}),b=()=>{c.success({title:"提示",content:"确定"+(n.contact.is_following?"取消关注":"关注")+"该用户吗?",positiveText:"确定",negativeText:"取消",onPositiveClick:()=>{n.contact.is_following?se({user_id:n.contact.user_id}).then(e=>{window.$message.success("取消关注成功"),n.contact.is_following=!1}).catch(e=>{console.log(e)}):ae({user_id:n.contact.user_id}).then(e=>{window.$message.success("关注成功"),n.contact.is_following=!0}).catch(e=>{console.log(e)})}})},v=Q(()=>{let e=[{label:"私信",key:"whisper",icon:s(_e)}];return n.contact.is_following?e.push({label:"取消关注",key:"unfollow",icon:s(re)}):e.push({label:"关注",key:"follow",icon:s(ue)}),e}),m=e=>{switch(e){case"follow":case"unfollow":b();break;case"whisper":const a={id:n.contact.user_id,avatar:n.contact.avatar,username:n.contact.username,nickname:n.contact.nickname,is_admin:!1,is_friend:!0,is_following:!1,created_on:0,follows:0,followings:0,status:1};y("send-whisper",a);break}};return(e,a)=>{const d=me,f=Y("router-link"),w=de,$=fe,F=ge,z=ve;return _(),u("div",Ue,[o(z,{"content-indented":""},{avatar:t(()=>[o(d,{size:54,src:e.contact.avatar},null,8,["src"])]),header:t(()=>[p("span",qe,[o(f,{onClick:a[0]||(a[0]=X(()=>{},["stop"])),class:"username-link",to:{name:"user",query:{s:e.contact.username}}},{default:t(()=>[x(k(e.contact.nickname),1)]),_:1},8,["to"])]),p("span",Ie," @"+k(e.contact.username),1),e.contact.is_following?(_(),N(w,{key:0,class:"top-tag",type:"success",size:"small",round:""},{default:t(()=>[x(" 已关注 ")]),_:1})):U("",!0),p("div",Se,[p("span",xe," UID. "+k(e.contact.user_id),1),p("span",Ce,k(g(te)(e.contact.created_on))+" 加入 ",1)])]),"header-extra":t(()=>[p("div",Me,[o(F,{placement:"bottom-end",trigger:"click",size:"small",options:v.value,onSelect:m},{default:t(()=>[o($,{quaternary:"",circle:""},{icon:t(()=>[o(g(P),null,{default:t(()=>[o(g(ie))]),_:1})]),_:1})]),_:1},8,["options"])])]),_:1})])}}});const Be=O(Pe,[["__scopeId","data-v-1fb7364a"]]),Ne={key:0,class:"skeleton-wrap"},Oe={key:1},Ve={key:0,class:"empty-wrap"},De={key:0,class:"pagination-wrap"},Re=B({__name:"Following",setup(q){const y=Te(),n=ne(),c=r(!1),s=r([]),b=n.query.n||"粉丝详情",v=n.query.s||"",m=r(n.query.t||"follows"),e=r(+n.query.p||1),a=r(20),d=r(0),f=r(!1),w=r({id:0,avatar:"",username:"",nickname:"",is_admin:!1,is_friend:!0,is_following:!1,created_on:0,follows:0,followings:0,status:1}),$=l=>{w.value=l,f.value=!0},F=()=>{f.value=!1},z=l=>{e.value=l,T()},V=l=>{m.value=l,T()},T=()=>{m.value==="follows"?D(v):m.value==="followings"&&R(v)},D=(l,h=!1)=>{s.value.length===0&&(c.value=!0),le({username:l,page:e.value,page_size:a.value}).then(i=>{c.value=!1,s.value=i.list||[],d.value=Math.ceil(i.pager.total_rows/a.value),h&&setTimeout(()=>{window.scrollTo(0,99999)},50)}).catch(i=>{c.value=!1})},R=(l,h=!1)=>{s.value.length===0&&(c.value=!0),ce({username:l,page:e.value,page_size:a.value}).then(i=>{c.value=!1,s.value=i.list||[],d.value=Math.ceil(i.pager.total_rows/a.value),h&&setTimeout(()=>{window.scrollTo(0,99999)},50)}).catch(i=>{c.value=!1})};return Z(()=>{T()}),(l,h)=>{const i=ze,I=ke,W=ye,j=Fe,A=be,H=Be,L=$e,E=K,G=we,J=he;return _(),u(M,null,[p("div",null,[o(i,{title:g(b),back:!0},null,8,["title"]),o(G,{class:"main-content-wrap",bordered:""},{default:t(()=>[o(W,{type:"line",animated:"","default-value":m.value,"onUpdate:value":V},{default:t(()=>[o(I,{name:"follows",tab:"正在关注"}),o(I,{name:"followings",tab:"我的粉丝"})]),_:1},8,["default-value"]),c.value?(_(),u("div",Ne,[o(j,{num:a.value},null,8,["num"])])):(_(),u("div",Oe,[s.value.length===0?(_(),u("div",Ve,[o(A,{size:"large",description:"暂无数据"})])):U("",!0),(_(!0),u(M,null,ee(s.value,S=>(_(),N(L,{key:S.user_id},{default:t(()=>[o(H,{contact:S,onSendWhisper:$},null,8,["contact"])]),_:2},1024))),128))])),o(E,{show:f.value,user:w.value,onSuccess:F},null,8,["show","user"])]),_:1})]),d.value>0?(_(),u("div",De,[o(J,{page:e.value,"onUpdate:page":z,"page-slot":g(y).state.collapsedRight?5:8,"page-count":d.value},null,8,["page","page-slot","page-count"])])):U("",!0)],64)}}});const po=O(Re,[["__scopeId","data-v-0a10234f"]]);export{po as default};
+import{_ as Y}from"./whisper-9b4eeceb.js";import{d as B,c as K,r as Q,e as _,f as u,k as o,w as t,j as p,y as X,A as x,x as k,q as N,Y as U,bf as g,h as C,H as r,b as Z,F as I,u as ee}from"./@vue-a481fc63.js";import{u as oe,b as ne}from"./vue-router-e5a2430e.js";import{J as te,u as se,f as ae,_ as O,V as le,W as ce}from"./index-daff1b26.js";import{k as ie,r as _e,s as re,t as ue}from"./@vicons-c265fba6.js";import{F as pe,j as M,o as me,M as de,e as fe,P as ge,O as we,G as ve,R as he,f as ke,g as ye,J as be,H as $e}from"./naive-ui-defd0b2d.js";import{_ as Fe}from"./post-skeleton-8434d30b.js";import{_ as ze}from"./main-nav.vue_vue_type_style_index_0_lang-93352cc4.js";import{u as Te}from"./vuex-44de225f.js";import"./axios-4a70c6fc.js";import"./moment-2ab8298d.js";/* empty css */import"./seemly-76b7b838.js";import"./vueuc-39372edb.js";import"./evtd-b614532e.js";import"./@css-render-7124a1a5.js";import"./vooks-6d99783e.js";import"./vdirs-b0483831.js";import"./@juggle-41516555.js";import"./css-render-6a5c5852.js";import"./@emotion-8a8e73f6.js";import"./lodash-es-8412e618.js";import"./treemate-25c27bff.js";import"./async-validator-dee29e8b.js";import"./date-fns-975a2d8f.js";const Ue={class:"follow-item"},qe={class:"nickname-wrap"},Pe={class:"username-wrap"},Se={class:"user-info"},xe={class:"info-item"},Ce={class:"info-item"},Ie={class:"item-header-extra"},Me=B({__name:"follow-item",props:{contact:{}},emits:["send-whisper"],setup(q,{emit:y}){const n=q,c=pe();oe();const s=e=>()=>C(M,null,{default:()=>C(e)}),b=()=>{c.success({title:"提示",content:"确定"+(n.contact.is_following?"取消关注":"关注")+"该用户吗?",positiveText:"确定",negativeText:"取消",onPositiveClick:()=>{n.contact.is_following?se({user_id:n.contact.user_id}).then(e=>{window.$message.success("取消关注成功"),n.contact.is_following=!1}).catch(e=>{console.log(e)}):ae({user_id:n.contact.user_id}).then(e=>{window.$message.success("关注成功"),n.contact.is_following=!0}).catch(e=>{console.log(e)})}})},w=K(()=>{let e=[{label:"私信",key:"whisper",icon:s(_e)}];return n.contact.is_following?e.push({label:"取消关注",key:"unfollow",icon:s(re)}):e.push({label:"关注",key:"follow",icon:s(ue)}),e}),m=e=>{switch(e){case"follow":case"unfollow":b();break;case"whisper":const a={id:n.contact.user_id,avatar:n.contact.avatar,username:n.contact.username,nickname:n.contact.nickname,is_admin:!1,is_friend:!0,is_following:!1,created_on:0,follows:0,followings:0,status:1};y("send-whisper",a);break}};return(e,a)=>{const d=me,f=Q("router-link"),v=de,$=fe,F=ge,z=we;return _(),u("div",Ue,[o(z,{"content-indented":""},{avatar:t(()=>[o(d,{size:54,src:e.contact.avatar},null,8,["src"])]),header:t(()=>[p("span",qe,[o(f,{onClick:a[0]||(a[0]=X(()=>{},["stop"])),class:"username-link",to:{name:"user",query:{s:e.contact.username}}},{default:t(()=>[x(k(e.contact.nickname),1)]),_:1},8,["to"])]),p("span",Pe," @"+k(e.contact.username),1),e.contact.is_following?(_(),N(v,{key:0,class:"top-tag",type:"success",size:"small",round:""},{default:t(()=>[x(" 已关注 ")]),_:1})):U("",!0),p("div",Se,[p("span",xe," UID. "+k(e.contact.user_id),1),p("span",Ce,k(g(te)(e.contact.created_on))+" 加入 ",1)])]),"header-extra":t(()=>[p("div",Ie,[o(F,{placement:"bottom-end",trigger:"click",size:"small",options:w.value,onSelect:m},{default:t(()=>[o($,{quaternary:"",circle:""},{icon:t(()=>[o(g(M),null,{default:t(()=>[o(g(ie))]),_:1})]),_:1})]),_:1},8,["options"])])]),_:1})])}}});const Be=O(Me,[["__scopeId","data-v-1fb7364a"]]),Ne={key:0,class:"skeleton-wrap"},Oe={key:1},Re={key:0,class:"empty-wrap"},Ve={key:0,class:"pagination-wrap"},De=B({__name:"Following",setup(q){const y=Te(),n=ne(),c=r(!1),s=r([]),b=n.query.n||"粉丝详情",w=n.query.s||"",m=r(n.query.t||"follows"),e=r(+n.query.p||1),a=r(20),d=r(0),f=r(!1),v=r({id:0,avatar:"",username:"",nickname:"",is_admin:!1,is_friend:!0,is_following:!1,created_on:0,follows:0,followings:0,status:1}),$=l=>{v.value=l,f.value=!0},F=()=>{f.value=!1},z=l=>{e.value=l,T()},R=l=>{m.value=l,T()},T=()=>{m.value==="follows"?V(w):m.value==="followings"&&D(w)},V=(l,h=!1)=>{s.value.length===0&&(c.value=!0),le({username:l,page:e.value,page_size:a.value}).then(i=>{c.value=!1,s.value=i.list||[],d.value=Math.ceil(i.pager.total_rows/a.value),h&&setTimeout(()=>{window.scrollTo(0,99999)},50)}).catch(i=>{c.value=!1})},D=(l,h=!1)=>{s.value.length===0&&(c.value=!0),ce({username:l,page:e.value,page_size:a.value}).then(i=>{c.value=!1,s.value=i.list||[],d.value=Math.ceil(i.pager.total_rows/a.value),h&&setTimeout(()=>{window.scrollTo(0,99999)},50)}).catch(i=>{c.value=!1})};return Z(()=>{T()}),(l,h)=>{const i=ze,P=ke,W=ye,H=Fe,j=be,A=Be,J=$e,E=Y,G=ve,L=he;return _(),u(I,null,[p("div",null,[o(i,{title:g(b),back:!0},null,8,["title"]),o(G,{class:"main-content-wrap",bordered:""},{default:t(()=>[o(W,{type:"line",animated:"","default-value":m.value,"onUpdate:value":R},{default:t(()=>[o(P,{name:"follows",tab:"正在关注"}),o(P,{name:"followings",tab:"我的粉丝"})]),_:1},8,["default-value"]),c.value?(_(),u("div",Ne,[o(H,{num:a.value},null,8,["num"])])):(_(),u("div",Oe,[s.value.length===0?(_(),u("div",Re,[o(j,{size:"large",description:"暂无数据"})])):U("",!0),(_(!0),u(I,null,ee(s.value,S=>(_(),N(J,{key:S.user_id},{default:t(()=>[o(A,{contact:S,onSendWhisper:$},null,8,["contact"])]),_:2},1024))),128))])),o(E,{show:f.value,user:v.value,onSuccess:F},null,8,["show","user"])]),_:1})]),d.value>0?(_(),u("div",Ve,[o(L,{page:e.value,"onUpdate:page":z,"page-slot":g(y).state.collapsedRight?5:8,"page-count":d.value},null,8,["page","page-slot","page-count"])])):U("",!0)],64)}}});const po=O(De,[["__scopeId","data-v-0a10234f"]]);export{po as default};
diff --git a/web/dist/assets/Home-0ca93a27.js b/web/dist/assets/Home-0ca93a27.js
deleted file mode 100644
index 424214f4..00000000
--- a/web/dist/assets/Home-0ca93a27.js
+++ /dev/null
@@ -1 +0,0 @@
-import{_ as Te}from"./whisper-7dcedd50.js";import{_ as Ue,a as Ee}from"./post-item.vue_vue_type_style_index_0_lang-a5e9cab2.js";import{_ as Ve}from"./post-skeleton-4d2b103e.js";import{d as _e,H as n,c as ce,b as ge,e as c,f as w,bf as I,j as A,k as a,w as l,q,Y as y,y as ve,A as F,x as $,F as pe,u as de,E as Ne}from"./@vue-a481fc63.js";import{u as fe}from"./vuex-44de225f.js";import{l as me}from"./lodash-e0b37ac3.js";import{g as xe,a as Re,c as qe,b as Ge,d as Oe,e as Pe,_ as Ye}from"./index-4a465428.js";import{p as Fe}from"./content-0e30acaf.js";import{V as R,P as Q}from"./IEnum-5453a777.js";import{I as Le,V as Se,A as Me,d as Ke,E as We}from"./@vicons-7a4ef312.js";import{o as he,v as je,j as Qe,e as He,w as Ze,x as Je,y as Xe,z as $e,A as et,B as tt,C as at,a as we,D as st,E as ot,F as nt,G as lt,l as it,H as rt,I as ut,k as ct}from"./naive-ui-d8de3dda.js";import{_ as pt}from"./main-nav.vue_vue_type_style_index_0_lang-2982e04a.js";import{b as dt,u as vt}from"./vue-router-e5a2430e.js";import{W as mt}from"./v3-infinite-loading-2c58ec2f.js";import{S as _t}from"./@opentiny-d73a2d67.js";import"./copy-to-clipboard-4ef7d3eb.js";import"./@babel-725317a4.js";import"./toggle-selection-93f4ad84.js";import"./axios-4a70c6fc.js";import"./moment-2ab8298d.js";/* empty css */import"./seemly-76b7b838.js";import"./vueuc-39372edb.js";import"./evtd-b614532e.js";import"./@css-render-7124a1a5.js";import"./vooks-6d99783e.js";import"./vdirs-b0483831.js";import"./@juggle-41516555.js";import"./css-render-6a5c5852.js";import"./@emotion-8a8e73f6.js";import"./lodash-es-8412e618.js";import"./treemate-25c27bff.js";import"./async-validator-dee29e8b.js";import"./date-fns-975a2d8f.js";import"./paopao-video-player-2fe58954.js";import"./vue-1e3b54ec.js";import"./xss-a5544f63.js";import"./cssfilter-af71ba68.js";const gt=H=>{const P=new FileReader,k=i=>["application/zip","application/x-zip","application/octet-stream","application/x-zip-compressed"].includes(i),D=()=>{const i=new Uint8Array(P.result).subarray(0,4);let B="";for(let _=0;_{P.onloadend=()=>{const _=H.type;i(_===""||_==="application/octet-stream"?D():k(_))},P.readAsArrayBuffer(H.slice(0,4))})},ft={key:0,class:"compose-wrap"},ht={class:"compose-line"},wt={class:"compose-user"},yt={class:"compose-line compose-options"},At={class:"attachment"},kt={class:"submit-wrap"},bt={class:"attachment-list-wrap"},Ct={key:0,class:"attachment-price-wrap"},zt=A("span",null," 附件价格¥",-1),It={key:0,class:"eye-wrap"},Dt={key:1,class:"link-wrap"},Bt={key:1,class:"compose-wrap"},Tt=A("div",{class:"login-wrap"},[A("span",{class:"login-banner"}," 登录后,精彩更多")],-1),Ut={key:0,class:"login-only-wrap"},Et={key:1,class:"login-wrap"},Vt=_e({__name:"compose",emits:["post-success"],setup(H,{emit:P}){const k=fe(),D=n([]),i=n(!1),B=n(!1),_=n(!1),G=n(!1),g=n(""),E=n([]),T=n(),U=n(0),f=n("public/image"),b=n([]),v=n([]),h=n([]),C=n([]),z=n(R.PUBLIC),V=n(R.PUBLIC),M="true".toLowerCase()==="true",Y=+"400",Z=n("true".toLowerCase()==="true"),J=n("true".toLowerCase()==="true"),ee=n("true".toLowerCase()==="true"),L=n("false".toLowerCase()==="true"),te=n("true".toLowerCase()==="true"),K="/v1/attachment",N=ce(()=>"Bearer "+localStorage.getItem("PAOPAO_TOKEN")),X=ce(()=>{let e=[{value:R.PUBLIC,label:"公开"},{value:R.PRIVATE,label:"私密"},{value:R.Following,label:"关注可见"}];return M&&e.push({value:R.FRIEND,label:"好友可见"}),e}),ae=()=>{_.value=!_.value,_.value&&G.value&&(G.value=!1)},W=()=>{G.value=!G.value,G.value&&_.value&&(_.value=!1)},se=me.debounce(e=>{xe({k:e}).then(t=>{let o=[];t.suggest.map(s=>{o.push({label:s,value:s})}),D.value=o,i.value=!1}).catch(t=>{i.value=!1})},200),p=me.debounce(e=>{Re({k:e}).then(t=>{let o=[];t.suggest.map(s=>{o.push({label:s,value:s})}),D.value=o,i.value=!1}).catch(t=>{i.value=!1})},200),d=(e,t)=>{i.value||(i.value=!0,t==="@"?se(e):p(e))},S=e=>{e.length>Y?g.value=e.substring(0,Y):g.value=e},O=e=>{f.value=e},x=e=>{for(let u=0;u30&&(e[u].name=o.substring(0,18)+"..."+o.substring(o.length-9)+"."+s)}b.value=e},oe=async e=>{var t,o,s,u,r;return f.value==="public/image"&&!["image/png","image/jpg","image/jpeg","image/gif"].includes((t=e.file.file)==null?void 0:t.type)?(window.$message.warning("图片仅允许 png/jpg/gif 格式"),!1):f.value==="image"&&((o=e.file.file)==null?void 0:o.size)>10485760?(window.$message.warning("图片大小不能超过10MB"),!1):f.value==="public/video"&&!["video/mp4","video/quicktime"].includes((s=e.file.file)==null?void 0:s.type)?(window.$message.warning("视频仅允许 mp4/mov 格式"),!1):f.value==="public/video"&&((u=e.file.file)==null?void 0:u.size)>104857600?(window.$message.warning("视频大小不能超过100MB"),!1):f.value==="attachment"&&!await gt(e.file.file)?(window.$message.warning("附件仅允许 zip 格式"),!1):f.value==="attachment"&&((r=e.file.file)==null?void 0:r.size)>104857600?(window.$message.warning("附件大小不能超过100MB"),!1):!0},ne=({file:e,event:t})=>{var o;try{let s=JSON.parse((o=t.target)==null?void 0:o.response);s.code===0&&(f.value==="public/image"&&v.value.push({id:e.id,content:s.data.content}),f.value==="public/video"&&h.value.push({id:e.id,content:s.data.content}),f.value==="attachment"&&C.value.push({id:e.id,content:s.data.content}))}catch{window.$message.error("上传失败")}},le=({file:e,event:t})=>{var o;try{let s=JSON.parse((o=t.target)==null?void 0:o.response);if(s.code!==0){let u=s.msg||"上传失败";s.details&&s.details.length>0&&s.details.map(r=>{u+=":"+r}),window.$message.error(u)}}catch{window.$message.error("上传失败")}},ie=({file:e})=>{let t=v.value.findIndex(o=>o.id===e.id);t>-1&&v.value.splice(t,1),t=h.value.findIndex(o=>o.id===e.id),t>-1&&h.value.splice(t,1),t=C.value.findIndex(o=>o.id===e.id),t>-1&&C.value.splice(t,1)},re=()=>{if(g.value.trim().length===0){window.$message.warning("请输入内容哦");return}let{tags:e,users:t}=Fe(g.value);const o=[];let s=100;o.push({content:g.value,type:Q.TEXT,sort:s}),v.value.map(u=>{s++,o.push({content:u.content,type:Q.IMAGEURL,sort:s})}),h.value.map(u=>{s++,o.push({content:u.content,type:Q.VIDEOURL,sort:s})}),C.value.map(u=>{s++,o.push({content:u.content,type:Q.ATTACHMENT,sort:s})}),E.value.length>0&&E.value.map(u=>{s++,o.push({content:u,type:Q.LINKURL,sort:s})}),B.value=!0,qe({contents:o,tags:Array.from(new Set(e)),users:Array.from(new Set(t)),attachment_price:+U.value*100,visibility:z.value}).then(u=>{var r;window.$message.success("发布成功"),B.value=!1,P("post-success",u),_.value=!1,G.value=!1,(r=T.value)==null||r.clear(),b.value=[],g.value="",E.value=[],v.value=[],h.value=[],C.value=[],z.value=V.value}).catch(u=>{B.value=!1})},j=e=>{k.commit("triggerAuth",!0),k.commit("triggerAuthKey",e)};return ge(()=>{const e="friend".toLowerCase();M&&e==="friend"?V.value=R.FRIEND:e==="following"?V.value=R.Following:e==="public"?V.value=R.PUBLIC:V.value=R.PRIVATE,z.value=V.value}),(e,t)=>{const o=he,s=je,u=Qe,r=He,ue=Ze,ye=Je,Ae=Xe,ke=$e,be=et,Ce=tt,ze=at,Ie=we,De=st,Be=ot;return c(),w("div",null,[I(k).state.userInfo.id>0?(c(),w("div",ft,[A("div",ht,[A("div",wt,[a(o,{round:"",size:30,src:I(k).state.userInfo.avatar},null,8,["src"])]),a(s,{type:"textarea",size:"large",autosize:"",bordered:!1,loading:i.value,value:g.value,prefix:["@","#"],options:D.value,onSearch:d,"onUpdate:value":S,placeholder:"说说您的新鲜事..."},null,8,["loading","value","options"])]),a(Ce,{ref_key:"uploadRef",ref:T,abstract:"","list-type":"image",multiple:!0,max:9,action:K,headers:{Authorization:N.value},data:{type:f.value},"file-list":b.value,onBeforeUpload:oe,onFinish:ne,onError:le,onRemove:ie,"onUpdate:fileList":x},{default:l(()=>[A("div",yt,[A("div",At,[a(ue,{abstract:""},{default:l(({handleClick:m})=>[a(r,{disabled:b.value.length>0&&f.value==="public/video"||b.value.length===9,onClick:()=>{O("public/image"),m()},quaternary:"",circle:"",type:"primary"},{icon:l(()=>[a(u,{size:"20",color:"var(--primary-color)"},{default:l(()=>[a(I(Le))]),_:1})]),_:2},1032,["disabled","onClick"])]),_:1}),J.value?(c(),q(ue,{key:0,abstract:""},{default:l(({handleClick:m})=>[a(r,{disabled:b.value.length>0&&f.value!=="public/video"||b.value.length===9,onClick:()=>{O("public/video"),m()},quaternary:"",circle:"",type:"primary"},{icon:l(()=>[a(u,{size:"20",color:"var(--primary-color)"},{default:l(()=>[a(I(Se))]),_:1})]),_:2},1032,["disabled","onClick"])]),_:1})):y("",!0),ee.value?(c(),q(ue,{key:1,abstract:""},{default:l(({handleClick:m})=>[a(r,{disabled:b.value.length>0&&f.value==="public/video"||b.value.length===9,onClick:()=>{O("attachment"),m()},quaternary:"",circle:"",type:"primary"},{icon:l(()=>[a(u,{size:"20",color:"var(--primary-color)"},{default:l(()=>[a(I(Me))]),_:1})]),_:2},1032,["disabled","onClick"])]),_:1})):y("",!0),a(r,{quaternary:"",circle:"",type:"primary",onClick:ve(ae,["stop"])},{icon:l(()=>[a(u,{size:"20",color:"var(--primary-color)"},{default:l(()=>[a(I(Ke))]),_:1})]),_:1},8,["onClick"]),te.value?(c(),q(r,{key:2,quaternary:"",circle:"",type:"primary",onClick:ve(W,["stop"])},{icon:l(()=>[a(u,{size:"20",color:"var(--primary-color)"},{default:l(()=>[a(I(We))]),_:1})]),_:1},8,["onClick"])):y("",!0)]),A("div",kt,[a(Ae,{trigger:"hover",placement:"bottom"},{trigger:l(()=>[a(ye,{class:"text-statistic",type:"circle","show-indicator":!1,status:"success","stroke-width":10,percentage:g.value.length/I(Y)*100},null,8,["percentage"])]),default:l(()=>[F(" "+$(g.value.length)+" / "+$(I(Y)),1)]),_:1}),a(r,{loading:B.value,onClick:re,type:"primary",secondary:"",round:""},{default:l(()=>[F(" 发布 ")]),_:1},8,["loading"])])]),A("div",bt,[a(ke),C.value.length>0?(c(),w("div",Ct,[L.value?(c(),q(be,{key:0,value:U.value,"onUpdate:value":t[0]||(t[0]=m=>U.value=m),min:0,max:1e5,placeholder:"请输入附件价格,0为免费附件"},{prefix:l(()=>[zt]),_:1},8,["value"])):y("",!0)])):y("",!0)])]),_:1},8,["headers","data","file-list"]),G.value?(c(),w("div",It,[a(De,{value:z.value,"onUpdate:value":t[1]||(t[1]=m=>z.value=m),name:"radiogroup"},{default:l(()=>[a(Ie,null,{default:l(()=>[(c(!0),w(pe,null,de(X.value,m=>(c(),q(ze,{key:m.value,value:m.value,label:m.label},null,8,["value","label"]))),128))]),_:1})]),_:1},8,["value"])])):y("",!0),_.value?(c(),w("div",Dt,[a(Be,{value:E.value,"onUpdate:value":t[2]||(t[2]=m=>E.value=m),placeholder:"请输入以http(s)://开头的链接",min:0,max:3},{"create-button-default":l(()=>[F(" 创建链接 ")]),_:1},8,["value"])])):y("",!0)])):(c(),w("div",Bt,[Tt,Z.value?y("",!0):(c(),w("div",Ut,[a(r,{strong:"",secondary:"",round:"",type:"primary",onClick:t[3]||(t[3]=m=>j("signin"))},{default:l(()=>[F(" 登录 ")]),_:1})])),Z.value?(c(),w("div",Et,[a(r,{strong:"",secondary:"",round:"",type:"primary",onClick:t[4]||(t[4]=m=>j("signin"))},{default:l(()=>[F(" 登录 ")]),_:1}),a(r,{strong:"",secondary:"",round:"",type:"info",onClick:t[5]||(t[5]=m=>j("signup"))},{default:l(()=>[F(" 注册 ")]),_:1})])):y("",!0)]))])}}});const Nt="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGAAAABgCAYAAADimHc4AAAACXBIWXMAABYlAAAWJQFJUiTwAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAA1lSURBVHgB7Z17cFTVHcd/59y7uze7ISSCqBBIeGmFIGilrVJUwBcw0jKgnc6Ijsr0D8eO1qrt+Kio9fEHRR1n7ExH8IEzdmgZWluxPnhYijJCkZQAtoSQmARaHk2A3WSzu/ec/n6XJpLdu5u9u/eVx2dmJ/u4m909v3N+v/P7nhcDn7JunVSm3xiv0kLabCnERGBQLoGNlQDnM5D0dzQDUOlavJ/C+0cA2BF8rR6fasMn2xnnhzri8U++Ua61MMZS4EMY+AQppXo4lpqjKHyOkHIWfrVrwE4k+wCYrFU433zsJGy7cgzrAB/gqQHq6mSwdCIsk1LchLV4cXeNdgUJbwHjG2NReK9mFIuCR3higINnuqaqqvpTKWGZq4VuguG+JLymBPiacUG2E1zGNQOsWCH5nY/ot+IHPoS+/ErwIRg/doGivFAdYuvBJVwxQEMstYgz9iLWtgnQD2AM6oDzFW4YwlEDNES7LuNcWe3XGt838lPGlMerS9gWcAhHDHDwpCxTNLEKa9I9MADAQloZjfKnnAjWthvgUDQ5D7t6b6C7qYQBBLklBvyBqhK2CWyEg01QkG2I6Y9zzj8eaIVPYI+tRkjxcWOn/hj9VrAJW1rA4TZZDiH9ffx334FBAGbVn8k4WzC+grVDkRRtSezTT5EhsWewFD6BWftVEBTbG7vkpVAkRbWAxjPJOVLhG/GuBoOTOAd+Q1WY/Q0KpOAW0ByXC4TCP4TBW/iEpoPY8lVcLoICKagF0AfqQvwRhugBldeF1RrbaPFt1g3QcDo5G1S+2WsNx28YmhLjN4wvYVutvM+SASjgqor6dxjcbicXcabwK1DCOJDvG/KOAdTVVLn6Oxgq/FxoIORGo1ueJ3kZwEg8qJ/PYAoMkRPsolYzTW7MN1nLywVRhoup+DMwRN5geaGIpzzb53V9XYDazvUoL3wEQ1gGg/I8VFI357wm14t1x2Rp6TD5GTarGhjCOow1pzpYzeQR7HS2S3J2JUtLxZMkQoEP0LGft7s9BbV4OxjVobVTwOmUhIjCYPGYINxWGQLfIeVYJSxW4b3l2S7J2gLqzyTnKgq3VXotBCr4v/w7ARuOJOBYl8h63cMXl8DskQHwI6rgl40tZXtNX8v6JkV5RlJ64SH/PKPDy/Wd0NIp8rrWrwZIcn0N/plp9pppV6nhTGopFv7V4CGbjiXh0X2xvArf7zAckm2Kp24xe83UAFzlT4KHvI8uh2p+sv+XfQ9S8hfNcoOMJ4za72Gvh4Lsbw7Hs75+kcahssS2ASnXwDKdeMcj+tL05zMtovCfgUfEsFfzEtZ83ST0lKkM7p9UAq9eXgpXlPdbHfDh9Cd6GaDhVOJb6Ps9m0LyTnMXnExklj7V+JdmRGDeqAAovpnNah0jFnTJXnJOLwOwoHIXeERbQsD7/0lkPD8qxOHpqWEYGex/bscMkdIfOvdxz6+irBeTruXgEZuOJ02D7v2TtAFT+Aac3V4nZbDnYfedyHBY6OUgy87/Zk7fn1mhwrThA2zcR0KgNK4v63749a9LiQVeTVanoFsf0zOenzvKnsTqBGbQFFsS4mx8qQgy7E0pnsUTqcNN+Gc13TcMsKtVhoGJO8AjjsZ1U/czrayw2t+tG207kYTdbSlDM0ongG1/UkQxWtm8UUHDKK6hsO/TghRatWP8whHDU9fYOEnOMm0mPZ/yAIOygPVC2YqxhHpTR+O5szgy+AGUL+j2TksXzL8gCD8cG4KI6oIh0A01xFPX4b2Pz5Y653PAZ1h1D1TLnz7QAasOdvZZ+OmQMd49moD79kRhT7s7S8m44HONv8YjJqeDhwR5ZmmbuY1cUM3f1VZc4VGceAqNSFKI00hG6+DQAFvQF+Gjm8BDRpj4X6qVdgpx5PPpc8r6cDEUP37dEDfEQCfBpGz2OikVtbo9XgmhIHjJSEy2yOe3J3vX+h0nk7C0iIEW0o1uviAAM88L9NKPTuPn7D2dgs1YyDuztJpXGzqN91wyTAGHYNNPxas417RrwQfMMNF3PsIC6u46WoHixxIcJXsF5YvFY0IZ4h0F91kjAvDEpWF4FrNsyrbToRb4chZdyi6CocBsrovUJPABZoMpFEzf/qoLrECu5tFLwnBnlWYaW9KhRO+FmrCpwkou8L2jzsUDKdhEzhkfDj6AFE5yGen8CQtg+8n8/fHdWPAzz7OWP5ALfHpK2DQ+UO/IqVaA9aOcYzSoAB9AbuP2cZn+nn78yn91wobWvlvCtDIFFl5UWDwjI9xVnTnpj8ahdzvUNdVBjuWYkfnCBRHkhr5tUnvJCK83dcGD/4gZmlG2GnlrkTMjrjs/YNoKax0yANa58/HXstHgEOQ69p/WLb0nkiMDq4/q8MyX5ls80NsoF6BbMZgZl6bBOAFKEZXq/3cdsZ3fo8t4q8laAC0GKrjNx53pu7c6NzFgNHdKgl7f4nw26RZWs/K8kaA6psDFnOxAu0zEQd2a08oOcIAyN1RFl1hS6ZBSwCClnt1pCsaBzVSGeUYApoyTuorFshV1/kIa2Dzs5ZwrN+fzL6bg96Ws2SGOYBBmzQyk7QagwY50A1BLvm9SSVEjUSQXbzIJtgsvDGIypxhjAfUx86B5Cn35/ZNLwDdIdgSDsDgODjDdRNshaaHYbuK6FvOeFfUmSHRbNb0UlmNCZWZkkqtplMwvYMU/hN+bNYMDkLRgJnK93hiHE4nCunWky9TlkVcsGh2Ehy42b2mkLfmof9DGhRSnwAHox1NBpENdul/s67BshM/bkrCmKZ739eS3bzGRJagV7m73xwaKKPS2c4Wr9eAQ5JezqYw/39sBe0/1XRAkR7+JBf/8l9Yn65K2ZCYt+MUNMY4uCCC+DRyCWgHN5wyYZBskcj2GLYHGcUmyOJU8uxqh+0ZGIgHux3tisL61MEWS5GgakEmn1ictAEcdPlHHaVpTo4Nz8GlE6d4JGg5umLsPCozdY7mUO5CxyE3ZNTWdAvPraZJIGxqb5gqNDHk6405Wa1oLR0EIo5r8KzgIzbshI/TV/aSCp4FxO9cFkAs0a4Fmk4BdRcoPaV6Q8dUEyE/BYW7GeLDiUppkW1yGfHYilbXEyCwrL2So01YYq6U/hgGYgM3gApQbvDKjFBZh78TqfFsKpg9iEkXjuFa1GV/KUpwbZW5kS00RdUtVp0i5MTmXpIDl4zVj0Jzk489xgOVQTAezXinV3CuwxtNADeUVhWTQNAMifbYFUeHtjGsZDIHR+TEKfA76osMd+ga8eyu4BBXAkjEh40Y1lOaHdk9RpN4LzeGxI0juP5OZuFFMMOueuoaEtWPY2c3De2o8Y/wDKYVrBjgXqtmVJQrewHY+Mln0MTni3cxoAyZ7NnbqqQZRDdY6JU17BSV6ZhOvrqzwcM0Bg2QsqrzX/bDHADWMJRiDtTBAIKnDLPcg90PdYs8QsPrcHXh7OUKeSv0KBgBU+KQ3mW1tQNPQXV0LkIYI8DXnPu5lgKphoX2oju6CfgoFc5pU+8Ae8xX2FNhpDYBXoNiya2LaGQVq5kViJTqq30I/4wvUd+79Ipp1bUC3LhXxcKhUKvBC+nMZfbHqEoX2hWuAfgbV+FwLM36EuccMDxd4Swl1E0NqxnkEGQZAfUJIKX8CAwQKulTz51/o7RR8qcoVZs+bZiMTIuq7/TkWdENC3HNTI5a1I7vBSr3drPYTWdukiCfvYZpaCz7EWDRxNPvrNBS6GEfjSAD0x9YG7Imsr0AOGmL6a349BYMG5zfgQA1NACPNaAzW9smliiH4FaobOQFN7p4QVh7O9nrOr2kcRVIi9rEBeCCDO7C9sSi7OtfRJ33Wk8ZOORc1Is/3juuPcMav7+vIkz4lQdr3Eg3wBAxhCcng8XzOm8lLkx0fVp/Df7kDhsgPKXe8pfHn87k071BFG1LLkNzDQFbBENmRsL89wWddnuf5MkPb19tLPKWnvjl5WGh/vm+wNCxk/GPG5w+0cQObSNJ5MlYKn7A8LkcnRHDOvwdD9EKRfGkhh/kUNDBKZ6VINMJQSzBIMskXjouwd6EAisoXmzrkdwUI2tp+0B5jRS7Z6rkx51LU1ABqchR0KPLDIANbfxP99mIKn7DvKMMgHXEySE7Tw35+e0KZf7kfjjIk6EzF6rAyazBkzJThvom/1Y7CJ2zXDJs65TxdiJdQRR1Qp26gy2lBbefOvo4ksYrt08NI/+iI8atIhoUBAg4nrtY726faXfiEo6o5KqlzpNR/iR/j6VkEhYJDs7sCUrk72+kXduDKsEVjh1wipFjRX9wSDsceYpw9UKWxP4PDuDJDtTrM1k+IKNMYcDqbwLdjzfTdUE74wRsl7GI3Cp/wZOCOtsk3dmqXxnCn1we/JLEU3kZ5ZWVViLmez3g6cko7tkdK9YVoiAWYQyxz8fvQksA/4Kd90HFIWVtTwzzb2sU3O2q0tspwYjjMBi5wCFROZ4zdCPZ9P+zIyG1Msu2Yq2wZH1G30Pos8AG+3dKENrdujMcr0UNda+wuCFAuGFTggNAkCYw2mboIvp5WQzv6HMV3NePzx7GgmwVAO63DTUByW62mNd1mLEb0H/8DkOAXi0+nceAAAAAASUVORK5CYII=",xt="/assets/discover-tweets-ab101944.jpeg",Rt="/assets/following-tweets-e36b4410.jpeg",qt={class:"slide-bar-item"},Gt={class:"slide-bar-item-title slide-bar-user-link"},Ot={key:1,class:"skeleton-wrap"},Pt={key:0,class:"empty-wrap"},Yt={key:1},Ft={key:2},Lt={class:"load-more-wrap"},St={class:"load-more-spinner"},Mt=_e({__name:"Home",setup(H){const P="true".toLowerCase()==="true",k="true".toLowerCase()==="true",D=fe(),i=dt(),B=vt(),_=n(9),G=n(8),g=n([{title:"最新动态",style:1,username:"",avatar:Nt,show:!0},{title:"热门推荐",style:2,username:"",avatar:xt,show:!1},{title:"正在关注",style:3,username:"",avatar:Rt,show:!1},{title:"",style:1,username:"",avatar:"",show:!0},{title:"",style:1,username:"",avatar:"",show:!0},{title:"",style:1,username:"",avatar:"",show:!0},{title:"",style:1,username:"",avatar:"",show:!0},{title:"",style:1,username:"",avatar:"",show:!0},{title:"",style:1,username:"",avatar:"",show:!0},{title:"",style:1,username:"",avatar:"",show:!0},{title:"",style:1,username:"",avatar:"",show:!0},{title:"",style:1,username:"",avatar:"",show:!0}]),E=n("泡泡广场"),T=n(!1),U=n(!1),f=n(1),b=n(""),v=n([]),h=n(1),C=n(20),z=n(0),V=n(!1),M=n({id:0,avatar:"",username:"",nickname:"",is_admin:!1,is_friend:!0,is_following:!1,created_on:0,follows:0,followings:0,status:1}),Y=p=>{M.value=p,V.value=!0},Z=()=>{V.value=!1},J=()=>{E.value="泡泡广场",i.query&&i.query.q&&(i.query.t&&i.query.t==="tag"?E.value="#"+decodeURIComponent(i.query.q):E.value="搜索: "+decodeURIComponent(i.query.q))},ee=ce(()=>P&&k&&D.state.desktopModelShow&&D.state.userInfo.id>0),L=()=>{T.value=!1,U.value=!1,v.value=[],h.value=1,z.value=0},te=(p,d)=>{switch(L(),f.value=p.style,i.query.q&&(i.query.q=null,J()),p.style){case 1:N("newest");break;case 2:N("hots");break;case 3:i.query.q=null,N("following");break;case 21:b.value=p.username,X();break}g.value[d].show=!1},K=()=>{g.value=g.value.slice(0,3),!(!P||!k||D.state.userInfo.id===0)&&Ge({page:1,page_size:50}).then(p=>{var d=0;const S=p.list||[];let O=[];for(;d0&&(g.value=g.value.concat(O))}).catch(p=>{console.log(p)})},N=p=>{T.value=!0,Oe({query:i.query.q?decodeURIComponent(i.query.q):null,type:i.query.t,style:p,page:h.value,page_size:C.value}).then(d=>{T.value=!1,d.list.length===0&&(U.value=!0),h.value>1?v.value=v.value.concat(d.list):(v.value=d.list,window.scrollTo(0,0)),z.value=Math.ceil(d.pager.total_rows/C.value)}).catch(d=>{T.value=!1,h.value>1&&h.value--})},X=()=>{T.value=!0,Pe({username:b.value,style:"post",page:h.value,page_size:C.value}).then(p=>{T.value=!1,p.list.length===0&&(U.value=!0),h.value>1?v.value=v.value.concat(p.list):(v.value=p.list||[],window.scrollTo(0,0)),z.value=Math.ceil(p.pager.total_rows/C.value)}).catch(p=>{v.value=[],h.value>1&&h.value--,T.value=!1})},ae=p=>{B.push({name:"post",query:{id:p.id}})},W=()=>{switch(f.value){case 1:N("newest");break;case 2:N("hots");break;case 3:N("following");break;case 21:i.query.q?N("search"):X();break}},se=()=>{h.value{L(),K(),N("newest")}),Ne(()=>({path:i.path,query:i.query,refresh:D.state.refresh}),(p,d)=>{if(J(),p.refresh!==d.refresh){L(),setTimeout(()=>{K(),W()},0);return}d.path!=="/post"&&p.path==="/"&&(L(),setTimeout(()=>{K(),W()},0))}),(p,d)=>{const S=pt,O=Vt,x=lt,oe=he,ne=it,le=rt,ie=Ve,re=ut,j=Ue,e=Ee,t=Te,o=nt,s=ct,u=we;return c(),w("div",null,[a(S,{title:E.value},null,8,["title"]),a(o,{class:"main-content-wrap",bordered:""},{default:l(()=>[a(x,null,{default:l(()=>[a(O,{onPostSuccess:ae})]),_:1}),ee.value?(c(),q(x,{key:0},{default:l(()=>[a(I(_t),{modelValue:g.value,"onUpdate:modelValue":d[0]||(d[0]=r=>g.value=r),"wheel-blocks":G.value,"init-blocks":_.value,onClick:te,tag:"div","sub-tag":"div"},{default:l(r=>[A("div",qt,[a(ne,{value:"1",offset:[-4,48],dot:"",show:r.slotData.show},{default:l(()=>[a(oe,{round:"",size:48,src:r.slotData.avatar,class:"slide-bar-item-avatar"},null,8,["src"])]),_:2},1032,["show"]),A("div",Gt,[a(le,{"line-clamp":2},{default:l(()=>[F($(r.slotData.title),1)]),_:2},1024)])])]),_:1},8,["modelValue","wheel-blocks","init-blocks"])]),_:1})):y("",!0),T.value&&v.value.length===0?(c(),w("div",Ot,[a(ie,{num:C.value},null,8,["num"])])):y("",!0),A("div",null,[v.value.length===0?(c(),w("div",Pt,[a(re,{size:"large",description:"暂无数据"})])):y("",!0),I(D).state.desktopModelShow?(c(),w("div",Yt,[(c(!0),w(pe,null,de(v.value,r=>(c(),q(x,{key:r.id},{default:l(()=>[a(j,{post:r,onSendWhisper:Y},null,8,["post"])]),_:2},1024))),128))])):(c(),w("div",Ft,[(c(!0),w(pe,null,de(v.value,r=>(c(),q(x,{key:r.id},{default:l(()=>[a(e,{post:r,onSendWhisper:Y},null,8,["post"])]),_:2},1024))),128))]))]),a(t,{show:V.value,user:M.value,onSuccess:Z},null,8,["show","user"])]),_:1}),z.value>0?(c(),q(u,{key:0,justify:"center"},{default:l(()=>[a(I(mt),{class:"load-more",slots:{complete:"没有更多泡泡了",error:"加载出错"},onInfinite:d[1]||(d[1]=r=>se())},{spinner:l(()=>[A("div",Lt,[U.value?y("",!0):(c(),q(s,{key:0,size:14})),A("span",St,$(U.value?"没有更多泡泡了":"加载更多"),1)])]),_:1})]),_:1})):y("",!0)])}}});const Ta=Ye(Mt,[["__scopeId","data-v-b0cbbdc2"]]);export{Ta as default};
diff --git a/web/dist/assets/Home-b58ba6dd.css b/web/dist/assets/Home-a97c2703.css
similarity index 62%
rename from web/dist/assets/Home-b58ba6dd.css
rename to web/dist/assets/Home-a97c2703.css
index c9b69c63..09c5b94a 100644
--- a/web/dist/assets/Home-b58ba6dd.css
+++ b/web/dist/assets/Home-a97c2703.css
@@ -1 +1 @@
-.compose-wrap{width:100%;padding:16px;box-sizing:border-box}.compose-wrap .compose-line{display:flex;flex-direction:row}.compose-wrap .compose-line .compose-user{width:42px;height:42px;display:flex;align-items:center}.compose-wrap .compose-line.compose-options{margin-top:6px;padding-left:42px;display:flex;justify-content:space-between}.compose-wrap .compose-line.compose-options .submit-wrap{display:flex;align-items:center}.compose-wrap .compose-line.compose-options .submit-wrap .text-statistic{margin-right:8px;width:20px;height:20px;transform:rotate(180deg)}.compose-wrap .link-wrap{margin-left:42px;margin-right:42px}.compose-wrap .eye-wrap{margin-left:64px}.compose-wrap .login-only-wrap{display:flex;justify-content:center;width:100%}.compose-wrap .login-only-wrap button{margin:0 4px;width:50%}.compose-wrap .login-wrap{display:flex;justify-content:center;width:100%}.compose-wrap .login-wrap .login-banner{margin-bottom:12px;opacity:.8}.compose-wrap .login-wrap button{margin:0 4px}.attachment-list-wrap{margin-top:12px;margin-left:42px}.attachment-list-wrap .n-upload-file-info__thumbnail{overflow:hidden}.dark .compose-wrap{background-color:#101014bf}.tiny-slide-bar .tiny-slide-bar__list>div.tiny-slide-bar__select .slide-bar-item .slide-bar-item-title[data-v-b0cbbdc2]{color:#18a058;opacity:.8}.tiny-slide-bar .tiny-slide-bar__list>div:hover .slide-bar-item[data-v-b0cbbdc2]{cursor:pointer}.tiny-slide-bar .tiny-slide-bar__list>div:hover .slide-bar-item .slide-bar-item-avatar[data-v-b0cbbdc2]{color:#18a058;opacity:.8}.tiny-slide-bar .tiny-slide-bar__list>div:hover .slide-bar-item .slide-bar-item-title[data-v-b0cbbdc2]{color:#18a058;opacity:.8}.tiny-slide-bar[data-v-b0cbbdc2]{margin-top:-30px;margin-bottom:-30px}.tiny-slide-bar .slide-bar-item[data-v-b0cbbdc2]{min-height:170px;width:64px;display:flex;flex-direction:column;justify-content:center;align-items:center;margin-top:8px}.tiny-slide-bar .slide-bar-item .slide-bar-item-title[data-v-b0cbbdc2]{justify-content:center;font-size:12px;margin-top:4px;height:40px}.load-more[data-v-b0cbbdc2]{margin:20px}.load-more .load-more-wrap[data-v-b0cbbdc2]{display:flex;flex-direction:row;justify-content:center;align-items:center;gap:14px}.load-more .load-more-wrap .load-more-spinner[data-v-b0cbbdc2]{font-size:14px;opacity:.65}.dark .main-content-wrap[data-v-b0cbbdc2],.dark .pagination-wrap[data-v-b0cbbdc2],.dark .empty-wrap[data-v-b0cbbdc2],.dark .skeleton-wrap[data-v-b0cbbdc2]{background-color:#101014bf}.dark .tiny-slide-bar .tiny-slide-bar__list>div.tiny-slide-bar__select .slide-bar-item .slide-bar-item-title[data-v-b0cbbdc2]{color:#63e2b7;opacity:.8}.dark .tiny-slide-bar .tiny-slide-bar__list>div:hover .slide-bar-item .slide-bar-item-title[data-v-b0cbbdc2]{color:#63e2b7;opacity:.8}
+.compose-wrap{width:100%;padding:16px;box-sizing:border-box}.compose-wrap .compose-line{display:flex;flex-direction:row}.compose-wrap .compose-line .compose-user{width:42px;height:42px;display:flex;align-items:center}.compose-wrap .compose-line.compose-options{margin-top:6px;padding-left:42px;display:flex;justify-content:space-between}.compose-wrap .compose-line.compose-options .submit-wrap{display:flex;align-items:center}.compose-wrap .compose-line.compose-options .submit-wrap .text-statistic{margin-right:8px;width:20px;height:20px;transform:rotate(180deg)}.compose-wrap .link-wrap{margin-left:42px;margin-right:42px}.compose-wrap .eye-wrap{margin-left:64px}.compose-wrap .login-only-wrap{display:flex;justify-content:center;width:100%}.compose-wrap .login-only-wrap button{margin:0 4px;width:50%}.compose-wrap .login-wrap{display:flex;justify-content:center;width:100%}.compose-wrap .login-wrap .login-banner{margin-bottom:12px;opacity:.8}.compose-wrap .login-wrap button{margin:0 4px}.attachment-list-wrap{margin-top:12px;margin-left:42px}.attachment-list-wrap .n-upload-file-info__thumbnail{overflow:hidden}.dark .compose-wrap{background-color:#101014bf}.tiny-slide-bar .tiny-slide-bar__list>div.tiny-slide-bar__select .slide-bar-item .slide-bar-item-title[data-v-c53a3615]{color:#18a058;opacity:.8}.tiny-slide-bar .tiny-slide-bar__list>div:hover .slide-bar-item[data-v-c53a3615]{cursor:pointer}.tiny-slide-bar .tiny-slide-bar__list>div:hover .slide-bar-item .slide-bar-item-avatar[data-v-c53a3615]{color:#18a058;opacity:.8}.tiny-slide-bar .tiny-slide-bar__list>div:hover .slide-bar-item .slide-bar-item-title[data-v-c53a3615]{color:#18a058;opacity:.8}.tiny-slide-bar[data-v-c53a3615]{margin-top:-30px;margin-bottom:-30px}.tiny-slide-bar .slide-bar-item[data-v-c53a3615]{min-height:170px;width:64px;display:flex;flex-direction:column;justify-content:center;align-items:center;margin-top:8px}.tiny-slide-bar .slide-bar-item .slide-bar-item-title[data-v-c53a3615]{justify-content:center;font-size:12px;margin-top:4px;height:40px}.load-more[data-v-c53a3615]{margin:20px}.load-more .load-more-wrap[data-v-c53a3615]{display:flex;flex-direction:row;justify-content:center;align-items:center;gap:14px}.load-more .load-more-wrap .load-more-spinner[data-v-c53a3615]{font-size:14px;opacity:.65}.dark .main-content-wrap[data-v-c53a3615],.dark .pagination-wrap[data-v-c53a3615],.dark .empty-wrap[data-v-c53a3615],.dark .skeleton-wrap[data-v-c53a3615]{background-color:#101014bf}.dark .tiny-slide-bar .tiny-slide-bar__list>div.tiny-slide-bar__select .slide-bar-item .slide-bar-item-title[data-v-c53a3615]{color:#63e2b7;opacity:.8}.dark .tiny-slide-bar .tiny-slide-bar__list>div:hover .slide-bar-item .slide-bar-item-title[data-v-c53a3615]{color:#63e2b7;opacity:.8}
diff --git a/web/dist/assets/Home-f64ca6df.js b/web/dist/assets/Home-f64ca6df.js
new file mode 100644
index 00000000..b698a265
--- /dev/null
+++ b/web/dist/assets/Home-f64ca6df.js
@@ -0,0 +1 @@
+import{W as Ue}from"./whisper-add-friend-7ede77e9.js";import{_ as Be}from"./whisper-9b4eeceb.js";import{_ as Ee,a as Ve}from"./post-item.vue_vue_type_style_index_0_lang-c2092e3d.js";import{_ as xe}from"./post-skeleton-8434d30b.js";import{d as Ce,H as l,c as we,b as Ie,e as p,f as y,bf as A,j as b,k as a,w as i,q as x,Y as k,y as ke,A as S,x as se,F as ye,u as Ae,R as Fe,E as Ne}from"./@vue-a481fc63.js";import{u as ze}from"./vuex-44de225f.js";import{l as be}from"./lodash-e0b37ac3.js";import{g as Re,a as qe,c as Ge,b as Oe,d as Pe,e as Se,u as Ye,f as Le,h as Me,_ as We}from"./index-daff1b26.js";import{p as Ke}from"./content-64a02a2f.js";import{V,P as Q}from"./IEnum-5453a777.js";import{I as je,V as Qe,A as He,d as Ze,E as Je}from"./@vicons-c265fba6.js";import{o as De,v as Xe,j as $e,e as et,w as tt,x as st,y as at,z as nt,A as ot,B as lt,C as it,a as Te,D as rt,E as ut,F as ct,G as pt,H as dt,l as vt,I as mt,J as _t,k as ft}from"./naive-ui-defd0b2d.js";import{_ as gt}from"./main-nav.vue_vue_type_style_index_0_lang-93352cc4.js";import{b as ht,u as wt}from"./vue-router-e5a2430e.js";import{W as yt}from"./v3-infinite-loading-2c58ec2f.js";import{S as At}from"./@opentiny-d73a2d67.js";import"./copy-to-clipboard-4ef7d3eb.js";import"./@babel-725317a4.js";import"./toggle-selection-93f4ad84.js";import"./axios-4a70c6fc.js";import"./moment-2ab8298d.js";/* empty css */import"./seemly-76b7b838.js";import"./vueuc-39372edb.js";import"./evtd-b614532e.js";import"./@css-render-7124a1a5.js";import"./vooks-6d99783e.js";import"./vdirs-b0483831.js";import"./@juggle-41516555.js";import"./css-render-6a5c5852.js";import"./@emotion-8a8e73f6.js";import"./lodash-es-8412e618.js";import"./treemate-25c27bff.js";import"./async-validator-dee29e8b.js";import"./date-fns-975a2d8f.js";import"./paopao-video-player-2fe58954.js";import"./vue-1e3b54ec.js";import"./xss-a5544f63.js";import"./cssfilter-af71ba68.js";const kt=H=>{const R=new FileReader,C=r=>["application/zip","application/x-zip","application/octet-stream","application/x-zip-compressed"].includes(r),I=()=>{const r=new Uint8Array(R.result).subarray(0,4);let T="";for(let m=0;m{R.onloadend=()=>{const m=H.type;r(m===""||m==="application/octet-stream"?I():C(m))},R.readAsArrayBuffer(H.slice(0,4))})},bt={key:0,class:"compose-wrap"},Ct={class:"compose-line"},It={class:"compose-user"},zt={class:"compose-line compose-options"},Dt={class:"attachment"},Tt={class:"submit-wrap"},Ut={class:"attachment-list-wrap"},Bt={key:0,class:"attachment-price-wrap"},Et=b("span",null," 附件价格¥",-1),Vt={key:0,class:"eye-wrap"},xt={key:1,class:"link-wrap"},Ft={key:1,class:"compose-wrap"},Nt=b("div",{class:"login-wrap"},[b("span",{class:"login-banner"}," 登录后,精彩更多")],-1),Rt={key:0,class:"login-only-wrap"},qt={key:1,class:"login-wrap"},Gt=Ce({__name:"compose",emits:["post-success"],setup(H,{emit:R}){const C=ze(),I=l([]),r=l(!1),T=l(!1),m=l(!1),F=l(!1),U=l(""),z=l([]),q=l(),Y=l(0),d=l("public/image"),_=l([]),D=l([]),G=l([]),N=l([]),f=l(V.PUBLIC),g=l(V.PUBLIC),O="true".toLowerCase()==="true",B=+"400",L=l("true".toLowerCase()==="true"),W=l("true".toLowerCase()==="true"),Z=l("true".toLowerCase()==="true"),J=l("false".toLowerCase()==="true"),ae=l("true".toLowerCase()==="true"),ne="/v1/attachment",oe=we(()=>"Bearer "+localStorage.getItem("PAOPAO_TOKEN")),le=we(()=>{let e=[{value:V.PUBLIC,label:"公开"},{value:V.PRIVATE,label:"私密"},{value:V.Following,label:"关注可见"}];return O&&e.push({value:V.FRIEND,label:"好友可见"}),e}),X=()=>{m.value=!m.value,m.value&&F.value&&(F.value=!1)},$=()=>{F.value=!F.value,F.value&&m.value&&(m.value=!1)},ee=be.debounce(e=>{Re({k:e}).then(t=>{let s=[];t.suggest.map(o=>{s.push({label:o,value:o})}),I.value=s,r.value=!1}).catch(t=>{r.value=!1})},200),ie=be.debounce(e=>{qe({k:e}).then(t=>{let s=[];t.suggest.map(o=>{s.push({label:o,value:o})}),I.value=s,r.value=!1}).catch(t=>{r.value=!1})},200),M=(e,t)=>{r.value||(r.value=!0,t==="@"?ee(e):ie(e))},re=e=>{e.length>B?U.value=e.substring(0,B):U.value=e},P=e=>{d.value=e},E=e=>{for(let c=0;c30&&(e[c].name=s.substring(0,18)+"..."+s.substring(s.length-9)+"."+o)}_.value=e},te=async e=>{var t,s,o,c,v;return d.value==="public/image"&&!["image/png","image/jpg","image/jpeg","image/gif"].includes((t=e.file.file)==null?void 0:t.type)?(window.$message.warning("图片仅允许 png/jpg/gif 格式"),!1):d.value==="image"&&((s=e.file.file)==null?void 0:s.size)>10485760?(window.$message.warning("图片大小不能超过10MB"),!1):d.value==="public/video"&&!["video/mp4","video/quicktime"].includes((o=e.file.file)==null?void 0:o.type)?(window.$message.warning("视频仅允许 mp4/mov 格式"),!1):d.value==="public/video"&&((c=e.file.file)==null?void 0:c.size)>104857600?(window.$message.warning("视频大小不能超过100MB"),!1):d.value==="attachment"&&!await kt(e.file.file)?(window.$message.warning("附件仅允许 zip 格式"),!1):d.value==="attachment"&&((v=e.file.file)==null?void 0:v.size)>104857600?(window.$message.warning("附件大小不能超过100MB"),!1):!0},ue=({file:e,event:t})=>{var s;try{let o=JSON.parse((s=t.target)==null?void 0:s.response);o.code===0&&(d.value==="public/image"&&D.value.push({id:e.id,content:o.data.content}),d.value==="public/video"&&G.value.push({id:e.id,content:o.data.content}),d.value==="attachment"&&N.value.push({id:e.id,content:o.data.content}))}catch{window.$message.error("上传失败")}},K=({file:e,event:t})=>{var s;try{let o=JSON.parse((s=t.target)==null?void 0:s.response);if(o.code!==0){let c=o.msg||"上传失败";o.details&&o.details.length>0&&o.details.map(v=>{c+=":"+v}),window.$message.error(c)}}catch{window.$message.error("上传失败")}},ce=({file:e})=>{let t=D.value.findIndex(s=>s.id===e.id);t>-1&&D.value.splice(t,1),t=G.value.findIndex(s=>s.id===e.id),t>-1&&G.value.splice(t,1),t=N.value.findIndex(s=>s.id===e.id),t>-1&&N.value.splice(t,1)},n=()=>{if(U.value.trim().length===0){window.$message.warning("请输入内容哦");return}let{tags:e,users:t}=Ke(U.value);const s=[];let o=100;s.push({content:U.value,type:Q.TEXT,sort:o}),D.value.map(c=>{o++,s.push({content:c.content,type:Q.IMAGEURL,sort:o})}),G.value.map(c=>{o++,s.push({content:c.content,type:Q.VIDEOURL,sort:o})}),N.value.map(c=>{o++,s.push({content:c.content,type:Q.ATTACHMENT,sort:o})}),z.value.length>0&&z.value.map(c=>{o++,s.push({content:c,type:Q.LINKURL,sort:o})}),T.value=!0,Ge({contents:s,tags:Array.from(new Set(e)),users:Array.from(new Set(t)),attachment_price:+Y.value*100,visibility:f.value}).then(c=>{var v;window.$message.success("发布成功"),T.value=!1,R("post-success",c),m.value=!1,F.value=!1,(v=q.value)==null||v.clear(),_.value=[],U.value="",z.value=[],D.value=[],G.value=[],N.value=[],f.value=g.value}).catch(c=>{T.value=!1})},u=e=>{C.commit("triggerAuth",!0),C.commit("triggerAuthKey",e)};return Ie(()=>{const e="friend".toLowerCase();O&&e==="friend"?g.value=V.FRIEND:e==="following"?g.value=V.Following:e==="public"?g.value=V.PUBLIC:g.value=V.PRIVATE,f.value=g.value}),(e,t)=>{const s=De,o=Xe,c=$e,v=et,j=tt,pe=st,de=at,ve=nt,me=ot,_e=lt,fe=it,ge=Te,he=rt,w=ut;return p(),y("div",null,[A(C).state.userInfo.id>0?(p(),y("div",bt,[b("div",Ct,[b("div",It,[a(s,{round:"",size:30,src:A(C).state.userInfo.avatar},null,8,["src"])]),a(o,{type:"textarea",size:"large",autosize:"",bordered:!1,loading:r.value,value:U.value,prefix:["@","#"],options:I.value,onSearch:M,"onUpdate:value":re,placeholder:"说说您的新鲜事..."},null,8,["loading","value","options"])]),a(_e,{ref_key:"uploadRef",ref:q,abstract:"","list-type":"image",multiple:!0,max:9,action:ne,headers:{Authorization:oe.value},data:{type:d.value},"file-list":_.value,onBeforeUpload:te,onFinish:ue,onError:K,onRemove:ce,"onUpdate:fileList":E},{default:i(()=>[b("div",zt,[b("div",Dt,[a(j,{abstract:""},{default:i(({handleClick:h})=>[a(v,{disabled:_.value.length>0&&d.value==="public/video"||_.value.length===9,onClick:()=>{P("public/image"),h()},quaternary:"",circle:"",type:"primary"},{icon:i(()=>[a(c,{size:"20",color:"var(--primary-color)"},{default:i(()=>[a(A(je))]),_:1})]),_:2},1032,["disabled","onClick"])]),_:1}),W.value?(p(),x(j,{key:0,abstract:""},{default:i(({handleClick:h})=>[a(v,{disabled:_.value.length>0&&d.value!=="public/video"||_.value.length===9,onClick:()=>{P("public/video"),h()},quaternary:"",circle:"",type:"primary"},{icon:i(()=>[a(c,{size:"20",color:"var(--primary-color)"},{default:i(()=>[a(A(Qe))]),_:1})]),_:2},1032,["disabled","onClick"])]),_:1})):k("",!0),Z.value?(p(),x(j,{key:1,abstract:""},{default:i(({handleClick:h})=>[a(v,{disabled:_.value.length>0&&d.value==="public/video"||_.value.length===9,onClick:()=>{P("attachment"),h()},quaternary:"",circle:"",type:"primary"},{icon:i(()=>[a(c,{size:"20",color:"var(--primary-color)"},{default:i(()=>[a(A(He))]),_:1})]),_:2},1032,["disabled","onClick"])]),_:1})):k("",!0),a(v,{quaternary:"",circle:"",type:"primary",onClick:ke(X,["stop"])},{icon:i(()=>[a(c,{size:"20",color:"var(--primary-color)"},{default:i(()=>[a(A(Ze))]),_:1})]),_:1},8,["onClick"]),ae.value?(p(),x(v,{key:2,quaternary:"",circle:"",type:"primary",onClick:ke($,["stop"])},{icon:i(()=>[a(c,{size:"20",color:"var(--primary-color)"},{default:i(()=>[a(A(Je))]),_:1})]),_:1},8,["onClick"])):k("",!0)]),b("div",Tt,[a(de,{trigger:"hover",placement:"bottom"},{trigger:i(()=>[a(pe,{class:"text-statistic",type:"circle","show-indicator":!1,status:"success","stroke-width":10,percentage:U.value.length/A(B)*100},null,8,["percentage"])]),default:i(()=>[S(" "+se(U.value.length)+" / "+se(A(B)),1)]),_:1}),a(v,{loading:T.value,onClick:n,type:"primary",secondary:"",round:""},{default:i(()=>[S(" 发布 ")]),_:1},8,["loading"])])]),b("div",Ut,[a(ve),N.value.length>0?(p(),y("div",Bt,[J.value?(p(),x(me,{key:0,value:Y.value,"onUpdate:value":t[0]||(t[0]=h=>Y.value=h),min:0,max:1e5,placeholder:"请输入附件价格,0为免费附件"},{prefix:i(()=>[Et]),_:1},8,["value"])):k("",!0)])):k("",!0)])]),_:1},8,["headers","data","file-list"]),F.value?(p(),y("div",Vt,[a(he,{value:f.value,"onUpdate:value":t[1]||(t[1]=h=>f.value=h),name:"radiogroup"},{default:i(()=>[a(ge,null,{default:i(()=>[(p(!0),y(ye,null,Ae(le.value,h=>(p(),x(fe,{key:h.value,value:h.value,label:h.label},null,8,["value","label"]))),128))]),_:1})]),_:1},8,["value"])])):k("",!0),m.value?(p(),y("div",xt,[a(w,{value:z.value,"onUpdate:value":t[2]||(t[2]=h=>z.value=h),placeholder:"请输入以http(s)://开头的链接",min:0,max:3},{"create-button-default":i(()=>[S(" 创建链接 ")]),_:1},8,["value"])])):k("",!0)])):(p(),y("div",Ft,[Nt,L.value?k("",!0):(p(),y("div",Rt,[a(v,{strong:"",secondary:"",round:"",type:"primary",onClick:t[3]||(t[3]=h=>u("signin"))},{default:i(()=>[S(" 登录 ")]),_:1})])),L.value?(p(),y("div",qt,[a(v,{strong:"",secondary:"",round:"",type:"primary",onClick:t[4]||(t[4]=h=>u("signin"))},{default:i(()=>[S(" 登录 ")]),_:1}),a(v,{strong:"",secondary:"",round:"",type:"info",onClick:t[5]||(t[5]=h=>u("signup"))},{default:i(()=>[S(" 注册 ")]),_:1})])):k("",!0)]))])}}});const Ot="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGAAAABgCAYAAADimHc4AAAACXBIWXMAABYlAAAWJQFJUiTwAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAA1lSURBVHgB7Z17cFTVHcd/59y7uze7ISSCqBBIeGmFIGilrVJUwBcw0jKgnc6Ijsr0D8eO1qrt+Kio9fEHRR1n7ExH8IEzdmgZWluxPnhYijJCkZQAtoSQmARaHk2A3WSzu/ec/n6XJpLdu5u9u/eVx2dmJ/u4m909v3N+v/P7nhcDn7JunVSm3xiv0kLabCnERGBQLoGNlQDnM5D0dzQDUOlavJ/C+0cA2BF8rR6fasMn2xnnhzri8U++Ua61MMZS4EMY+AQppXo4lpqjKHyOkHIWfrVrwE4k+wCYrFU433zsJGy7cgzrAB/gqQHq6mSwdCIsk1LchLV4cXeNdgUJbwHjG2NReK9mFIuCR3higINnuqaqqvpTKWGZq4VuguG+JLymBPiacUG2E1zGNQOsWCH5nY/ot+IHPoS+/ErwIRg/doGivFAdYuvBJVwxQEMstYgz9iLWtgnQD2AM6oDzFW4YwlEDNES7LuNcWe3XGt838lPGlMerS9gWcAhHDHDwpCxTNLEKa9I9MADAQloZjfKnnAjWthvgUDQ5D7t6b6C7qYQBBLklBvyBqhK2CWyEg01QkG2I6Y9zzj8eaIVPYI+tRkjxcWOn/hj9VrAJW1rA4TZZDiH9ffx334FBAGbVn8k4WzC+grVDkRRtSezTT5EhsWewFD6BWftVEBTbG7vkpVAkRbWAxjPJOVLhG/GuBoOTOAd+Q1WY/Q0KpOAW0ByXC4TCP4TBW/iEpoPY8lVcLoICKagF0AfqQvwRhugBldeF1RrbaPFt1g3QcDo5G1S+2WsNx28YmhLjN4wvYVutvM+SASjgqor6dxjcbicXcabwK1DCOJDvG/KOAdTVVLn6Oxgq/FxoIORGo1ueJ3kZwEg8qJ/PYAoMkRPsolYzTW7MN1nLywVRhoup+DMwRN5geaGIpzzb53V9XYDazvUoL3wEQ1gGg/I8VFI357wm14t1x2Rp6TD5GTarGhjCOow1pzpYzeQR7HS2S3J2JUtLxZMkQoEP0LGft7s9BbV4OxjVobVTwOmUhIjCYPGYINxWGQLfIeVYJSxW4b3l2S7J2gLqzyTnKgq3VXotBCr4v/w7ARuOJOBYl8h63cMXl8DskQHwI6rgl40tZXtNX8v6JkV5RlJ64SH/PKPDy/Wd0NIp8rrWrwZIcn0N/plp9pppV6nhTGopFv7V4CGbjiXh0X2xvArf7zAckm2Kp24xe83UAFzlT4KHvI8uh2p+sv+XfQ9S8hfNcoOMJ4za72Gvh4Lsbw7Hs75+kcahssS2ASnXwDKdeMcj+tL05zMtovCfgUfEsFfzEtZ83ST0lKkM7p9UAq9eXgpXlPdbHfDh9Cd6GaDhVOJb6Ps9m0LyTnMXnExklj7V+JdmRGDeqAAovpnNah0jFnTJXnJOLwOwoHIXeERbQsD7/0lkPD8qxOHpqWEYGex/bscMkdIfOvdxz6+irBeTruXgEZuOJ02D7v2TtAFT+Aac3V4nZbDnYfedyHBY6OUgy87/Zk7fn1mhwrThA2zcR0KgNK4v63749a9LiQVeTVanoFsf0zOenzvKnsTqBGbQFFsS4mx8qQgy7E0pnsUTqcNN+Gc13TcMsKtVhoGJO8AjjsZ1U/czrayw2t+tG207kYTdbSlDM0ongG1/UkQxWtm8UUHDKK6hsO/TghRatWP8whHDU9fYOEnOMm0mPZ/yAIOygPVC2YqxhHpTR+O5szgy+AGUL+j2TksXzL8gCD8cG4KI6oIh0A01xFPX4b2Pz5Y653PAZ1h1D1TLnz7QAasOdvZZ+OmQMd49moD79kRhT7s7S8m44HONv8YjJqeDhwR5ZmmbuY1cUM3f1VZc4VGceAqNSFKI00hG6+DQAFvQF+Gjm8BDRpj4X6qVdgpx5PPpc8r6cDEUP37dEDfEQCfBpGz2OikVtbo9XgmhIHjJSEy2yOe3J3vX+h0nk7C0iIEW0o1uviAAM88L9NKPTuPn7D2dgs1YyDuztJpXGzqN91wyTAGHYNNPxas417RrwQfMMNF3PsIC6u46WoHixxIcJXsF5YvFY0IZ4h0F91kjAvDEpWF4FrNsyrbToRb4chZdyi6CocBsrovUJPABZoMpFEzf/qoLrECu5tFLwnBnlWYaW9KhRO+FmrCpwkou8L2jzsUDKdhEzhkfDj6AFE5yGen8CQtg+8n8/fHdWPAzz7OWP5ALfHpK2DQ+UO/IqVaA9aOcYzSoAB9AbuP2cZn+nn78yn91wobWvlvCtDIFFl5UWDwjI9xVnTnpj8ahdzvUNdVBjuWYkfnCBRHkhr5tUnvJCK83dcGD/4gZmlG2GnlrkTMjrjs/YNoKax0yANa58/HXstHgEOQ69p/WLb0nkiMDq4/q8MyX5ls80NsoF6BbMZgZl6bBOAFKEZXq/3cdsZ3fo8t4q8laAC0GKrjNx53pu7c6NzFgNHdKgl7f4nw26RZWs/K8kaA6psDFnOxAu0zEQd2a08oOcIAyN1RFl1hS6ZBSwCClnt1pCsaBzVSGeUYApoyTuorFshV1/kIa2Dzs5ZwrN+fzL6bg96Ws2SGOYBBmzQyk7QagwY50A1BLvm9SSVEjUSQXbzIJtgsvDGIypxhjAfUx86B5Cn35/ZNLwDdIdgSDsDgODjDdRNshaaHYbuK6FvOeFfUmSHRbNb0UlmNCZWZkkqtplMwvYMU/hN+bNYMDkLRgJnK93hiHE4nCunWky9TlkVcsGh2Ehy42b2mkLfmof9DGhRSnwAHox1NBpENdul/s67BshM/bkrCmKZ739eS3bzGRJagV7m73xwaKKPS2c4Wr9eAQ5JezqYw/39sBe0/1XRAkR7+JBf/8l9Yn65K2ZCYt+MUNMY4uCCC+DRyCWgHN5wyYZBskcj2GLYHGcUmyOJU8uxqh+0ZGIgHux3tisL61MEWS5GgakEmn1ictAEcdPlHHaVpTo4Nz8GlE6d4JGg5umLsPCozdY7mUO5CxyE3ZNTWdAvPraZJIGxqb5gqNDHk6405Wa1oLR0EIo5r8KzgIzbshI/TV/aSCp4FxO9cFkAs0a4Fmk4BdRcoPaV6Q8dUEyE/BYW7GeLDiUppkW1yGfHYilbXEyCwrL2So01YYq6U/hgGYgM3gApQbvDKjFBZh78TqfFsKpg9iEkXjuFa1GV/KUpwbZW5kS00RdUtVp0i5MTmXpIDl4zVj0Jzk489xgOVQTAezXinV3CuwxtNADeUVhWTQNAMifbYFUeHtjGsZDIHR+TEKfA76osMd+ga8eyu4BBXAkjEh40Y1lOaHdk9RpN4LzeGxI0juP5OZuFFMMOueuoaEtWPY2c3De2o8Y/wDKYVrBjgXqtmVJQrewHY+Mln0MTni3cxoAyZ7NnbqqQZRDdY6JU17BSV6ZhOvrqzwcM0Bg2QsqrzX/bDHADWMJRiDtTBAIKnDLPcg90PdYs8QsPrcHXh7OUKeSv0KBgBU+KQ3mW1tQNPQXV0LkIYI8DXnPu5lgKphoX2oju6CfgoFc5pU+8Ae8xX2FNhpDYBXoNiya2LaGQVq5kViJTqq30I/4wvUd+79Ipp1bUC3LhXxcKhUKvBC+nMZfbHqEoX2hWuAfgbV+FwLM36EuccMDxd4Swl1E0NqxnkEGQZAfUJIKX8CAwQKulTz51/o7RR8qcoVZs+bZiMTIuq7/TkWdENC3HNTI5a1I7vBSr3drPYTWdukiCfvYZpaCz7EWDRxNPvrNBS6GEfjSAD0x9YG7Imsr0AOGmL6a349BYMG5zfgQA1NACPNaAzW9smliiH4FaobOQFN7p4QVh7O9nrOr2kcRVIi9rEBeCCDO7C9sSi7OtfRJ33Wk8ZOORc1Is/3juuPcMav7+vIkz4lQdr3Eg3wBAxhCcng8XzOm8lLkx0fVp/Df7kDhsgPKXe8pfHn87k071BFG1LLkNzDQFbBENmRsL89wWddnuf5MkPb19tLPKWnvjl5WGh/vm+wNCxk/GPG5w+0cQObSNJ5MlYKn7A8LkcnRHDOvwdD9EKRfGkhh/kUNDBKZ6VINMJQSzBIMskXjouwd6EAisoXmzrkdwUI2tp+0B5jRS7Z6rkx51LU1ABqchR0KPLDIANbfxP99mIKn7DvKMMgHXEySE7Tw35+e0KZf7kfjjIk6EzF6rAyazBkzJThvom/1Y7CJ2zXDJs65TxdiJdQRR1Qp26gy2lBbefOvo4ksYrt08NI/+iI8atIhoUBAg4nrtY726faXfiEo6o5KqlzpNR/iR/j6VkEhYJDs7sCUrk72+kXduDKsEVjh1wipFjRX9wSDsceYpw9UKWxP4PDuDJDtTrM1k+IKNMYcDqbwLdjzfTdUE74wRsl7GI3Cp/wZOCOtsk3dmqXxnCn1we/JLEU3kZ5ZWVViLmez3g6cko7tkdK9YVoiAWYQyxz8fvQksA/4Kd90HFIWVtTwzzb2sU3O2q0tspwYjjMBi5wCFROZ4zdCPZ9P+zIyG1Msu2Yq2wZH1G30Pos8AG+3dKENrdujMcr0UNda+wuCFAuGFTggNAkCYw2mboIvp5WQzv6HMV3NePzx7GgmwVAO63DTUByW62mNd1mLEb0H/8DkOAXi0+nceAAAAAASUVORK5CYII=",Pt="/assets/discover-tweets-ab101944.jpeg",St="/assets/following-tweets-e36b4410.jpeg",Yt={class:"slide-bar-item"},Lt={class:"slide-bar-item-title slide-bar-user-link"},Mt={key:1,class:"skeleton-wrap"},Wt={key:0,class:"empty-wrap"},Kt={key:1},jt={key:2},Qt={class:"load-more-wrap"},Ht={class:"load-more-spinner"},Zt=Ce({__name:"Home",setup(H){const R="true".toLowerCase()==="true",C="true".toLowerCase()==="true",I=ze(),r=ht(),T=wt(),m=ct(),F=l(9),U=l(8),z=l([{title:"最新动态",style:1,username:"",avatar:Ot,show:!0},{title:"热门推荐",style:2,username:"",avatar:Pt,show:!1},{title:"正在关注",style:3,username:"",avatar:St,show:!1},{title:"",style:1,username:"",avatar:"",show:!0},{title:"",style:1,username:"",avatar:"",show:!0},{title:"",style:1,username:"",avatar:"",show:!0},{title:"",style:1,username:"",avatar:"",show:!0},{title:"",style:1,username:"",avatar:"",show:!0},{title:"",style:1,username:"",avatar:"",show:!0},{title:"",style:1,username:"",avatar:"",show:!0},{title:"",style:1,username:"",avatar:"",show:!0},{title:"",style:1,username:"",avatar:"",show:!0}]),q=Fe({id:0,avatar:"",username:"",nickname:"",is_admin:!1,is_friend:!1,is_following:!1,created_on:0,follows:0,followings:0,status:1}),Y=l(null),d=l("泡泡广场"),_=l(!1),D=l(!1),G=l(1),N=l(""),f=l([]),g=l(1),O=l(20),B=l(0),L=l(!1),W=l(!1),Z=l({id:0,avatar:"",username:"",nickname:"",is_admin:!1,is_friend:!0,is_following:!1,created_on:0,follows:0,followings:0,status:1}),J=n=>{Z.value=n,L.value=!0},ae=()=>{L.value=!1},ne=()=>{W.value=!0},oe=n=>{m.warning({title:"删除好友",content:"将好友 “"+n.user.nickname+"” 删除,将同时删除 点赞/收藏 列表中关于该朋友的 “好友可见” 推文",positiveText:"确定",negativeText:"取消",onPositiveClick:()=>{Me({user_id:q.id}).then(u=>{window.$message.success("操作成功"),n.user.is_friend=!1}).catch(u=>{})}})},le=()=>{W.value=!1,Y.value=null},X=n=>{Y.value=n,q.id=n.user.id,q.username=n.user.username,q.nickname=n.user.nickname,n.user.is_friend?oe(n):ne()},$=n=>{m.success({title:"提示",content:"确定"+(n.user.is_following?"取消关注":"关注")+"该用户吗?",positiveText:"确定",negativeText:"取消",onPositiveClick:()=>{n.user.is_following?Ye({user_id:n.user.id}).then(u=>{window.$message.success("操作成功"),n.user.is_following=!1}).catch(u=>{}):Le({user_id:n.user.id}).then(u=>{window.$message.success("关注成功"),n.user.is_following=!0}).catch(u=>{})}})},ee=()=>{d.value="泡泡广场",r.query&&r.query.q&&(r.query.t&&r.query.t==="tag"?d.value="#"+decodeURIComponent(r.query.q):d.value="搜索: "+decodeURIComponent(r.query.q))},ie=we(()=>R&&C&&I.state.desktopModelShow&&I.state.userInfo.id>0),M=()=>{_.value=!1,D.value=!1,f.value=[],g.value=1,B.value=0},re=(n,u)=>{switch(M(),G.value=n.style,r.query.q&&(r.query.q=null,ee()),n.style){case 1:E("newest");break;case 2:E("hots");break;case 3:r.query.q=null,E("following");break;case 21:N.value=n.username,te();break}z.value[u].show=!1},P=()=>{z.value=z.value.slice(0,3),!(!R||!C||I.state.userInfo.id===0)&&Oe({page:1,page_size:50}).then(n=>{var u=0;const e=n.list||[];let t=[];for(;u0&&(z.value=z.value.concat(t))}).catch(n=>{console.log(n)})},E=n=>{_.value=!0,Pe({query:r.query.q?decodeURIComponent(r.query.q):null,type:r.query.t,style:n,page:g.value,page_size:O.value}).then(u=>{_.value=!1,u.list.length===0&&(D.value=!0),g.value>1?f.value=f.value.concat(u.list):(f.value=u.list,window.scrollTo(0,0)),B.value=Math.ceil(u.pager.total_rows/O.value)}).catch(u=>{_.value=!1,g.value>1&&g.value--})},te=()=>{_.value=!0,Se({username:N.value,style:"post",page:g.value,page_size:O.value}).then(n=>{_.value=!1,n.list.length===0&&(D.value=!0),g.value>1?f.value=f.value.concat(n.list):(f.value=n.list||[],window.scrollTo(0,0)),B.value=Math.ceil(n.pager.total_rows/O.value)}).catch(n=>{f.value=[],g.value>1&&g.value--,_.value=!1})},ue=n=>{T.push({name:"post",query:{id:n.id}})},K=()=>{switch(G.value){case 1:E("newest");break;case 2:E("hots");break;case 3:E("following");break;case 21:r.query.q?E("search"):te();break}},ce=()=>{g.value{M(),P(),E("newest")}),Ne(()=>({path:r.path,query:r.query,refresh:I.state.refresh}),(n,u)=>{if(ee(),n.refresh!==u.refresh){M(),setTimeout(()=>{P(),K()},0);return}u.path!=="/post"&&n.path==="/"&&(M(),setTimeout(()=>{P(),K()},0))}),(n,u)=>{const e=gt,t=Gt,s=dt,o=De,c=vt,v=mt,j=xe,pe=_t,de=Ee,ve=Ve,me=Be,_e=Ue,fe=pt,ge=ft,he=Te;return p(),y("div",null,[a(e,{title:d.value},null,8,["title"]),a(fe,{class:"main-content-wrap",bordered:""},{default:i(()=>[a(s,null,{default:i(()=>[a(t,{onPostSuccess:ue})]),_:1}),ie.value?(p(),x(s,{key:0},{default:i(()=>[a(A(At),{modelValue:z.value,"onUpdate:modelValue":u[0]||(u[0]=w=>z.value=w),"wheel-blocks":U.value,"init-blocks":F.value,onClick:re,tag:"div","sub-tag":"div"},{default:i(w=>[b("div",Yt,[a(c,{value:"1",offset:[-4,48],dot:"",show:w.slotData.show},{default:i(()=>[a(o,{round:"",size:48,src:w.slotData.avatar,class:"slide-bar-item-avatar"},null,8,["src"])]),_:2},1032,["show"]),b("div",Lt,[a(v,{"line-clamp":2},{default:i(()=>[S(se(w.slotData.title),1)]),_:2},1024)])])]),_:1},8,["modelValue","wheel-blocks","init-blocks"])]),_:1})):k("",!0),_.value&&f.value.length===0?(p(),y("div",Mt,[a(j,{num:O.value},null,8,["num"])])):k("",!0),b("div",null,[f.value.length===0?(p(),y("div",Wt,[a(pe,{size:"large",description:"暂无数据"})])):k("",!0),A(I).state.desktopModelShow?(p(),y("div",Kt,[(p(!0),y(ye,null,Ae(f.value,w=>(p(),x(s,{key:w.id},{default:i(()=>[a(de,{post:w,isOwner:A(I).state.userInfo.id==w.user_id,addFollowAction:!0,onSendWhisper:J,onHandleFollowAction:$,onHandleFriendAction:X},null,8,["post","isOwner"])]),_:2},1024))),128))])):(p(),y("div",jt,[(p(!0),y(ye,null,Ae(f.value,w=>(p(),x(s,{key:w.id},{default:i(()=>[a(ve,{post:w,isOwner:A(I).state.userInfo.id==w.user_id,addFollowAction:!0,onSendWhisper:J,onHandleFollowAction:$,onHandleFriendAction:X},null,8,["post","isOwner"])]),_:2},1024))),128))]))]),a(me,{show:L.value,user:Z.value,onSuccess:ae},null,8,["show","user"]),a(_e,{show:W.value,user:q,onSuccess:le},null,8,["show","user"])]),_:1}),B.value>0?(p(),x(he,{key:0,justify:"center"},{default:i(()=>[a(A(yt),{class:"load-more",slots:{complete:"没有更多泡泡了",error:"加载出错"},onInfinite:u[1]||(u[1]=w=>ce())},{spinner:i(()=>[b("div",Qt,[D.value?k("",!0):(p(),x(ge,{key:0,size:14})),b("span",Ht,se(D.value?"没有更多泡泡了":"加载更多"),1)])]),_:1})]),_:1})):k("",!0)])}}});const Rs=We(Zt,[["__scopeId","data-v-c53a3615"]]);export{Rs as default};
diff --git a/web/dist/assets/Messages-3c6066fb.css b/web/dist/assets/Messages-3c6066fb.css
deleted file mode 100644
index 5556a0f5..00000000
--- a/web/dist/assets/Messages-3c6066fb.css
+++ /dev/null
@@ -1 +0,0 @@
-.message-item[data-v-2e510758]{padding:16px}.message-item.unread[data-v-2e510758]{background:#fcfffc}.message-item .sender-wrap[data-v-2e510758]{display:flex;align-items:center}.message-item .sender-wrap .top-tag[data-v-2e510758]{transform:scale(.75)}.message-item .sender-wrap .username[data-v-2e510758]{opacity:.75;font-size:14px}.message-item .timestamp[data-v-2e510758]{opacity:.75;font-size:12px;display:flex;align-items:center}.message-item .timestamp .timestamp-txt[data-v-2e510758]{margin-left:6px}.message-item .brief-wrap[data-v-2e510758]{margin-top:10px}.message-item .brief-wrap .brief-content[data-v-2e510758],.message-item .brief-wrap .whisper-content-wrap[data-v-2e510758],.message-item .brief-wrap .requesting-friend-wrap[data-v-2e510758]{display:flex;width:100%}.message-item .view-link[data-v-2e510758]{margin-left:8px;display:flex;align-items:center}.message-item .status-info[data-v-2e510758]{margin-left:8px;align-items:center}.dark .message-item[data-v-2e510758]{background-color:#101014bf}.dark .message-item.unread[data-v-2e510758]{background:#0f180b}.dark .message-item .brief-wrap[data-v-2e510758]{background-color:#18181c}.skeleton-item[data-v-01d2e871]{padding:12px;display:flex}.skeleton-item .content[data-v-01d2e871]{width:100%}.dark .skeleton-item[data-v-01d2e871]{background-color:#101014bf}.pagination-wrap[data-v-b40dcbaf]{padding:10px;display:flex;justify-content:center;overflow:hidden}.dark .empty-wrap[data-v-b40dcbaf],.dark .messages-wrap[data-v-b40dcbaf],.dark .pagination-wrap[data-v-b40dcbaf]{background-color:#101014bf}
diff --git a/web/dist/assets/Messages-8ba7b532.js b/web/dist/assets/Messages-8ba7b532.js
deleted file mode 100644
index b295ca73..00000000
--- a/web/dist/assets/Messages-8ba7b532.js
+++ /dev/null
@@ -1 +0,0 @@
-import{d as D,c as N,r as J,e as t,f as r,k as s,w as a,bf as o,j as f,y as C,A as _,x as m,q as I,Y as i,l as K,h as H,u as T,F as U,H as v,b as Y}from"./@vue-a481fc63.js";import{u as G}from"./vuex-44de225f.js";import{u as X,b as Z}from"./vue-router-e5a2430e.js";import{E as x,M as ee,N as se,O as ne,_ as E,P as te}from"./index-4a465428.js";import{J as L,i as ae,K as oe,N as re,O as Q,Q as ie,p as le}from"./@vicons-7a4ef312.js";import{j as d,o as ue,M as _e,l as pe,e as ce,O as de,S as me,L as ge,U as ve,F as fe,Q as ye,I as ke,G as he}from"./naive-ui-d8de3dda.js";import{_ as we}from"./whisper-7dcedd50.js";import{_ as $e}from"./main-nav.vue_vue_type_style_index_0_lang-2982e04a.js";import"./axios-4a70c6fc.js";import"./moment-2ab8298d.js";/* empty css */import"./seemly-76b7b838.js";import"./vueuc-39372edb.js";import"./evtd-b614532e.js";import"./@css-render-7124a1a5.js";import"./vooks-6d99783e.js";import"./vdirs-b0483831.js";import"./@juggle-41516555.js";import"./css-render-6a5c5852.js";import"./@emotion-8a8e73f6.js";import"./lodash-es-8412e618.js";import"./treemate-25c27bff.js";import"./async-validator-dee29e8b.js";import"./date-fns-975a2d8f.js";const be={class:"sender-wrap"},Ce={key:0,class:"nickname"},Ie={class:"username"},Me={key:1,class:"nickname"},Se={class:"username"},ze={key:2,class:"nickname"},Oe={class:"timestamp"},Fe={class:"timestamp-txt"},Ne={key:0,class:"brief-content"},qe={key:1,class:"whisper-content-wrap"},Re={key:2,class:"requesting-friend-wrap"},Ae={key:2,class:"status-info"},Pe={key:3,class:"status-info"},We="https://assets.paopao.info/public/avatar/default/admin.png",je=D({__name:"message-item",props:{message:{}},emits:["send-whisper"],setup(q,{emit:y}){const p=q,c=X(),l=G(),k=e=>()=>H(d,null,{default:()=>H(e)}),h=N(()=>[{label:"私信",key:"whisper",icon:k(le)}]),w=e=>{switch(e){case"whisper":const n=p.message;if(n.type!=99){let $=n.type==4&&n.sender_user_id==l.state.userInfo.id?n.receiver_user:n.sender_user;y("send-whisper",$)}break}},g=N(()=>p.message.type!==4||p.message.sender_user_id!==l.state.userInfo.id),M=N(()=>p.message.type==4&&p.message.receiver_user_id==l.state.userInfo.id),S=N(()=>p.message.type==4&&p.message.sender_user_id==l.state.userInfo.id),R=e=>{u(e),(e.type===1||e.type===2||e.type===3)&&(e.post&&e.post.id>0?c.push({name:"post",query:{id:e.post_id}}):window.$message.error("该动态已被删除"))},z=e=>{u(e),ee({user_id:e.sender_user_id}).then(n=>{e.reply_id=2,window.$message.success("已同意添加好友")}).catch(n=>{console.log(n)})},A=e=>{u(e),se({user_id:e.sender_user_id}).then(n=>{e.reply_id=3,window.$message.success("已拒绝添加好友")}).catch(n=>{console.log(n)})},u=e=>{p.message.receiver_user_id==l.state.userInfo.id&&e.is_read===0&&ne({id:e.id}).then(n=>{e.is_read=1}).catch(n=>{console.log(n)})};return(e,n)=>{const $=ue,O=J("router-link"),b=_e,P=pe,W=ce,j=de,B=me,F=ge;return t(),r("div",{class:K(["message-item",{unread:g.value&&e.message.is_read===0}]),onClick:n[5]||(n[5]=V=>u(e.message))},[s(F,{"content-indented":""},{avatar:a(()=>[s($,{round:"",size:30,src:e.message.type==4&&e.message.sender_user_id==o(l).state.userInfo.id?e.message.receiver_user.avatar:e.message.sender_user.id>0?e.message.sender_user.avatar:We},null,8,["src"])]),header:a(()=>[f("div",be,[e.message.type!=4&&e.message.sender_user.id>0||M.value?(t(),r("span",Ce,[s(O,{onClick:n[0]||(n[0]=C(()=>{},["stop"])),class:"username-link",to:{name:"user",query:{s:e.message.sender_user.username}}},{default:a(()=>[_(m(e.message.sender_user.nickname),1)]),_:1},8,["to"]),f("span",Ie," @"+m(e.message.sender_user.username),1)])):S.value?(t(),r("span",Me,[s(O,{onClick:n[1]||(n[1]=C(()=>{},["stop"])),class:"username-link",to:{name:"user",query:{s:e.message.receiver_user.username}}},{default:a(()=>[_(m(e.message.receiver_user.nickname),1)]),_:1},8,["to"]),f("span",Se," @"+m(e.message.receiver_user.username),1)])):(t(),r("span",ze," 系统 ")),e.message.type==4?(t(),I(b,{key:3,class:"top-tag",type:"success",size:"small",round:""},{default:a(()=>[_(" 私信 ")]),_:1})):i("",!0),S.value?(t(),I(b,{key:4,class:"top-tag",type:"info",size:"small",round:""},{icon:a(()=>[s(o(d),{component:o(L)},null,8,["component"])]),default:a(()=>[_(" 已发送 ")]),_:1})):i("",!0),e.message.type==4&&e.message.receiver_user_id==o(l).state.userInfo.id?(t(),I(b,{key:5,class:"top-tag",type:"warning",size:"small",round:""},{icon:a(()=>[s(o(d),{component:o(L)},null,8,["component"])]),default:a(()=>[_(" 已接收 ")]),_:1})):i("",!0)])]),"header-extra":a(()=>[f("span",Oe,[g.value&&e.message.is_read===0?(t(),I(P,{key:0,dot:"",processing:""})):i("",!0),f("span",Fe,m(o(x)(e.message.created_on)),1),s(j,{placement:"bottom-end",trigger:"click",size:"small",options:h.value,onSelect:w},{default:a(()=>[s(W,{quaternary:"",circle:""},{icon:a(()=>[s(o(d),null,{default:a(()=>[s(o(ae))]),_:1})]),_:1})]),_:1},8,["options"])])]),description:a(()=>[s(B,{"show-icon":!1,class:"brief-wrap",type:!g.value||e.message.is_read>0?"default":"success"},{default:a(()=>[e.message.type!=4?(t(),r("div",Ne,[_(m(e.message.brief)+" ",1),e.message.type===1||e.message.type===2||e.message.type===3?(t(),r("span",{key:0,onClick:n[2]||(n[2]=C(V=>R(e.message),["stop"])),class:"hash-link view-link"},[s(o(d),null,{default:a(()=>[s(o(oe))]),_:1}),_(" 查看详情 ")])):i("",!0)])):i("",!0),e.message.type===4?(t(),r("div",qe,m(e.message.content),1)):i("",!0),e.message.type===5?(t(),r("div",Re,[_(m(e.message.content)+" ",1),e.message.reply_id===1?(t(),r("span",{key:0,onClick:n[3]||(n[3]=C(V=>z(e.message),["stop"])),class:"hash-link view-link"},[s(o(d),null,{default:a(()=>[s(o(re))]),_:1}),_(" 同意 ")])):i("",!0),e.message.reply_id===1?(t(),r("span",{key:1,onClick:n[4]||(n[4]=C(V=>A(e.message),["stop"])),class:"hash-link view-link"},[s(o(d),null,{default:a(()=>[s(o(Q))]),_:1}),_(" 拒绝 ")])):i("",!0),e.message.reply_id===2?(t(),r("span",Ae,[s(o(d),null,{default:a(()=>[s(o(ie))]),_:1}),_(" 已同意 ")])):i("",!0),e.message.reply_id===3?(t(),r("span",Pe,[s(o(d),null,{default:a(()=>[s(o(Q))]),_:1}),_(" 已拒绝 ")])):i("",!0)])):i("",!0)]),_:1},8,["type"])]),_:1})],2)}}});const Be=E(je,[["__scopeId","data-v-2e510758"]]),Ve={class:"content"},De=D({__name:"message-skeleton",props:{num:{default:1}},setup(q){return(y,p)=>{const c=ve;return t(!0),r(U,null,T(new Array(y.num),l=>(t(),r("div",{class:"skeleton-item",key:l},[f("div",Ve,[s(c,{text:"",repeat:2}),s(c,{text:"",style:{width:"60%"}})])]))),128)}}});const Ee=E(De,[["__scopeId","data-v-01d2e871"]]),He={key:0,class:"skeleton-wrap"},Le={key:1},Qe={key:0,class:"empty-wrap"},Te={key:0,class:"pagination-wrap"},Ue=D({__name:"Messages",setup(q){const y=Z(),p=G(),c=v(!1),l=v(+y.query.p||1),k=v(10),h=v(0),w=v([]),g=v(!1),M=v({id:0,avatar:"",username:"",nickname:"",is_admin:!1,is_friend:!0,is_following:!1,created_on:0,follows:0,followings:0,status:1}),S=u=>{M.value=u,g.value=!0},R=()=>{g.value=!1},z=()=>{c.value=!0,te({page:l.value,page_size:k.value}).then(u=>{c.value=!1,w.value=u.list,h.value=Math.ceil(u.pager.total_rows/k.value)}).catch(u=>{c.value=!1})},A=u=>{l.value=u,z()};return Y(()=>{z()}),(u,e)=>{const n=$e,$=we,O=Ee,b=ke,P=Be,W=he,j=fe,B=ye;return t(),r("div",null,[s(n,{title:"消息"}),s(j,{class:"main-content-wrap messages-wrap",bordered:""},{default:a(()=>[s($,{show:g.value,user:M.value,onSuccess:R},null,8,["show","user"]),c.value?(t(),r("div",He,[s(O,{num:k.value},null,8,["num"])])):(t(),r("div",Le,[w.value.length===0?(t(),r("div",Qe,[s(b,{size:"large",description:"暂无数据"})])):i("",!0),(t(!0),r(U,null,T(w.value,F=>(t(),I(W,{key:F.id},{default:a(()=>[s(P,{message:F,onSendWhisper:S},null,8,["message"])]),_:2},1024))),128))]))]),_:1}),h.value>0?(t(),r("div",Te,[s(B,{page:l.value,"onUpdate:page":A,"page-slot":o(p).state.collapsedRight?5:8,"page-count":h.value},null,8,["page","page-slot","page-count"])])):i("",!0)])}}});const fs=E(Ue,[["__scopeId","data-v-b40dcbaf"]]);export{fs as default};
diff --git a/web/dist/assets/Messages-d1e2fa97.css b/web/dist/assets/Messages-d1e2fa97.css
new file mode 100644
index 00000000..d0edbba1
--- /dev/null
+++ b/web/dist/assets/Messages-d1e2fa97.css
@@ -0,0 +1 @@
+.message-item[data-v-282eff6a]{padding:16px}.message-item.unread[data-v-282eff6a]{background:#fcfffc}.message-item .sender-wrap[data-v-282eff6a]{display:flex;align-items:center}.message-item .sender-wrap .top-tag[data-v-282eff6a]{transform:scale(.75)}.message-item .sender-wrap .username[data-v-282eff6a]{opacity:.75;font-size:14px}.message-item .timestamp[data-v-282eff6a]{opacity:.75;font-size:12px;display:flex;align-items:center}.message-item .timestamp .timestamp-txt[data-v-282eff6a]{margin-left:6px}.message-item .brief-wrap[data-v-282eff6a]{margin-top:10px}.message-item .brief-wrap .brief-content[data-v-282eff6a],.message-item .brief-wrap .whisper-content-wrap[data-v-282eff6a],.message-item .brief-wrap .requesting-friend-wrap[data-v-282eff6a]{display:flex;width:100%}.message-item .view-link[data-v-282eff6a]{margin-left:8px;display:flex;align-items:center}.message-item .status-info[data-v-282eff6a]{margin-left:8px;align-items:center}.dark .message-item[data-v-282eff6a]{background-color:#101014bf}.dark .message-item.unread[data-v-282eff6a]{background:#0f180b}.dark .message-item .brief-wrap[data-v-282eff6a]{background-color:#18181c}.skeleton-item[data-v-01d2e871]{padding:12px;display:flex}.skeleton-item .content[data-v-01d2e871]{width:100%}.dark .skeleton-item[data-v-01d2e871]{background-color:#101014bf}.pagination-wrap[data-v-eb622a78]{padding:10px;display:flex;justify-content:center;overflow:hidden}.dark .empty-wrap[data-v-eb622a78],.dark .messages-wrap[data-v-eb622a78],.dark .pagination-wrap[data-v-eb622a78]{background-color:#101014bf}
diff --git a/web/dist/assets/Messages-fb6513c1.js b/web/dist/assets/Messages-fb6513c1.js
new file mode 100644
index 00000000..3fd00809
--- /dev/null
+++ b/web/dist/assets/Messages-fb6513c1.js
@@ -0,0 +1 @@
+import{d as U,c as N,r as K,e as t,f as r,k as n,w as o,bf as a,j as w,y as O,A as _,x as g,q as S,Y as u,l as X,h as H,u as E,F as G,H as y,b as Z}from"./@vue-a481fc63.js";import{u as J}from"./vuex-44de225f.js";import{u as x,b as ee}from"./vue-router-e5a2430e.js";import{I as se,N as ne,O as te,P as oe,u as ae,f as re,_ as j,Q as ie}from"./index-daff1b26.js";import{N as V,k as le,O as ue,Q as _e,R as Q,U as pe,r as ce,s as de,t as me}from"./@vicons-c265fba6.js";import{F as ge,j as m,o as fe,M as ve,l as ye,e as ke,P as he,T as we,O as $e,U as be,G as Ce,R as Ie,J as Me,H as Oe}from"./naive-ui-defd0b2d.js";import{_ as Se}from"./whisper-9b4eeceb.js";import{_ as ze}from"./main-nav.vue_vue_type_style_index_0_lang-93352cc4.js";import"./axios-4a70c6fc.js";import"./moment-2ab8298d.js";/* empty css */import"./seemly-76b7b838.js";import"./vueuc-39372edb.js";import"./evtd-b614532e.js";import"./@css-render-7124a1a5.js";import"./vooks-6d99783e.js";import"./vdirs-b0483831.js";import"./@juggle-41516555.js";import"./css-render-6a5c5852.js";import"./@emotion-8a8e73f6.js";import"./lodash-es-8412e618.js";import"./treemate-25c27bff.js";import"./async-validator-dee29e8b.js";import"./date-fns-975a2d8f.js";const Re={class:"sender-wrap"},Fe={key:0,class:"nickname"},Ne={class:"username"},qe={key:1,class:"nickname"},Pe={class:"username"},Te={key:2,class:"nickname"},Ae={class:"timestamp"},We={class:"timestamp-txt"},Be={key:0,class:"brief-content"},Ue={key:1,class:"whisper-content-wrap"},je={key:2,class:"requesting-friend-wrap"},De={key:2,class:"status-info"},He={key:3,class:"status-info"},Ve="https://assets.paopao.info/public/avatar/default/admin.png",Qe=U({__name:"message-item",props:{message:{}},emits:["send-whisper","reload"],setup(q,{emit:f}){const i=q,c=x(),l=J(),$=ge(),v=e=>()=>H(m,null,{default:()=>H(e)}),b=N(()=>{let e=[{label:"私信",key:"whisper",icon:v(ce)}],s=i.message.type==4&&i.message.sender_user_id==l.state.userInfo.id?i.message.receiver_user:i.message.sender_user;return l.state.userInfo.id!=s.id&&(s.is_following?e.push({label:"取消关注",key:"unfollow",icon:v(de)}):e.push({label:"关注",key:"follow",icon:v(me)})),e}),C=e=>{let s=e.type==4&&e.sender_user_id==l.state.userInfo.id?e.receiver_user:e.sender_user;$.success({title:"提示",content:"确定"+(s.is_following?"取消关注":"关注")+"该用户吗?",positiveText:"确定",negativeText:"取消",onPositiveClick:()=>{s.is_following?ae({user_id:s.id}).then(d=>{window.$message.success("操作成功"),s.is_following=!1,setTimeout(()=>{f("reload")},50)}).catch(d=>{}):re({user_id:s.id}).then(d=>{window.$message.success("关注成功"),s.is_following=!0,setTimeout(()=>{f("reload")},50)}).catch(d=>{})}})},z=e=>{switch(e){case"whisper":const s=i.message;if(s.type!=99){let d=s.type==4&&s.sender_user_id==l.state.userInfo.id?s.receiver_user:s.sender_user;f("send-whisper",d)}break;case"follow":case"unfollow":C(i.message);break}},I=N(()=>i.message.type!==4||i.message.sender_user_id!==l.state.userInfo.id),P=N(()=>i.message.type==4&&i.message.receiver_user_id==l.state.userInfo.id),k=N(()=>i.message.type==4&&i.message.sender_user_id==l.state.userInfo.id),T=e=>{h(e),(e.type===1||e.type===2||e.type===3)&&(e.post&&e.post.id>0?c.push({name:"post",query:{id:e.post_id}}):window.$message.error("该动态已被删除"))},p=e=>{h(e),ne({user_id:e.sender_user_id}).then(s=>{e.reply_id=2,window.$message.success("已同意添加好友")}).catch(s=>{console.log(s)})},D=e=>{h(e),te({user_id:e.sender_user_id}).then(s=>{e.reply_id=3,window.$message.success("已拒绝添加好友")}).catch(s=>{console.log(s)})},h=e=>{i.message.receiver_user_id==l.state.userInfo.id&&e.is_read===0&&oe({id:e.id}).then(s=>{e.is_read=1}).catch(s=>{console.log(s)})};return(e,s)=>{const d=fe,R=K("router-link"),M=ve,A=ye,W=ke,F=he,L=we,Y=$e;return t(),r("div",{class:X(["message-item",{unread:I.value&&e.message.is_read===0}]),onClick:s[5]||(s[5]=B=>h(e.message))},[n(Y,{"content-indented":""},{avatar:o(()=>[n(d,{round:"",size:30,src:e.message.type==4&&e.message.sender_user_id==a(l).state.userInfo.id?e.message.receiver_user.avatar:e.message.sender_user.id>0?e.message.sender_user.avatar:Ve},null,8,["src"])]),header:o(()=>[w("div",Re,[e.message.type!=4&&e.message.sender_user.id>0||P.value?(t(),r("span",Fe,[n(R,{onClick:s[0]||(s[0]=O(()=>{},["stop"])),class:"username-link",to:{name:"user",query:{s:e.message.sender_user.username}}},{default:o(()=>[_(g(e.message.sender_user.nickname),1)]),_:1},8,["to"]),w("span",Ne," @"+g(e.message.sender_user.username),1)])):k.value?(t(),r("span",qe,[n(R,{onClick:s[1]||(s[1]=O(()=>{},["stop"])),class:"username-link",to:{name:"user",query:{s:e.message.receiver_user.username}}},{default:o(()=>[_(g(e.message.receiver_user.nickname),1)]),_:1},8,["to"]),w("span",Pe," @"+g(e.message.receiver_user.username),1)])):(t(),r("span",Te," 系统 ")),e.message.type==4?(t(),S(M,{key:3,class:"top-tag",type:"success",size:"small",round:""},{default:o(()=>[_(" 私信 ")]),_:1})):u("",!0),k.value?(t(),S(M,{key:4,class:"top-tag",type:"info",size:"small",round:""},{icon:o(()=>[n(a(m),{component:a(V)},null,8,["component"])]),default:o(()=>[_(" 已发送 ")]),_:1})):u("",!0),e.message.type==4&&e.message.receiver_user_id==a(l).state.userInfo.id?(t(),S(M,{key:5,class:"top-tag",type:"warning",size:"small",round:""},{icon:o(()=>[n(a(m),{component:a(V)},null,8,["component"])]),default:o(()=>[_(" 已接收 ")]),_:1})):u("",!0)])]),"header-extra":o(()=>[w("span",Ae,[I.value&&e.message.is_read===0?(t(),S(A,{key:0,dot:"",processing:""})):u("",!0),w("span",We,g(a(se)(e.message.created_on)),1),n(F,{placement:"bottom-end",trigger:"click",size:"small",options:b.value,onSelect:z},{default:o(()=>[n(W,{quaternary:"",circle:""},{icon:o(()=>[n(a(m),null,{default:o(()=>[n(a(le))]),_:1})]),_:1})]),_:1},8,["options"])])]),description:o(()=>[n(L,{"show-icon":!1,class:"brief-wrap",type:!I.value||e.message.is_read>0?"default":"success"},{default:o(()=>[e.message.type!=4?(t(),r("div",Be,[_(g(e.message.brief)+" ",1),e.message.type===1||e.message.type===2||e.message.type===3?(t(),r("span",{key:0,onClick:s[2]||(s[2]=O(B=>T(e.message),["stop"])),class:"hash-link view-link"},[n(a(m),null,{default:o(()=>[n(a(ue))]),_:1}),_(" 查看详情 ")])):u("",!0)])):u("",!0),e.message.type===4?(t(),r("div",Ue,g(e.message.content),1)):u("",!0),e.message.type===5?(t(),r("div",je,[_(g(e.message.content)+" ",1),e.message.reply_id===1?(t(),r("span",{key:0,onClick:s[3]||(s[3]=O(B=>p(e.message),["stop"])),class:"hash-link view-link"},[n(a(m),null,{default:o(()=>[n(a(_e))]),_:1}),_(" 同意 ")])):u("",!0),e.message.reply_id===1?(t(),r("span",{key:1,onClick:s[4]||(s[4]=O(B=>D(e.message),["stop"])),class:"hash-link view-link"},[n(a(m),null,{default:o(()=>[n(a(Q))]),_:1}),_(" 拒绝 ")])):u("",!0),e.message.reply_id===2?(t(),r("span",De,[n(a(m),null,{default:o(()=>[n(a(pe))]),_:1}),_(" 已同意 ")])):u("",!0),e.message.reply_id===3?(t(),r("span",He,[n(a(m),null,{default:o(()=>[n(a(Q))]),_:1}),_(" 已拒绝 ")])):u("",!0)])):u("",!0)]),_:1},8,["type"])]),_:1})],2)}}});const Ee=j(Qe,[["__scopeId","data-v-282eff6a"]]),Ge={class:"content"},Je=U({__name:"message-skeleton",props:{num:{default:1}},setup(q){return(f,i)=>{const c=be;return t(!0),r(G,null,E(new Array(f.num),l=>(t(),r("div",{class:"skeleton-item",key:l},[w("div",Ge,[n(c,{text:"",repeat:2}),n(c,{text:"",style:{width:"60%"}})])]))),128)}}});const Le=j(Je,[["__scopeId","data-v-01d2e871"]]),Ye={key:0,class:"skeleton-wrap"},Ke={key:1},Xe={key:0,class:"empty-wrap"},Ze={key:0,class:"pagination-wrap"},xe=U({__name:"Messages",setup(q){const f=ee(),i=J(),c=y(!1),l=y(+f.query.p||1),$=y(10),v=y(0),b=y([]),C=y(!1),z=y({id:0,avatar:"",username:"",nickname:"",is_admin:!1,is_friend:!0,is_following:!1,created_on:0,follows:0,followings:0,status:1}),I=p=>{z.value=p,C.value=!0},P=()=>{C.value=!1},k=()=>{c.value=!0,ie({page:l.value,page_size:$.value}).then(p=>{c.value=!1,b.value=p.list,v.value=Math.ceil(p.pager.total_rows/$.value)}).catch(p=>{c.value=!1})},T=p=>{l.value=p,k()};return Z(()=>{k()}),(p,D)=>{const h=ze,e=Se,s=Le,d=Me,R=Ee,M=Oe,A=Ce,W=Ie;return t(),r("div",null,[n(h,{title:"消息"}),n(A,{class:"main-content-wrap messages-wrap",bordered:""},{default:o(()=>[n(e,{show:C.value,user:z.value,onSuccess:P},null,8,["show","user"]),c.value?(t(),r("div",Ye,[n(s,{num:$.value},null,8,["num"])])):(t(),r("div",Ke,[b.value.length===0?(t(),r("div",Xe,[n(d,{size:"large",description:"暂无数据"})])):u("",!0),(t(!0),r(G,null,E(b.value,F=>(t(),S(M,{key:F.id},{default:o(()=>[n(R,{message:F,onSendWhisper:I,onReload:k},null,8,["message"])]),_:2},1024))),128))]))]),_:1}),v.value>0?(t(),r("div",Ze,[n(W,{page:l.value,"onUpdate:page":T,"page-slot":a(i).state.collapsedRight?5:8,"page-count":v.value},null,8,["page","page-slot","page-count"])])):u("",!0)])}}});const Cs=j(xe,[["__scopeId","data-v-eb622a78"]]);export{Cs as default};
diff --git a/web/dist/assets/Post-8403b241.js b/web/dist/assets/Post-8403b241.js
deleted file mode 100644
index 77c07d1b..00000000
--- a/web/dist/assets/Post-8403b241.js
+++ /dev/null
@@ -1 +0,0 @@
-import{d as ee,H as c,r as ye,e as o,f as _,j as d,k as t,w as n,A as T,x as z,q as U,Y as u,bf as a,y as H,c as ae,al as Ve,F as pe,u as de,$ as Te,a0 as ze,b as Re,h as Ce,E as Ye}from"./@vue-a481fc63.js";import{u as le}from"./vuex-44de225f.js";import{f as me,t as Je,h as Ke,i as We,_ as ie,j as Ge,k as Qe,l as Xe,m as Ze,g as et,n as tt,o as st,p as ot,q as nt,r as at,s as lt,u as it,v as ut,w as ct,x as rt,y as _t,z as ge}from"./index-4a465428.js";import{Y as ve,V as Q}from"./IEnum-5453a777.js";import{T as Ue,e as he,f as Se,g as fe,h as Le,I as pt,i as dt,j as mt,k as vt,l as ht,m as ft,n as gt,o as yt,p as kt,q as wt,r as bt,s as $t,t as xe,F as Ie,E as ce,u as re,v as _e,w as Pe}from"./@vicons-7a4ef312.js";import{j as K,e as ue,J as Oe,H as Ct,b as xt,K as It,o as ke,L as De,v as Pt,w as Tt,x as zt,y as Rt,z as Ut,B as St,M as Lt,O as Ot,i as Dt,P as Mt,a as Me,F as At,I as Et,k as qt,G as Nt,f as Bt,g as jt}from"./naive-ui-d8de3dda.js";import{p as we,_ as Ae,a as Ft,b as Ht,c as Vt}from"./content-0e30acaf.js";import{u as Ee,b as Yt}from"./vue-router-e5a2430e.js";import{_ as Jt}from"./post-skeleton-4d2b103e.js";import{l as Kt}from"./lodash-e0b37ac3.js";import{_ as Wt}from"./whisper-7dcedd50.js";import{c as Gt}from"./copy-to-clipboard-4ef7d3eb.js";import{_ as Qt}from"./main-nav.vue_vue_type_style_index_0_lang-2982e04a.js";import{W as Xt}from"./v3-infinite-loading-2c58ec2f.js";import"./axios-4a70c6fc.js";import"./moment-2ab8298d.js";/* empty css */import"./seemly-76b7b838.js";import"./vueuc-39372edb.js";import"./evtd-b614532e.js";import"./@css-render-7124a1a5.js";import"./vooks-6d99783e.js";import"./vdirs-b0483831.js";import"./@juggle-41516555.js";import"./css-render-6a5c5852.js";import"./@emotion-8a8e73f6.js";import"./lodash-es-8412e618.js";import"./treemate-25c27bff.js";import"./async-validator-dee29e8b.js";import"./date-fns-975a2d8f.js";import"./paopao-video-player-2fe58954.js";import"./@babel-725317a4.js";import"./toggle-selection-93f4ad84.js";const Zt={class:"reply-item"},es={class:"header-wrap"},ts={class:"username"},ss={class:"reply-name"},os={class:"timestamp"},ns={class:"base-wrap"},as={class:"content"},ls={class:"reply-switch"},is={class:"time-item"},us={class:"actions"},cs={class:"upvote-count"},rs=["onClick"],_s={class:"upvote-count"},ps={key:2,class:"action-item"},ds=["onClick"],ms=ee({__name:"reply-item",props:{tweetId:{},reply:{}},emits:["focusReply","reload"],setup(E,{emit:q}){const l=E,v=le(),m=c(l.reply.is_thumbs_up==ve.YES),g=c(l.reply.is_thumbs_down==ve.YES),w=c(l.reply.thumbs_up_count),S=()=>{Je({tweet_id:l.tweetId,comment_id:l.reply.comment_id,reply_id:l.reply.id}).then(f=>{m.value=!m.value,m.value?(w.value++,g.value=!1):w.value--}).catch(f=>{console.log(f)})},r=()=>{Ke({tweet_id:l.tweetId,comment_id:l.reply.comment_id,reply_id:l.reply.id}).then(f=>{g.value=!g.value,g.value&&m.value&&(w.value--,m.value=!1)}).catch(f=>{console.log(f)})},I=()=>{q("focusReply",l.reply)},R=()=>{We({id:l.reply.id}).then(f=>{window.$message.success("删除成功"),setTimeout(()=>{q("reload")},50)}).catch(f=>{console.log(f)})};return(f,C)=>{const O=ye("router-link"),p=K,x=ue,D=Oe,b=Ct;return o(),_("div",Zt,[d("div",es,[d("div",ts,[t(O,{class:"user-link",to:{name:"user",query:{s:l.reply.user.username}}},{default:n(()=>[T(z(l.reply.user.username),1)]),_:1},8,["to"]),d("span",ss,z(l.reply.at_user_id>0?"回复":":"),1),l.reply.at_user_id>0?(o(),U(O,{key:0,class:"user-link",to:{name:"user",query:{s:l.reply.at_user.username}}},{default:n(()=>[T(z(l.reply.at_user.username),1)]),_:1},8,["to"])):u("",!0)]),d("div",os,[T(z(l.reply.ip_loc)+" ",1),a(v).state.userInfo.is_admin||a(v).state.userInfo.id===l.reply.user.id?(o(),U(D,{key:0,"negative-text":"取消","positive-text":"确认",onPositiveClick:R},{trigger:n(()=>[t(x,{quaternary:"",circle:"",size:"tiny",class:"del-btn"},{icon:n(()=>[t(p,null,{default:n(()=>[t(a(Ue))]),_:1})]),_:1})]),default:n(()=>[T(" 是否确认删除? ")]),_:1})):u("",!0)])]),d("div",ns,[d("div",as,[t(b,{"expand-trigger":"click","line-clamp":"5",tooltip:!1},{default:n(()=>[T(z(l.reply.content),1)]),_:1})]),d("div",ls,[d("span",is,z(a(me)(l.reply.created_on)),1),d("div",us,[a(v).state.userLogined?u("",!0):(o(),_("div",{key:0,class:"action-item",onClick:C[0]||(C[0]=H(()=>{},["stop"]))},[t(p,{size:"medium"},{default:n(()=>[t(a(he))]),_:1}),d("span",cs,z(w.value),1)])),a(v).state.userLogined?(o(),_("div",{key:1,class:"action-item hover",onClick:H(S,["stop"])},[t(p,{size:"medium"},{default:n(()=>[m.value?u("",!0):(o(),U(a(he),{key:0})),m.value?(o(),U(a(Se),{key:1,class:"show"})):u("",!0)]),_:1}),d("span",_s,z(w.value>0?w.value:"赞"),1)],8,rs)):u("",!0),a(v).state.userLogined?u("",!0):(o(),_("div",ps,[t(p,{size:"medium"},{default:n(()=>[t(a(fe))]),_:1})])),a(v).state.userLogined?(o(),_("div",{key:3,class:"action-item hover",onClick:H(r,["stop"])},[t(p,{size:"medium"},{default:n(()=>[g.value?u("",!0):(o(),U(a(fe),{key:0})),g.value?(o(),U(a(Le),{key:1,class:"show"})):u("",!0)]),_:1})],8,ds)):u("",!0),a(v).state.userLogined?(o(),_("span",{key:4,class:"show opacity-item reply-btn",onClick:I}," 回复 ")):u("",!0)])])])])}}});const vs=ie(ms,[["__scopeId","data-v-187a4ed3"]]),hs={class:"reply-compose-wrap"},fs={class:"reply-switch"},gs={class:"time-item"},ys={class:"actions"},ks={key:0,class:"action-item"},ws={class:"upvote-count"},bs=["onClick"],$s={class:"upvote-count"},Cs={key:2,class:"action-item"},xs=["onClick"],Is={key:0,class:"reply-input-wrap"},Ps=ee({__name:"compose-reply",props:{comment:{},atUserid:{default:0},atUsername:{default:""}},emits:["reload","reset"],setup(E,{expose:q,emit:l}){const v=E,m=le(),g=c(),w=c(!1),S=c(""),r=c(!1),I=+"300",R=c(v.comment.is_thumbs_up==ve.YES),f=c(v.comment.is_thumbs_down==ve.YES),C=c(v.comment.thumbs_up_count),O=()=>{Ge({tweet_id:v.comment.post_id,comment_id:v.comment.id}).then(b=>{R.value=!R.value,R.value?(C.value++,f.value=!1):C.value--}).catch(b=>{console.log(b)})},p=()=>{Qe({tweet_id:v.comment.post_id,comment_id:v.comment.id}).then(b=>{f.value=!f.value,f.value&&R.value&&(C.value--,R.value=!1)}).catch(b=>{console.log(b)})},x=b=>{w.value=b,b?setTimeout(()=>{var M;(M=g.value)==null||M.focus()},10):(r.value=!1,S.value="",l("reset"))},D=()=>{r.value=!0,Xe({comment_id:v.comment.id,at_user_id:v.atUserid,content:S.value}).then(b=>{x(!1),window.$message.success("评论成功"),l("reload")}).catch(b=>{r.value=!1})};return q({switchReply:x}),(b,M)=>{const s=K,y=xt,B=ue,N=It;return o(),_("div",hs,[d("div",fs,[d("span",gs,z(a(me)(b.comment.created_on)),1),d("div",ys,[a(m).state.userLogined?u("",!0):(o(),_("div",ks,[t(s,{size:"medium"},{default:n(()=>[t(a(he))]),_:1}),d("span",ws,z(C.value),1)])),a(m).state.userLogined?(o(),_("div",{key:1,class:"action-item hover",onClick:H(O,["stop"])},[t(s,{size:"medium"},{default:n(()=>[R.value?u("",!0):(o(),U(a(he),{key:0})),R.value?(o(),U(a(Se),{key:1,class:"show"})):u("",!0)]),_:1}),d("span",$s,z(C.value>0?C.value:"赞"),1)],8,bs)):u("",!0),a(m).state.userLogined?u("",!0):(o(),_("div",Cs,[t(s,{size:"medium"},{default:n(()=>[t(a(fe))]),_:1})])),a(m).state.userLogined?(o(),_("div",{key:3,class:"action-item hover",onClick:H(p,["stop"])},[t(s,{size:"medium"},{default:n(()=>[f.value?u("",!0):(o(),U(a(fe),{key:0})),f.value?(o(),U(a(Le),{key:1,class:"show"})):u("",!0)]),_:1})],8,xs)):u("",!0),a(m).state.userLogined&&!w.value?(o(),_("span",{key:4,class:"show reply-btn",onClick:M[0]||(M[0]=V=>x(!0))}," 回复 ")):u("",!0),a(m).state.userLogined&&w.value?(o(),_("span",{key:5,class:"hide reply-btn",onClick:M[1]||(M[1]=V=>x(!1))}," 取消 ")):u("",!0)])]),w.value?(o(),_("div",Is,[t(N,null,{default:n(()=>[t(y,{ref_key:"inputInstRef",ref:g,size:"small",placeholder:v.atUsername?"@"+v.atUsername:"请输入回复内容..",maxlength:a(I),value:S.value,"onUpdate:value":M[2]||(M[2]=V=>S.value=V),"show-count":"",clearable:""},null,8,["placeholder","maxlength","value"]),t(B,{type:"primary",size:"small",ghost:"",loading:r.value,onClick:D},{default:n(()=>[T(" 回复 ")]),_:1},8,["loading"])]),_:1})])):u("",!0)])}}});const Ts=ie(Ps,[["__scopeId","data-v-f9af7a93"]]),zs={class:"comment-item"},Rs={class:"nickname-wrap"},Us={class:"username-wrap"},Ss={class:"opt-wrap"},Ls={class:"timestamp"},Os=["innerHTML"],Ds={class:"reply-wrap"},Ms=ee({__name:"comment-item",props:{comment:{}},emits:["reload"],setup(E,{emit:q}){const l=E,v=le(),m=Ee(),g=c(0),w=c(""),S=c(),r=ae(()=>{let p=Object.assign({texts:[],imgs:[]},l.comment);return p.contents.map(x=>{(+x.type==1||+x.type==2)&&p.texts.push(x),+x.type==3&&p.imgs.push(x)}),p}),I=(p,x)=>{let D=p.target;if(D.dataset.detail){const b=D.dataset.detail.split(":");b.length===2&&(v.commit("refresh"),b[0]==="tag"?window.$message.warning("评论内的无效话题"):m.push({name:"user",query:{s:b[1]}}))}},R=p=>{var x,D;g.value=p.user_id,w.value=((x=p.user)==null?void 0:x.username)||"",(D=S.value)==null||D.switchReply(!0)},f=()=>{q("reload")},C=()=>{g.value=0,w.value=""},O=()=>{Ze({id:r.value.id}).then(p=>{window.$message.success("删除成功"),setTimeout(()=>{f()},50)}).catch(p=>{})};return(p,x)=>{const D=ke,b=ye("router-link"),M=K,s=ue,y=Oe,B=Ae,N=Ts,V=vs,Y=De;return o(),_("div",zs,[t(Y,{"content-indented":""},Ve({avatar:n(()=>[t(D,{round:"",size:30,src:r.value.user.avatar},null,8,["src"])]),header:n(()=>[d("span",Rs,[t(b,{onClick:x[0]||(x[0]=H(()=>{},["stop"])),class:"username-link",to:{name:"user",query:{s:r.value.user.username}}},{default:n(()=>[T(z(r.value.user.nickname),1)]),_:1},8,["to"])]),d("span",Us," @"+z(r.value.user.username),1)]),"header-extra":n(()=>[d("div",Ss,[d("span",Ls,z(r.value.ip_loc),1),a(v).state.userInfo.is_admin||a(v).state.userInfo.id===r.value.user.id?(o(),U(y,{key:0,"negative-text":"取消","positive-text":"确认",onPositiveClick:O},{trigger:n(()=>[t(s,{quaternary:"",circle:"",size:"tiny",class:"del-btn"},{icon:n(()=>[t(M,null,{default:n(()=>[t(a(Ue))]),_:1})]),_:1})]),default:n(()=>[T(" 是否确认删除? ")]),_:1})):u("",!0)])]),footer:n(()=>[r.value.imgs.length>0?(o(),U(B,{key:0,imgs:r.value.imgs},null,8,["imgs"])):u("",!0),t(N,{ref_key:"replyComposeRef",ref:S,comment:r.value,"at-userid":g.value,"at-username":w.value,onReload:f,onReset:C},null,8,["comment","at-userid","at-username"]),d("div",Ds,[(o(!0),_(pe,null,de(r.value.replies,F=>(o(),U(V,{key:F.id,reply:F,"tweet-id":r.value.post_id,onFocusReply:R,onReload:f},null,8,["reply","tweet-id"]))),128))])]),_:2},[r.value.texts.length>0?{name:"description",fn:n(()=>[(o(!0),_(pe,null,de(r.value.texts,F=>(o(),_("span",{key:F.id,class:"comment-text",onClick:x[1]||(x[1]=H(P=>I(P,r.value.id),["stop"])),innerHTML:a(we)(F.content).content},null,8,Os))),128))]),key:"0"}:void 0]),1024)])}}});const As=ie(Ms,[["__scopeId","data-v-36dac8c8"]]),Es=E=>(Te("data-v-d9073453"),E=E(),ze(),E),qs={key:0,class:"compose-wrap"},Ns={class:"compose-line"},Bs={class:"compose-user"},js={class:"compose-line compose-options"},Fs={class:"attachment"},Hs={class:"submit-wrap"},Vs={class:"attachment-list-wrap"},Ys={key:1,class:"compose-wrap"},Js=Es(()=>d("div",{class:"login-wrap"},[d("span",{class:"login-banner"}," 登录后,精彩更多")],-1)),Ks={key:0,class:"login-only-wrap"},Ws={key:1,class:"login-wrap"},Gs=ee({__name:"compose-comment",props:{lock:{default:0},postId:{default:0}},emits:["post-success"],setup(E,{emit:q}){const l=E,v=le(),m=c([]),g=c(!1),w=c(!1),S=c(!1),r=c(""),I=c(),R=c("public/image"),f=c([]),C=c([]),O=c("true".toLowerCase()==="true"),p=+"300",x="/v1/attachment",D=ae(()=>"Bearer "+localStorage.getItem("PAOPAO_TOKEN")),b=Kt.debounce(h=>{et({k:h}).then(k=>{let $=[];k.suggest.map(e=>{$.push({label:e,value:e})}),m.value=$,w.value=!1}).catch(k=>{w.value=!1})},200),M=(h,k)=>{w.value||(w.value=!0,k==="@"&&b(h))},s=h=>{h.length>p?r.value=h.substring(0,p):r.value=h},y=h=>{R.value=h},B=h=>{for(let i=0;i30&&(h[i].name=$.substring(0,18)+"..."+$.substring($.length-9)+"."+e)}f.value=h},N=async h=>{var k,$;return R.value==="public/image"&&!["image/png","image/jpg","image/jpeg","image/gif"].includes((k=h.file.file)==null?void 0:k.type)?(window.$message.warning("图片仅允许 png/jpg/gif 格式"),!1):R.value==="image"&&(($=h.file.file)==null?void 0:$.size)>10485760?(window.$message.warning("图片大小不能超过10MB"),!1):!0},V=({file:h,event:k})=>{var $;try{let e=JSON.parse(($=k.target)==null?void 0:$.response);e.code===0&&R.value==="public/image"&&C.value.push({id:h.id,content:e.data.content})}catch{window.$message.error("上传失败")}},Y=({file:h,event:k})=>{var $;try{let e=JSON.parse(($=k.target)==null?void 0:$.response);if(e.code!==0){let i=e.msg||"上传失败";e.details&&e.details.length>0&&e.details.map(A=>{i+=":"+A}),window.$message.error(i)}}catch{window.$message.error("上传失败")}},F=({file:h})=>{let k=C.value.findIndex($=>$.id===h.id);k>-1&&C.value.splice(k,1)},P=()=>{g.value=!0},L=()=>{var h;g.value=!1,(h=I.value)==null||h.clear(),f.value=[],r.value="",C.value=[]},te=()=>{if(r.value.trim().length===0){window.$message.warning("请输入内容哦");return}let{users:h}=we(r.value);const k=[];let $=100;k.push({content:r.value,type:2,sort:$}),C.value.map(e=>{$++,k.push({content:e.content,type:3,sort:$})}),S.value=!0,tt({contents:k,post_id:l.postId,users:Array.from(new Set(h))}).then(e=>{window.$message.success("发布成功"),S.value=!1,q("post-success"),L()}).catch(e=>{S.value=!1})},W=h=>{v.commit("triggerAuth",!0),v.commit("triggerAuthKey",h)};return(h,k)=>{const $=ke,e=Pt,i=K,A=ue,se=Tt,G=zt,oe=Rt,ne=Ut,J=St;return o(),_("div",null,[a(v).state.userInfo.id>0?(o(),_("div",qs,[d("div",Ns,[d("div",Bs,[t($,{round:"",size:30,src:a(v).state.userInfo.avatar},null,8,["src"])]),t(e,{type:"textarea",size:"large",autosize:"",bordered:!1,options:m.value,prefix:["@"],loading:w.value,value:r.value,disabled:l.lock===1,"onUpdate:value":s,onSearch:M,onFocus:P,placeholder:l.lock===1?"泡泡已被锁定,回复功能已关闭":"快来评论两句吧..."},null,8,["options","loading","value","disabled","placeholder"])]),g.value?(o(),U(J,{key:0,ref_key:"uploadRef",ref:I,abstract:"","list-type":"image",multiple:!0,max:9,action:x,headers:{Authorization:D.value},data:{type:R.value},"file-list":f.value,onBeforeUpload:N,onFinish:V,onError:Y,onRemove:F,"onUpdate:fileList":B},{default:n(()=>[d("div",js,[d("div",Fs,[t(se,{abstract:""},{default:n(({handleClick:Z})=>[t(A,{disabled:f.value.length>0&&R.value==="public/video"||f.value.length===9,onClick:()=>{y("public/image"),Z()},quaternary:"",circle:"",type:"primary"},{icon:n(()=>[t(i,{size:"20",color:"var(--primary-color)"},{default:n(()=>[t(a(pt))]),_:1})]),_:2},1032,["disabled","onClick"])]),_:1}),t(oe,{trigger:"hover",placement:"bottom"},{trigger:n(()=>[t(G,{class:"text-statistic",type:"circle","show-indicator":!1,status:"success","stroke-width":10,percentage:r.value.length/a(p)*100},null,8,["percentage"])]),default:n(()=>[T(" "+z(r.value.length)+" / "+z(a(p)),1)]),_:1})]),d("div",Hs,[t(A,{quaternary:"",round:"",type:"tertiary",class:"cancel-btn",size:"small",onClick:L},{default:n(()=>[T(" 取消 ")]),_:1}),t(A,{loading:S.value,onClick:te,type:"primary",secondary:"",size:"small",round:""},{default:n(()=>[T(" 发布 ")]),_:1},8,["loading"])])]),d("div",Vs,[t(ne)])]),_:1},8,["headers","data","file-list"])):u("",!0)])):(o(),_("div",Ys,[Js,O.value?u("",!0):(o(),_("div",Ks,[t(A,{strong:"",secondary:"",round:"",type:"primary",onClick:k[0]||(k[0]=Z=>W("signin"))},{default:n(()=>[T(" 登录 ")]),_:1})])),O.value?(o(),_("div",Ws,[t(A,{strong:"",secondary:"",round:"",type:"primary",onClick:k[1]||(k[1]=Z=>W("signin"))},{default:n(()=>[T(" 登录 ")]),_:1}),t(A,{strong:"",secondary:"",round:"",type:"info",onClick:k[2]||(k[2]=Z=>W("signup"))},{default:n(()=>[T(" 注册 ")]),_:1})])):u("",!0)]))])}}});const Qs=ie(Gs,[["__scopeId","data-v-d9073453"]]),Xs={class:"username-wrap"},Zs={class:"options"},eo={key:0},to=["innerHTML"],so={class:"timestamp"},oo={key:0},no={key:1},ao={class:"opts-wrap"},lo=["onClick"],io={class:"opt-item"},uo=["onClick"],co=["onClick"],ro=ee({__name:"post-detail",props:{post:{}},emits:["reload"],setup(E,{emit:q}){const l=E,v="true".toLowerCase()==="true",m=le(),g=Ee(),w=c(!1),S=c(!1),r=c(!1),I=c(!1),R=c(!1),f=c(!1),C=c(!1),O=c(!1),p=c(Q.PUBLIC),x=c(!1),D=c({id:0,avatar:"",username:"",nickname:"",is_admin:!1,is_friend:!0,is_following:!1,created_on:0,follows:0,followings:0,status:1}),b=e=>{D.value=e,x.value=!0},M=()=>{x.value=!1},s=ae({get:()=>{let e=Object.assign({texts:[],imgs:[],videos:[],links:[],attachments:[],charge_attachments:[]},l.post);return e.contents.map(i=>{(+i.type==1||+i.type==2)&&e.texts.push(i),+i.type==3&&e.imgs.push(i),+i.type==4&&e.videos.push(i),+i.type==6&&e.links.push(i),+i.type==7&&e.attachments.push(i),+i.type==8&&e.charge_attachments.push(i)}),e},set:e=>{l.post.upvote_count=e.upvote_count,l.post.comment_count=e.comment_count,l.post.collection_count=e.collection_count,l.post.is_essence=e.is_essence}}),y=e=>()=>Ce(K,null,{default:()=>Ce(e)}),B=ae(()=>{var A;let e=[];if(!m.state.userInfo.is_admin&&m.state.userInfo.id!=l.post.user.id)return e.push({label:"私信",key:"whisper",icon:y(kt)}),e;e.push({label:"删除",key:"delete",icon:y(wt)}),s.value.is_lock===0?e.push({label:"锁定",key:"lock",icon:y(bt)}):e.push({label:"解锁",key:"unlock",icon:y($t)}),m.state.userInfo.is_admin&&(s.value.is_top===0?e.push({label:"置顶",key:"stick",icon:y(xe)}):e.push({label:"取消置顶",key:"unstick",icon:y(xe)})),s.value.is_essence===0?e.push({label:"设为亮点",key:"highlight",icon:y(Ie)}):e.push({label:"取消亮点",key:"unhighlight",icon:y(Ie)});let i;return s.value.visibility===Q.PUBLIC?i={label:"公开",key:"vpublic",icon:y(ce),children:[{label:"私密",key:"vprivate",icon:y(re)},{label:"关注可见",key:"vfollowing",icon:y(_e)}]}:s.value.visibility===Q.PRIVATE?i={label:"私密",key:"vprivate",icon:y(re),children:[{label:"公开",key:"vpublic",icon:y(ce)},{label:"关注可见",key:"vfollowing",icon:y(_e)}]}:v&&s.value.visibility===Q.FRIEND?i={label:"好友可见",key:"vfriend",icon:y(Pe),children:[{label:"公开",key:"vpublic",icon:y(ce)},{label:"私密",key:"vprivate",icon:y(re)},{label:"关注可见",key:"vfollowing",icon:y(_e)}]}:i={label:"关注可见",key:"vfollowing",icon:y(_e),children:[{label:"公开",key:"vpublic",icon:y(ce)},{label:"私密",key:"vprivate",icon:y(re)}]},v&&s.value.visibility!==Q.FRIEND&&((A=i.children)==null||A.push({label:"好友可见",key:"vfriend",icon:y(Pe)})),e.push(i),e}),N=e=>{g.push({name:"post",query:{id:e}})},V=(e,i)=>{if(e.target.dataset.detail){const A=e.target.dataset.detail.split(":");if(A.length===2){m.commit("refresh"),A[0]==="tag"?g.push({name:"home",query:{q:A[1],t:"tag"}}):g.push({name:"user",query:{s:A[1]}});return}}N(i)},Y=e=>{switch(e){case"whisper":b(l.post.user);break;case"delete":r.value=!0;break;case"lock":case"unlock":I.value=!0;break;case"stick":case"unstick":R.value=!0;break;case"highlight":case"unhighlight":f.value=!0;break;case"vpublic":p.value=0,C.value=!0;break;case"vprivate":p.value=1,C.value=!0;break;case"vfriend":p.value=2,C.value=!0;break;case"vfollowing":p.value=3,C.value=!0;break}},F=()=>{nt({id:s.value.id}).then(e=>{window.$message.success("删除成功"),g.replace("/"),setTimeout(()=>{m.commit("refresh")},50)}).catch(e=>{O.value=!1})},P=()=>{at({id:s.value.id}).then(e=>{q("reload"),e.lock_status===1?window.$message.success("锁定成功"):window.$message.success("解锁成功")}).catch(e=>{O.value=!1})},L=()=>{lt({id:s.value.id}).then(e=>{q("reload"),e.top_status===1?window.$message.success("置顶成功"):window.$message.success("取消置顶成功")}).catch(e=>{O.value=!1})},te=()=>{it({id:s.value.id}).then(e=>{s.value={...s.value,is_essence:e.highlight_status},e.highlight_status===1?window.$message.success("设为亮点成功"):window.$message.success("取消亮点成功")}).catch(e=>{O.value=!1})},W=()=>{ut({id:s.value.id,visibility:p.value}).then(e=>{q("reload"),window.$message.success("修改可见性成功")}).catch(e=>{O.value=!1})},h=()=>{ct({id:s.value.id}).then(e=>{w.value=e.status,e.status?s.value={...s.value,upvote_count:s.value.upvote_count+1}:s.value={...s.value,upvote_count:s.value.upvote_count-1}}).catch(e=>{console.log(e)})},k=()=>{rt({id:s.value.id}).then(e=>{S.value=e.status,e.status?s.value={...s.value,collection_count:s.value.collection_count+1}:s.value={...s.value,collection_count:s.value.collection_count-1}}).catch(e=>{console.log(e)})},$=()=>{Gt(`${window.location.origin}/#/post?id=${s.value.id}&share=copy_link&t=${new Date().getTime()}`),window.$message.success("链接已复制到剪贴板")};return Re(()=>{m.state.userInfo.id>0&&(st({id:s.value.id}).then(e=>{w.value=e.status}).catch(e=>{console.log(e)}),ot({id:s.value.id}).then(e=>{S.value=e.status}).catch(e=>{console.log(e)}))}),(e,i)=>{const A=ke,se=ye("router-link"),G=Lt,oe=ue,ne=Ot,J=Dt,Z=Wt,be=Ft,qe=Ae,Ne=Ht,Be=Vt,$e=Mt,je=Me,Fe=De;return o(),_("div",{class:"detail-item",onClick:i[7]||(i[7]=j=>N(s.value.id))},[t(Fe,null,{avatar:n(()=>[t(A,{round:"",size:30,src:s.value.user.avatar},null,8,["src"])]),header:n(()=>[t(se,{onClick:i[0]||(i[0]=H(()=>{},["stop"])),class:"username-link",to:{name:"user",query:{s:s.value.user.username}}},{default:n(()=>[T(z(s.value.user.nickname),1)]),_:1},8,["to"]),d("span",Xs," @"+z(s.value.user.username),1),s.value.is_top?(o(),U(G,{key:0,class:"top-tag",type:"warning",size:"small",round:""},{default:n(()=>[T(" 置顶 ")]),_:1})):u("",!0),s.value.visibility==a(Q).PRIVATE?(o(),U(G,{key:1,class:"top-tag",type:"error",size:"small",round:""},{default:n(()=>[T(" 私密 ")]),_:1})):u("",!0),s.value.visibility==a(Q).FRIEND?(o(),U(G,{key:2,class:"top-tag",type:"info",size:"small",round:""},{default:n(()=>[T(" 好友可见 ")]),_:1})):u("",!0)]),"header-extra":n(()=>[d("div",Zs,[t(ne,{placement:"bottom-end",trigger:"click",size:"small",options:B.value,onSelect:Y},{default:n(()=>[t(oe,{quaternary:"",circle:""},{icon:n(()=>[t(a(K),null,{default:n(()=>[t(a(dt))]),_:1})]),_:1})]),_:1},8,["options"])]),t(J,{show:r.value,"onUpdate:show":i[1]||(i[1]=j=>r.value=j),"mask-closable":!1,preset:"dialog",title:"提示",content:"确定删除该泡泡动态吗?","positive-text":"确认","negative-text":"取消",onPositiveClick:F},null,8,["show"]),t(J,{show:I.value,"onUpdate:show":i[2]||(i[2]=j=>I.value=j),"mask-closable":!1,preset:"dialog",title:"提示",content:"确定"+(s.value.is_lock?"解锁":"锁定")+"该泡泡动态吗?","positive-text":"确认","negative-text":"取消",onPositiveClick:P},null,8,["show","content"]),t(J,{show:R.value,"onUpdate:show":i[3]||(i[3]=j=>R.value=j),"mask-closable":!1,preset:"dialog",title:"提示",content:"确定"+(s.value.is_top?"取消置顶":"置顶")+"该泡泡动态吗?","positive-text":"确认","negative-text":"取消",onPositiveClick:L},null,8,["show","content"]),t(J,{show:f.value,"onUpdate:show":i[4]||(i[4]=j=>f.value=j),"mask-closable":!1,preset:"dialog",title:"提示",content:"确定将该泡泡动态"+(s.value.is_essence?"取消亮点":"设为亮点")+"吗?","positive-text":"确认","negative-text":"取消",onPositiveClick:te},null,8,["show","content"]),t(J,{show:C.value,"onUpdate:show":i[5]||(i[5]=j=>C.value=j),"mask-closable":!1,preset:"dialog",title:"提示",content:"确定将该泡泡动态可见度修改为"+(p.value==0?"公开":p.value==1?"私密":p.value==2?"好友可见":"关注可见")+"吗?","positive-text":"确认","negative-text":"取消",onPositiveClick:W},null,8,["show","content"]),t(Z,{show:x.value,user:D.value,onSuccess:M},null,8,["show","user"])]),footer:n(()=>[t(be,{attachments:s.value.attachments},null,8,["attachments"]),t(be,{attachments:s.value.charge_attachments,price:s.value.attachment_price},null,8,["attachments","price"]),t(qe,{imgs:s.value.imgs},null,8,["imgs"]),t(Ne,{videos:s.value.videos,full:!0},null,8,["videos"]),t(Be,{links:s.value.links},null,8,["links"]),d("div",so,[T(" 发布于 "+z(a(me)(s.value.created_on))+" ",1),s.value.ip_loc?(o(),_("span",oo,[t($e,{vertical:""}),T(" "+z(s.value.ip_loc),1)])):u("",!0),!a(m).state.collapsedLeft&&s.value.created_on!=s.value.latest_replied_on?(o(),_("span",no,[t($e,{vertical:""}),T(" 最后回复 "+z(a(me)(s.value.latest_replied_on)),1)])):u("",!0)])]),action:n(()=>[d("div",ao,[t(je,{justify:"space-between"},{default:n(()=>[d("div",{class:"opt-item hover",onClick:H(h,["stop"])},[t(a(K),{size:"20",class:"opt-item-icon"},{default:n(()=>[w.value?u("",!0):(o(),U(a(mt),{key:0})),w.value?(o(),U(a(vt),{key:1,color:"red"})):u("",!0)]),_:1}),T(" "+z(s.value.upvote_count),1)],8,lo),d("div",io,[t(a(K),{size:"20",class:"opt-item-icon"},{default:n(()=>[t(a(ht))]),_:1}),T(" "+z(s.value.comment_count),1)]),d("div",{class:"opt-item hover",onClick:H(k,["stop"])},[t(a(K),{size:"20",class:"opt-item-icon"},{default:n(()=>[S.value?u("",!0):(o(),U(a(ft),{key:0})),S.value?(o(),U(a(gt),{key:1,color:"#ff7600"})):u("",!0)]),_:1}),T(" "+z(s.value.collection_count),1)],8,uo),d("div",{class:"opt-item hover",onClick:H($,["stop"])},[t(a(K),{size:"20",class:"opt-item-icon"},{default:n(()=>[t(a(yt))]),_:1}),T(" "+z(s.value.share_count),1)],8,co)]),_:1})])]),default:n(()=>[s.value.texts.length>0?(o(),_("div",eo,[(o(!0),_(pe,null,de(s.value.texts,j=>(o(),_("span",{key:j.id,class:"post-text",onClick:i[6]||(i[6]=H(He=>V(He,s.value.id),["stop"])),innerHTML:a(we)(j.content).content},null,8,to))),128))])):u("",!0)]),_:1})])}}});const _o=E=>(Te("data-v-a8d601f1"),E=E(),ze(),E),po={key:0,class:"detail-wrap"},mo={key:1,class:"empty-wrap"},vo={key:0,class:"comment-opts-wrap"},ho=_o(()=>d("span",{class:"comment-title-item"},"评论",-1)),fo={key:2},go={key:0,class:"skeleton-wrap"},yo={key:1},ko={key:0,class:"empty-wrap"},wo={key:0,class:"load-more-spinner"},bo={key:1,class:"load-more-spinner"},$o={key:2,class:"load-more-spinner"},Co={key:3,class:"load-more-spinner"},xo={key:4,class:"load-more-spinner"},Io={key:5,class:"load-more-spinner"},X=20,Po=ee({__name:"Post",setup(E){const q=Yt(),l=c({}),v=c(!1),m=c(!1),g=c([]),w=ae(()=>+q.query.id),S=c("default"),r=c(!0);let I={loading(){},loaded(){},complete(){},error(){}};const R=P=>{S.value=P,P==="default"&&(r.value=!0),Y(I)},f=()=>{l.value={id:0},v.value=!0,_t({id:w.value}).then(P=>{v.value=!1,l.value=P,Y(I)}).catch(P=>{v.value=!1})};let C=1;const O=c(!1),p=c([]),x=P=>{O.value||ge({id:l.value.id,style:"default",page:C,page_size:X}).then(L=>{P!==null&&(I=P),L.list.length0&&(C===1?p.value=L.list:p.value.push(...L.list),g.value=p.value),I.loaded(),m.value=!1}).catch(L=>{m.value=!1,I.error()})};let D=1,b=c(!1);const M=c([]),s=P=>{b.value||ge({id:l.value.id,style:"hots",page:D,page_size:X}).then(L=>{P!==null&&(I=P),L.list.length0&&(D===1?M.value=L.list:M.value.push(...L.list),g.value=M.value),I.loaded(),m.value=!1}).catch(L=>{m.value=!1,I.error()})};let y=1,B=c(!1);const N=c([]),V=P=>{B.value||ge({id:l.value.id,style:"newest",page:y,page_size:X}).then(L=>{P!==null&&(I=P),L.list.length0&&(y===1?N.value=L.list:N.value.push(...L.list),g.value=N.value),I.loaded(),m.value=!1}).catch(L=>{m.value=!1,I.error()})},Y=P=>{w.value<1||(g.value.length===0&&(m.value=!0),S.value==="default"?(g.value=p.value,x(P)):S.value==="hots"?(g.value=M.value,s(P)):(g.value=N.value,V(P)),m.value=!1)},F=()=>{C=1,O.value=!1,p.value=[],D=1,b.value=!1,M.value=[],y=1,B.value=!1,N.value=[],Y(I)};return Re(()=>{f()}),Ye(w,()=>{w.value>0&&q.name==="post"&&f()}),(P,L)=>{const te=Qt,W=ro,h=Et,k=qt,$=Nt,e=Bt,i=jt,A=Qs,se=Jt,G=As,oe=Me,ne=At;return o(),_("div",null,[t(te,{title:"泡泡详情",back:!0}),t(ne,{class:"main-content-wrap",bordered:""},{default:n(()=>[t($,null,{default:n(()=>[t(k,{show:v.value},{default:n(()=>[l.value.id>1?(o(),_("div",po,[t(W,{post:l.value,onReload:f},null,8,["post"])])):(o(),_("div",mo,[t(h,{size:"large",description:"暂无数据"})]))]),_:1},8,["show"])]),_:1}),l.value.id>0?(o(),_("div",vo,[t(i,{type:"bar","justify-content":"end",size:"small","tab-style":"margin-left: -24px;",animated:"","onUpdate:value":R},{prefix:n(()=>[ho]),default:n(()=>[t(e,{name:"default",tab:"推荐"}),t(e,{name:"hots",tab:"热门"}),t(e,{name:"newest",tab:"最新"})]),_:1})])):u("",!0),l.value.id>0?(o(),U($,{key:1},{default:n(()=>[t(A,{lock:l.value.is_lock,"post-id":l.value.id,onPostSuccess:F},null,8,["lock","post-id"])]),_:1})):u("",!0),l.value.id>0?(o(),_("div",fo,[m.value?(o(),_("div",go,[t(se,{num:5})])):(o(),_("div",yo,[g.value.length===0?(o(),_("div",ko,[t(h,{size:"large",description:"暂无评论,快来抢沙发"})])):u("",!0),(o(!0),_(pe,null,de(g.value,J=>(o(),U($,{key:J.id},{default:n(()=>[t(G,{comment:J,onReload:F},null,8,["comment"])]),_:2},1024))),128))]))])):u("",!0),g.value.length>=X?(o(),U(oe,{key:3,justify:"center"},{default:n(()=>[t(a(Xt),{class:"load-more",slots:{complete:"没有更多数据了",error:"加载出错"},onInfinite:Y},{spinner:n(()=>[r.value&&O.value?(o(),_("span",wo)):u("",!0),!r.value&&a(b)?(o(),_("span",bo)):u("",!0),!r.value&&a(B)?(o(),_("span",$o)):u("",!0),r.value&&!O.value?(o(),_("span",Co,"加载评论")):u("",!0),!r.value&&!a(b)?(o(),_("span",xo,"加载评论")):u("",!0),!r.value&&!a(B)?(o(),_("span",Io,"加载评论")):u("",!0)]),_:1})]),_:1})):u("",!0)]),_:1})])}}});const un=ie(Po,[["__scopeId","data-v-a8d601f1"]]);export{un as default};
diff --git a/web/dist/assets/Post-b0df23cb.js b/web/dist/assets/Post-b0df23cb.js
new file mode 100644
index 00000000..e8eb6f91
--- /dev/null
+++ b/web/dist/assets/Post-b0df23cb.js
@@ -0,0 +1 @@
+import{d as ne,H as r,r as ke,e as o,f as _,j as p,k as t,w as n,A as P,x as R,q as I,Y as u,bf as a,y as V,c as ue,al as Je,F as me,u as ve,$ as Ue,a0 as ze,b as Re,h as xe,E as Ke}from"./@vue-a481fc63.js";import{u as ce}from"./vuex-44de225f.js";import{i as he,t as Ge,j as Qe,k as Xe,_ as re,l as Ze,m as et,n as tt,o as st,p as ot,g as nt,q as at,r as lt,s as it,v as ut,w as ct,x as rt,y as _t,z as pt,A as dt,B as mt,u as vt,f as ht,C as ft,D as ye}from"./index-daff1b26.js";import{Y as te,V as Z}from"./IEnum-5453a777.js";import{T as Se,e as fe,f as Oe,g as ge,h as Le,i as gt,j as yt,I as kt,k as wt,l as bt,m as $t,n as Ct,o as xt,p as It,q as Tt,r as Pt,s as Ut,t as ie,u as zt,v as Rt,w as St,x as Ie,F as Te,E as pe,y as de,z as Pe}from"./@vicons-c265fba6.js";import{j as J,e as _e,K as Ae,I as Ot,b as Lt,L as At,o as we,M as De,O as Me,v as Dt,w as Mt,x as Et,y as Nt,z as qt,B as Bt,F as Ht,P as Ft,i as jt,Q as Vt,a as Ee,G as Yt,J as Wt,k as Jt,H as Kt,f as Gt,g as Qt}from"./naive-ui-defd0b2d.js";import{p as be,_ as Ne,a as Xt,b as Zt,c as es}from"./content-64a02a2f.js";import{u as qe,b as ts}from"./vue-router-e5a2430e.js";import{_ as ss}from"./post-skeleton-8434d30b.js";import{l as os}from"./lodash-e0b37ac3.js";import{_ as ns}from"./whisper-9b4eeceb.js";import{c as as}from"./copy-to-clipboard-4ef7d3eb.js";import{_ as ls}from"./main-nav.vue_vue_type_style_index_0_lang-93352cc4.js";import{W as is}from"./v3-infinite-loading-2c58ec2f.js";import"./axios-4a70c6fc.js";import"./moment-2ab8298d.js";/* empty css */import"./seemly-76b7b838.js";import"./vueuc-39372edb.js";import"./evtd-b614532e.js";import"./@css-render-7124a1a5.js";import"./vooks-6d99783e.js";import"./vdirs-b0483831.js";import"./@juggle-41516555.js";import"./css-render-6a5c5852.js";import"./@emotion-8a8e73f6.js";import"./lodash-es-8412e618.js";import"./treemate-25c27bff.js";import"./async-validator-dee29e8b.js";import"./date-fns-975a2d8f.js";import"./paopao-video-player-2fe58954.js";import"./@babel-725317a4.js";import"./toggle-selection-93f4ad84.js";const us={class:"reply-item"},cs={class:"header-wrap"},rs={class:"username"},_s={class:"reply-name"},ps={class:"timestamp"},ds={class:"base-wrap"},ms={class:"content"},vs={class:"reply-switch"},hs={class:"time-item"},fs={class:"actions"},gs={class:"upvote-count"},ys=["onClick"],ks={class:"upvote-count"},ws={key:2,class:"action-item"},bs=["onClick"],$s=ne({__name:"reply-item",props:{tweetId:{},reply:{}},emits:["focusReply","reload"],setup(E,{emit:N}){const l=E,d=ce(),m=r(l.reply.is_thumbs_up==te.YES),y=r(l.reply.is_thumbs_down==te.YES),x=r(l.reply.thumbs_up_count),D=()=>{Ge({tweet_id:l.tweetId,comment_id:l.reply.comment_id,reply_id:l.reply.id}).then(f=>{m.value=!m.value,m.value?(x.value++,y.value=!1):x.value--}).catch(f=>{console.log(f)})},i=()=>{Qe({tweet_id:l.tweetId,comment_id:l.reply.comment_id,reply_id:l.reply.id}).then(f=>{y.value=!y.value,y.value&&m.value&&(x.value--,m.value=!1)}).catch(f=>{console.log(f)})},S=()=>{N("focusReply",l.reply)},A=()=>{Xe({id:l.reply.id}).then(f=>{window.$message.success("删除成功"),setTimeout(()=>{N("reload")},50)}).catch(f=>{console.log(f)})};return(f,U)=>{const M=ke("router-link"),z=J,h=_e,$=Ae,k=Ot;return o(),_("div",us,[p("div",cs,[p("div",rs,[t(M,{class:"user-link",to:{name:"user",query:{s:l.reply.user.username}}},{default:n(()=>[P(R(l.reply.user.username),1)]),_:1},8,["to"]),p("span",_s,R(l.reply.at_user_id>0?"回复":":"),1),l.reply.at_user_id>0?(o(),I(M,{key:0,class:"user-link",to:{name:"user",query:{s:l.reply.at_user.username}}},{default:n(()=>[P(R(l.reply.at_user.username),1)]),_:1},8,["to"])):u("",!0)]),p("div",ps,[P(R(l.reply.ip_loc)+" ",1),a(d).state.userInfo.is_admin||a(d).state.userInfo.id===l.reply.user.id?(o(),I($,{key:0,"negative-text":"取消","positive-text":"确认",onPositiveClick:A},{trigger:n(()=>[t(h,{quaternary:"",circle:"",size:"tiny",class:"del-btn"},{icon:n(()=>[t(z,null,{default:n(()=>[t(a(Se))]),_:1})]),_:1})]),default:n(()=>[P(" 是否删除这条回复? ")]),_:1})):u("",!0)])]),p("div",ds,[p("div",ms,[t(k,{"expand-trigger":"click","line-clamp":"5",tooltip:!1},{default:n(()=>[P(R(l.reply.content),1)]),_:1})]),p("div",vs,[p("span",hs,R(a(he)(l.reply.created_on)),1),p("div",fs,[a(d).state.userLogined?u("",!0):(o(),_("div",{key:0,class:"action-item",onClick:U[0]||(U[0]=V(()=>{},["stop"]))},[t(z,{size:"medium"},{default:n(()=>[t(a(fe))]),_:1}),p("span",gs,R(x.value),1)])),a(d).state.userLogined?(o(),_("div",{key:1,class:"action-item hover",onClick:V(D,["stop"])},[t(z,{size:"medium"},{default:n(()=>[m.value?u("",!0):(o(),I(a(fe),{key:0})),m.value?(o(),I(a(Oe),{key:1,class:"show"})):u("",!0)]),_:1}),p("span",ks,R(x.value>0?x.value:"赞"),1)],8,ys)):u("",!0),a(d).state.userLogined?u("",!0):(o(),_("div",ws,[t(z,{size:"medium"},{default:n(()=>[t(a(ge))]),_:1})])),a(d).state.userLogined?(o(),_("div",{key:3,class:"action-item hover",onClick:V(i,["stop"])},[t(z,{size:"medium"},{default:n(()=>[y.value?u("",!0):(o(),I(a(ge),{key:0})),y.value?(o(),I(a(Le),{key:1,class:"show"})):u("",!0)]),_:1})],8,bs)):u("",!0),a(d).state.userLogined?(o(),_("span",{key:4,class:"show opacity-item reply-btn",onClick:S}," 回复 ")):u("",!0)])])])])}}});const Cs=re($s,[["__scopeId","data-v-eccdbbd8"]]),xs={class:"reply-compose-wrap"},Is={class:"reply-switch"},Ts={class:"time-item"},Ps={class:"actions"},Us={key:0,class:"action-item"},zs={class:"upvote-count"},Rs=["onClick"],Ss={class:"upvote-count"},Os={key:2,class:"action-item"},Ls=["onClick"],As={key:0,class:"reply-input-wrap"},Ds=ne({__name:"compose-reply",props:{comment:{},atUserid:{default:0},atUsername:{default:""}},emits:["reload","reset"],setup(E,{expose:N,emit:l}){const d=E,m=ce(),y=r(),x=r(!1),D=r(""),i=r(!1),S=+"300",A=r(d.comment.is_thumbs_up==te.YES),f=r(d.comment.is_thumbs_down==te.YES),U=r(d.comment.thumbs_up_count),M=()=>{Ze({tweet_id:d.comment.post_id,comment_id:d.comment.id}).then(k=>{A.value=!A.value,A.value?(U.value++,f.value=!1):U.value--}).catch(k=>{console.log(k)})},z=()=>{et({tweet_id:d.comment.post_id,comment_id:d.comment.id}).then(k=>{f.value=!f.value,f.value&&A.value&&(U.value--,A.value=!1)}).catch(k=>{console.log(k)})},h=k=>{x.value=k,k?setTimeout(()=>{var O;(O=y.value)==null||O.focus()},10):(i.value=!1,D.value="",l("reset"))},$=()=>{i.value=!0,tt({comment_id:d.comment.id,at_user_id:d.atUserid,content:D.value}).then(k=>{h(!1),window.$message.success("评论成功"),l("reload")}).catch(k=>{i.value=!1})};return N({switchReply:h}),(k,O)=>{const j=J,s=Lt,v=_e,q=At;return o(),_("div",xs,[p("div",Is,[p("span",Ts,R(a(he)(k.comment.created_on)),1),p("div",Ps,[a(m).state.userLogined?u("",!0):(o(),_("div",Us,[t(j,{size:"medium"},{default:n(()=>[t(a(fe))]),_:1}),p("span",zs,R(U.value),1)])),a(m).state.userLogined?(o(),_("div",{key:1,class:"action-item hover",onClick:V(M,["stop"])},[t(j,{size:"medium"},{default:n(()=>[A.value?u("",!0):(o(),I(a(fe),{key:0})),A.value?(o(),I(a(Oe),{key:1,class:"show"})):u("",!0)]),_:1}),p("span",Ss,R(U.value>0?U.value:"赞"),1)],8,Rs)):u("",!0),a(m).state.userLogined?u("",!0):(o(),_("div",Os,[t(j,{size:"medium"},{default:n(()=>[t(a(ge))]),_:1})])),a(m).state.userLogined?(o(),_("div",{key:3,class:"action-item hover",onClick:V(z,["stop"])},[t(j,{size:"medium"},{default:n(()=>[f.value?u("",!0):(o(),I(a(ge),{key:0})),f.value?(o(),I(a(Le),{key:1,class:"show"})):u("",!0)]),_:1})],8,Ls)):u("",!0),a(m).state.userLogined&&!x.value?(o(),_("span",{key:4,class:"show reply-btn",onClick:O[0]||(O[0]=Y=>h(!0))}," 回复 ")):u("",!0),a(m).state.userLogined&&x.value?(o(),_("span",{key:5,class:"hide reply-btn",onClick:O[1]||(O[1]=Y=>h(!1))}," 取消 ")):u("",!0)])]),x.value?(o(),_("div",As,[t(q,null,{default:n(()=>[t(s,{ref_key:"inputInstRef",ref:y,size:"small",placeholder:d.atUsername?"@"+d.atUsername:"请输入回复内容..",maxlength:a(S),value:D.value,"onUpdate:value":O[2]||(O[2]=Y=>D.value=Y),"show-count":"",clearable:""},null,8,["placeholder","maxlength","value"]),t(v,{type:"primary",size:"small",ghost:"",loading:i.value,onClick:$},{default:n(()=>[P(" 回复 ")]),_:1},8,["loading"])]),_:1})])):u("",!0)])}}});const Ms=re(Ds,[["__scopeId","data-v-f9af7a93"]]),Es={class:"comment-item"},Ns={class:"nickname-wrap"},qs={class:"username-wrap"},Bs={class:"opt-wrap"},Hs={class:"timestamp"},Fs=["innerHTML"],js={class:"reply-wrap"},Vs=ne({__name:"comment-item",props:{comment:{},postUserId:{}},emits:["reload"],setup(E,{emit:N}){const l=E,d=ce(),m=qe(),y=r(0),x=r(""),D=r(),i=ue(()=>{let h=Object.assign({texts:[],imgs:[]},l.comment);return h.contents.map($=>{(+$.type==1||+$.type==2)&&h.texts.push($),+$.type==3&&h.imgs.push($)}),h}),S=(h,$)=>{let k=h.target;if(k.dataset.detail){const O=k.dataset.detail.split(":");O.length===2&&(d.commit("refresh"),O[0]==="tag"?window.$message.warning("评论内的无效话题"):m.push({name:"user",query:{s:O[1]}}))}},A=h=>{var $,k;y.value=h.user_id,x.value=(($=h.user)==null?void 0:$.username)||"",(k=D.value)==null||k.switchReply(!0)},f=()=>{N("reload")},U=()=>{y.value=0,x.value=""},M=()=>{st({id:i.value.id}).then(h=>{window.$message.success("删除成功"),setTimeout(()=>{f()},50)}).catch(h=>{})},z=()=>{ot({id:i.value.id}).then(h=>{i.value.is_essence=h.highlight_status,window.$message.success("操作成功"),setTimeout(()=>{f()},50)}).catch(h=>{})};return(h,$)=>{const k=we,O=ke("router-link"),j=De,s=J,v=_e,q=Ae,Y=Ne,W=Ms,K=Cs,L=Me;return o(),_("div",Es,[t(L,{"content-indented":""},Je({avatar:n(()=>[t(k,{round:"",size:30,src:i.value.user.avatar},null,8,["src"])]),header:n(()=>[p("span",Ns,[t(O,{onClick:$[0]||($[0]=V(()=>{},["stop"])),class:"username-link",to:{name:"user",query:{s:i.value.user.username}}},{default:n(()=>[P(R(i.value.user.nickname),1)]),_:1},8,["to"])]),p("span",qs," @"+R(i.value.user.username),1),i.value.is_essence==a(te).YES?(o(),I(j,{key:0,class:"top-tag",type:"warning",size:"small",round:""},{default:n(()=>[P(" 精选 ")]),_:1})):u("",!0)]),"header-extra":n(()=>[p("div",Bs,[p("span",Hs,R(i.value.ip_loc),1),a(d).state.userInfo.id===h.postUserId?(o(),I(q,{key:0,"negative-text":"取消","positive-text":"确认",onPositiveClick:z},{trigger:n(()=>[t(v,{quaternary:"",circle:"",size:"tiny",class:"action-btn"},{icon:n(()=>[i.value.is_essence==a(te).NO?(o(),I(s,{key:0},{default:n(()=>[t(a(gt))]),_:1})):(o(),I(s,{key:1},{default:n(()=>[t(a(yt))]),_:1}))]),_:1})]),default:n(()=>[P(" "+R(i.value.is_essence==a(te).NO?"是否精选这条评论":"是否取消精选"),1)]),_:1})):u("",!0),a(d).state.userInfo.is_admin||a(d).state.userInfo.id===i.value.user.id?(o(),I(q,{key:1,"negative-text":"取消","positive-text":"确认",onPositiveClick:M},{trigger:n(()=>[t(v,{quaternary:"",circle:"",size:"tiny",class:"action-btn"},{icon:n(()=>[t(s,null,{default:n(()=>[t(a(Se))]),_:1})]),_:1})]),default:n(()=>[P(" 是否删除这条评论? ")]),_:1})):u("",!0)])]),footer:n(()=>[i.value.imgs.length>0?(o(),I(Y,{key:0,imgs:i.value.imgs},null,8,["imgs"])):u("",!0),t(W,{ref_key:"replyComposeRef",ref:D,comment:i.value,"at-userid":y.value,"at-username":x.value,onReload:f,onReset:U},null,8,["comment","at-userid","at-username"]),p("div",js,[(o(!0),_(me,null,ve(i.value.replies,C=>(o(),I(K,{key:C.id,reply:C,"tweet-id":i.value.post_id,onFocusReply:A,onReload:f},null,8,["reply","tweet-id"]))),128))])]),_:2},[i.value.texts.length>0?{name:"description",fn:n(()=>[(o(!0),_(me,null,ve(i.value.texts,C=>(o(),_("span",{key:C.id,class:"comment-text",onClick:$[1]||($[1]=V(G=>S(G,i.value.id),["stop"])),innerHTML:a(be)(C.content).content},null,8,Fs))),128))]),key:"0"}:void 0]),1024)])}}});const Ys=re(Vs,[["__scopeId","data-v-e1f04c6b"]]),Ws=E=>(Ue("data-v-d9073453"),E=E(),ze(),E),Js={key:0,class:"compose-wrap"},Ks={class:"compose-line"},Gs={class:"compose-user"},Qs={class:"compose-line compose-options"},Xs={class:"attachment"},Zs={class:"submit-wrap"},eo={class:"attachment-list-wrap"},to={key:1,class:"compose-wrap"},so=Ws(()=>p("div",{class:"login-wrap"},[p("span",{class:"login-banner"}," 登录后,精彩更多")],-1)),oo={key:0,class:"login-only-wrap"},no={key:1,class:"login-wrap"},ao=ne({__name:"compose-comment",props:{lock:{default:0},postId:{default:0}},emits:["post-success"],setup(E,{emit:N}){const l=E,d=ce(),m=r([]),y=r(!1),x=r(!1),D=r(!1),i=r(""),S=r(),A=r("public/image"),f=r([]),U=r([]),M=r("true".toLowerCase()==="true"),z=+"300",h="/v1/attachment",$=ue(()=>"Bearer "+localStorage.getItem("PAOPAO_TOKEN")),k=os.debounce(g=>{nt({k:g}).then(w=>{let b=[];w.suggest.map(T=>{b.push({label:T,value:T})}),m.value=b,x.value=!1}).catch(w=>{x.value=!1})},200),O=(g,w)=>{x.value||(x.value=!0,w==="@"&&k(g))},j=g=>{g.length>z?i.value=g.substring(0,z):i.value=g},s=g=>{A.value=g},v=g=>{for(let B=0;B30&&(g[B].name=b.substring(0,18)+"..."+b.substring(b.length-9)+"."+T)}f.value=g},q=async g=>{var w,b;return A.value==="public/image"&&!["image/png","image/jpg","image/jpeg","image/gif"].includes((w=g.file.file)==null?void 0:w.type)?(window.$message.warning("图片仅允许 png/jpg/gif 格式"),!1):A.value==="image"&&((b=g.file.file)==null?void 0:b.size)>10485760?(window.$message.warning("图片大小不能超过10MB"),!1):!0},Y=({file:g,event:w})=>{var b;try{let T=JSON.parse((b=w.target)==null?void 0:b.response);T.code===0&&A.value==="public/image"&&U.value.push({id:g.id,content:T.data.content})}catch{window.$message.error("上传失败")}},W=({file:g,event:w})=>{var b;try{let T=JSON.parse((b=w.target)==null?void 0:b.response);if(T.code!==0){let B=T.msg||"上传失败";T.details&&T.details.length>0&&T.details.map(e=>{B+=":"+e}),window.$message.error(B)}}catch{window.$message.error("上传失败")}},K=({file:g})=>{let w=U.value.findIndex(b=>b.id===g.id);w>-1&&U.value.splice(w,1)},L=()=>{y.value=!0},C=()=>{var g;y.value=!1,(g=S.value)==null||g.clear(),f.value=[],i.value="",U.value=[]},G=()=>{if(i.value.trim().length===0){window.$message.warning("请输入内容哦");return}let{users:g}=be(i.value);const w=[];let b=100;w.push({content:i.value,type:2,sort:b}),U.value.map(T=>{b++,w.push({content:T.content,type:3,sort:b})}),D.value=!0,at({contents:w,post_id:l.postId,users:Array.from(new Set(g))}).then(T=>{window.$message.success("发布成功"),D.value=!1,N("post-success"),C()}).catch(T=>{D.value=!1})},Q=g=>{d.commit("triggerAuth",!0),d.commit("triggerAuthKey",g)};return(g,w)=>{const b=we,T=Dt,B=J,e=_e,c=Mt,H=Et,ae=Nt,X=qt,se=Bt;return o(),_("div",null,[a(d).state.userInfo.id>0?(o(),_("div",Js,[p("div",Ks,[p("div",Gs,[t(b,{round:"",size:30,src:a(d).state.userInfo.avatar},null,8,["src"])]),t(T,{type:"textarea",size:"large",autosize:"",bordered:!1,options:m.value,prefix:["@"],loading:x.value,value:i.value,disabled:l.lock===1,"onUpdate:value":j,onSearch:O,onFocus:L,placeholder:l.lock===1?"泡泡已被锁定,回复功能已关闭":"快来评论两句吧..."},null,8,["options","loading","value","disabled","placeholder"])]),y.value?(o(),I(se,{key:0,ref_key:"uploadRef",ref:S,abstract:"","list-type":"image",multiple:!0,max:9,action:h,headers:{Authorization:$.value},data:{type:A.value},"file-list":f.value,onBeforeUpload:q,onFinish:Y,onError:W,onRemove:K,"onUpdate:fileList":v},{default:n(()=>[p("div",Qs,[p("div",Xs,[t(c,{abstract:""},{default:n(({handleClick:oe})=>[t(e,{disabled:f.value.length>0&&A.value==="public/video"||f.value.length===9,onClick:()=>{s("public/image"),oe()},quaternary:"",circle:"",type:"primary"},{icon:n(()=>[t(B,{size:"20",color:"var(--primary-color)"},{default:n(()=>[t(a(kt))]),_:1})]),_:2},1032,["disabled","onClick"])]),_:1}),t(ae,{trigger:"hover",placement:"bottom"},{trigger:n(()=>[t(H,{class:"text-statistic",type:"circle","show-indicator":!1,status:"success","stroke-width":10,percentage:i.value.length/a(z)*100},null,8,["percentage"])]),default:n(()=>[P(" "+R(i.value.length)+" / "+R(a(z)),1)]),_:1})]),p("div",Zs,[t(e,{quaternary:"",round:"",type:"tertiary",class:"cancel-btn",size:"small",onClick:C},{default:n(()=>[P(" 取消 ")]),_:1}),t(e,{loading:D.value,onClick:G,type:"primary",secondary:"",size:"small",round:""},{default:n(()=>[P(" 发布 ")]),_:1},8,["loading"])])]),p("div",eo,[t(X)])]),_:1},8,["headers","data","file-list"])):u("",!0)])):(o(),_("div",to,[so,M.value?u("",!0):(o(),_("div",oo,[t(e,{strong:"",secondary:"",round:"",type:"primary",onClick:w[0]||(w[0]=oe=>Q("signin"))},{default:n(()=>[P(" 登录 ")]),_:1})])),M.value?(o(),_("div",no,[t(e,{strong:"",secondary:"",round:"",type:"primary",onClick:w[1]||(w[1]=oe=>Q("signin"))},{default:n(()=>[P(" 登录 ")]),_:1}),t(e,{strong:"",secondary:"",round:"",type:"info",onClick:w[2]||(w[2]=oe=>Q("signup"))},{default:n(()=>[P(" 注册 ")]),_:1})])):u("",!0)]))])}}});const lo=re(ao,[["__scopeId","data-v-d9073453"]]),io={class:"username-wrap"},uo={class:"options"},co={key:0},ro=["innerHTML"],_o={class:"timestamp"},po={key:0},mo={key:1},vo={class:"opts-wrap"},ho=["onClick"],fo={class:"opt-item"},go=["onClick"],yo=["onClick"],ko=ne({__name:"post-detail",props:{post:{}},emits:["reload"],setup(E,{emit:N}){const l=E,d="true".toLowerCase()==="true",m=ce(),y=qe(),x=Ht(),D=r(!1),i=r(!1),S=r(!1),A=r(!1),f=r(!1),U=r(!1),M=r(!1),z=r(!1),h=r(Z.PUBLIC),$=r(!1),k=r({id:0,avatar:"",username:"",nickname:"",is_admin:!1,is_friend:!0,is_following:!1,created_on:0,follows:0,followings:0,status:1}),O=e=>{k.value=e,$.value=!0},j=()=>{$.value=!1},s=ue({get:()=>{let e=Object.assign({texts:[],imgs:[],videos:[],links:[],attachments:[],charge_attachments:[]},l.post);return e.contents.map(c=>{(+c.type==1||+c.type==2)&&e.texts.push(c),+c.type==3&&e.imgs.push(c),+c.type==4&&e.videos.push(c),+c.type==6&&e.links.push(c),+c.type==7&&e.attachments.push(c),+c.type==8&&e.charge_attachments.push(c)}),e},set:e=>{l.post.upvote_count=e.upvote_count,l.post.comment_count=e.comment_count,l.post.collection_count=e.collection_count,l.post.is_essence=e.is_essence}}),v=e=>()=>xe(J,null,{default:()=>xe(e)}),q=ue(()=>{var H;let e=[];if(!m.state.userInfo.is_admin&&m.state.userInfo.id!=l.post.user.id)return e.push({label:"私信",key:"whisper",icon:v(Pt)}),l.post.user.is_following?e.push({label:"取消关注",key:"unfollow",icon:v(Ut)}):e.push({label:"关注",key:"follow",icon:v(ie)}),e;e.push({label:"删除",key:"delete",icon:v(zt)}),s.value.is_lock===0?e.push({label:"锁定",key:"lock",icon:v(Rt)}):e.push({label:"解锁",key:"unlock",icon:v(St)}),m.state.userInfo.is_admin&&(s.value.is_top===0?e.push({label:"置顶",key:"stick",icon:v(Ie)}):e.push({label:"取消置顶",key:"unstick",icon:v(Ie)})),s.value.is_essence===0?e.push({label:"设为亮点",key:"highlight",icon:v(Te)}):e.push({label:"取消亮点",key:"unhighlight",icon:v(Te)});let c;return s.value.visibility===Z.PUBLIC?c={label:"公开",key:"vpublic",icon:v(pe),children:[{label:"私密",key:"vprivate",icon:v(de)},{label:"关注可见",key:"vfollowing",icon:v(ie)}]}:s.value.visibility===Z.PRIVATE?c={label:"私密",key:"vprivate",icon:v(de),children:[{label:"公开",key:"vpublic",icon:v(pe)},{label:"关注可见",key:"vfollowing",icon:v(ie)}]}:d&&s.value.visibility===Z.FRIEND?c={label:"好友可见",key:"vfriend",icon:v(Pe),children:[{label:"公开",key:"vpublic",icon:v(pe)},{label:"私密",key:"vprivate",icon:v(de)},{label:"关注可见",key:"vfollowing",icon:v(ie)}]}:c={label:"关注可见",key:"vfollowing",icon:v(ie),children:[{label:"公开",key:"vpublic",icon:v(pe)},{label:"私密",key:"vprivate",icon:v(de)}]},d&&s.value.visibility!==Z.FRIEND&&((H=c.children)==null||H.push({label:"好友可见",key:"vfriend",icon:v(Pe)})),e.push(c),e}),Y=e=>{x.success({title:"提示",content:"确定"+(e.user.is_following?"取消关注":"关注")+"该用户吗?",positiveText:"确定",negativeText:"取消",onPositiveClick:()=>{e.user.is_following?vt({user_id:e.user.id}).then(c=>{window.$message.success("操作成功"),e.user.is_following=!1}).catch(c=>{}):ht({user_id:e.user.id}).then(c=>{window.$message.success("关注成功"),e.user.is_following=!0}).catch(c=>{})}})},W=e=>{y.push({name:"post",query:{id:e}})},K=(e,c)=>{if(e.target.dataset.detail){const H=e.target.dataset.detail.split(":");if(H.length===2){m.commit("refresh"),H[0]==="tag"?y.push({name:"home",query:{q:H[1],t:"tag"}}):y.push({name:"user",query:{s:H[1]}});return}}W(c)},L=e=>{switch(e){case"whisper":O(l.post.user);break;case"follow":case"unfollow":Y(l.post);break;case"delete":S.value=!0;break;case"lock":case"unlock":A.value=!0;break;case"stick":case"unstick":f.value=!0;break;case"highlight":case"unhighlight":U.value=!0;break;case"vpublic":h.value=0,M.value=!0;break;case"vprivate":h.value=1,M.value=!0;break;case"vfriend":h.value=2,M.value=!0;break;case"vfollowing":h.value=3,M.value=!0;break}},C=()=>{ut({id:s.value.id}).then(e=>{window.$message.success("删除成功"),y.replace("/"),setTimeout(()=>{m.commit("refresh")},50)}).catch(e=>{z.value=!1})},G=()=>{ct({id:s.value.id}).then(e=>{N("reload"),e.lock_status===1?window.$message.success("锁定成功"):window.$message.success("解锁成功")}).catch(e=>{z.value=!1})},Q=()=>{rt({id:s.value.id}).then(e=>{N("reload"),e.top_status===1?window.$message.success("置顶成功"):window.$message.success("取消置顶成功")}).catch(e=>{z.value=!1})},g=()=>{_t({id:s.value.id}).then(e=>{s.value={...s.value,is_essence:e.highlight_status},e.highlight_status===1?window.$message.success("设为亮点成功"):window.$message.success("取消亮点成功")}).catch(e=>{z.value=!1})},w=()=>{pt({id:s.value.id,visibility:h.value}).then(e=>{N("reload"),window.$message.success("修改可见性成功")}).catch(e=>{z.value=!1})},b=()=>{dt({id:s.value.id}).then(e=>{D.value=e.status,e.status?s.value={...s.value,upvote_count:s.value.upvote_count+1}:s.value={...s.value,upvote_count:s.value.upvote_count-1}}).catch(e=>{console.log(e)})},T=()=>{mt({id:s.value.id}).then(e=>{i.value=e.status,e.status?s.value={...s.value,collection_count:s.value.collection_count+1}:s.value={...s.value,collection_count:s.value.collection_count-1}}).catch(e=>{console.log(e)})},B=()=>{as(`${window.location.origin}/#/post?id=${s.value.id}&share=copy_link&t=${new Date().getTime()}`),window.$message.success("链接已复制到剪贴板")};return Re(()=>{m.state.userInfo.id>0&&(lt({id:s.value.id}).then(e=>{D.value=e.status}).catch(e=>{console.log(e)}),it({id:s.value.id}).then(e=>{i.value=e.status}).catch(e=>{console.log(e)}))}),(e,c)=>{const H=we,ae=ke("router-link"),X=De,se=_e,oe=Ft,le=jt,Be=ns,$e=Xt,He=Ne,Fe=Zt,je=es,Ce=Vt,Ve=Ee,Ye=Me;return o(),_("div",{class:"detail-item",onClick:c[7]||(c[7]=F=>W(s.value.id))},[t(Ye,null,{avatar:n(()=>[t(H,{round:"",size:30,src:s.value.user.avatar},null,8,["src"])]),header:n(()=>[t(ae,{onClick:c[0]||(c[0]=V(()=>{},["stop"])),class:"username-link",to:{name:"user",query:{s:s.value.user.username}}},{default:n(()=>[P(R(s.value.user.nickname),1)]),_:1},8,["to"]),p("span",io," @"+R(s.value.user.username),1),s.value.is_top?(o(),I(X,{key:0,class:"top-tag",type:"warning",size:"small",round:""},{default:n(()=>[P(" 置顶 ")]),_:1})):u("",!0),s.value.visibility==a(Z).PRIVATE?(o(),I(X,{key:1,class:"top-tag",type:"error",size:"small",round:""},{default:n(()=>[P(" 私密 ")]),_:1})):u("",!0),s.value.visibility==a(Z).FRIEND?(o(),I(X,{key:2,class:"top-tag",type:"info",size:"small",round:""},{default:n(()=>[P(" 好友可见 ")]),_:1})):u("",!0)]),"header-extra":n(()=>[p("div",uo,[t(oe,{placement:"bottom-end",trigger:"click",size:"small",options:q.value,onSelect:L},{default:n(()=>[t(se,{quaternary:"",circle:""},{icon:n(()=>[t(a(J),null,{default:n(()=>[t(a(wt))]),_:1})]),_:1})]),_:1},8,["options"])]),t(le,{show:S.value,"onUpdate:show":c[1]||(c[1]=F=>S.value=F),"mask-closable":!1,preset:"dialog",title:"提示",content:"确定删除该泡泡动态吗?","positive-text":"确认","negative-text":"取消",onPositiveClick:C},null,8,["show"]),t(le,{show:A.value,"onUpdate:show":c[2]||(c[2]=F=>A.value=F),"mask-closable":!1,preset:"dialog",title:"提示",content:"确定"+(s.value.is_lock?"解锁":"锁定")+"该泡泡动态吗?","positive-text":"确认","negative-text":"取消",onPositiveClick:G},null,8,["show","content"]),t(le,{show:f.value,"onUpdate:show":c[3]||(c[3]=F=>f.value=F),"mask-closable":!1,preset:"dialog",title:"提示",content:"确定"+(s.value.is_top?"取消置顶":"置顶")+"该泡泡动态吗?","positive-text":"确认","negative-text":"取消",onPositiveClick:Q},null,8,["show","content"]),t(le,{show:U.value,"onUpdate:show":c[4]||(c[4]=F=>U.value=F),"mask-closable":!1,preset:"dialog",title:"提示",content:"确定将该泡泡动态"+(s.value.is_essence?"取消亮点":"设为亮点")+"吗?","positive-text":"确认","negative-text":"取消",onPositiveClick:g},null,8,["show","content"]),t(le,{show:M.value,"onUpdate:show":c[5]||(c[5]=F=>M.value=F),"mask-closable":!1,preset:"dialog",title:"提示",content:"确定将该泡泡动态可见度修改为"+(h.value==0?"公开":h.value==1?"私密":h.value==2?"好友可见":"关注可见")+"吗?","positive-text":"确认","negative-text":"取消",onPositiveClick:w},null,8,["show","content"]),t(Be,{show:$.value,user:k.value,onSuccess:j},null,8,["show","user"])]),footer:n(()=>[t($e,{attachments:s.value.attachments},null,8,["attachments"]),t($e,{attachments:s.value.charge_attachments,price:s.value.attachment_price},null,8,["attachments","price"]),t(He,{imgs:s.value.imgs},null,8,["imgs"]),t(Fe,{videos:s.value.videos,full:!0},null,8,["videos"]),t(je,{links:s.value.links},null,8,["links"]),p("div",_o,[P(" 发布于 "+R(a(he)(s.value.created_on))+" ",1),s.value.ip_loc?(o(),_("span",po,[t(Ce,{vertical:""}),P(" "+R(s.value.ip_loc),1)])):u("",!0),!a(m).state.collapsedLeft&&s.value.created_on!=s.value.latest_replied_on?(o(),_("span",mo,[t(Ce,{vertical:""}),P(" 最后回复 "+R(a(he)(s.value.latest_replied_on)),1)])):u("",!0)])]),action:n(()=>[p("div",vo,[t(Ve,{justify:"space-between"},{default:n(()=>[p("div",{class:"opt-item hover",onClick:V(b,["stop"])},[t(a(J),{size:"20",class:"opt-item-icon"},{default:n(()=>[D.value?u("",!0):(o(),I(a(bt),{key:0})),D.value?(o(),I(a($t),{key:1,color:"red"})):u("",!0)]),_:1}),P(" "+R(s.value.upvote_count),1)],8,ho),p("div",fo,[t(a(J),{size:"20",class:"opt-item-icon"},{default:n(()=>[t(a(Ct))]),_:1}),P(" "+R(s.value.comment_count),1)]),p("div",{class:"opt-item hover",onClick:V(T,["stop"])},[t(a(J),{size:"20",class:"opt-item-icon"},{default:n(()=>[i.value?u("",!0):(o(),I(a(xt),{key:0})),i.value?(o(),I(a(It),{key:1,color:"#ff7600"})):u("",!0)]),_:1}),P(" "+R(s.value.collection_count),1)],8,go),p("div",{class:"opt-item hover",onClick:V(B,["stop"])},[t(a(J),{size:"20",class:"opt-item-icon"},{default:n(()=>[t(a(Tt))]),_:1}),P(" "+R(s.value.share_count),1)],8,yo)]),_:1})])]),default:n(()=>[s.value.texts.length>0?(o(),_("div",co,[(o(!0),_(me,null,ve(s.value.texts,F=>(o(),_("span",{key:F.id,class:"post-text",onClick:c[6]||(c[6]=V(We=>K(We,s.value.id),["stop"])),innerHTML:a(be)(F.content).content},null,8,ro))),128))])):u("",!0)]),_:1})])}}});const wo=E=>(Ue("data-v-c5bf4463"),E=E(),ze(),E),bo={key:0,class:"detail-wrap"},$o={key:1,class:"empty-wrap"},Co={key:0,class:"comment-opts-wrap"},xo=wo(()=>p("span",{class:"comment-title-item"},"评论",-1)),Io={key:2},To={key:0,class:"skeleton-wrap"},Po={key:1},Uo={key:0,class:"empty-wrap"},zo={key:0,class:"load-more-spinner"},Ro={key:1,class:"load-more-spinner"},So={key:2,class:"load-more-spinner"},Oo={key:3,class:"load-more-spinner"},Lo={key:4,class:"load-more-spinner"},Ao={key:5,class:"load-more-spinner"},ee=20,Do=ne({__name:"Post",setup(E){const N=ts(),l=r({}),d=r(!1),m=r(!1),y=r([]),x=ue(()=>+N.query.id),D=r("default"),i=r(!0);let S={loading(){},loaded(){},complete(){},error(){}};const A=L=>{D.value=L,L==="default"&&(i.value=!0),W(S)},f=()=>{l.value={id:0},d.value=!0,ft({id:x.value}).then(L=>{d.value=!1,l.value=L,W(S)}).catch(L=>{d.value=!1})};let U=1;const M=r(!1),z=r([]),h=L=>{M.value||ye({id:l.value.id,style:"default",page:U,page_size:ee}).then(C=>{L!==null&&(S=L),C.list.length0&&(U===1?z.value=C.list:z.value.push(...C.list),y.value=z.value),S.loaded(),m.value=!1}).catch(C=>{m.value=!1,S.error()})};let $=1,k=r(!1);const O=r([]),j=L=>{k.value||ye({id:l.value.id,style:"hots",page:$,page_size:ee}).then(C=>{L!==null&&(S=L),C.list.length0&&($===1?O.value=C.list:O.value.push(...C.list),y.value=O.value),S.loaded(),m.value=!1}).catch(C=>{m.value=!1,S.error()})};let s=1,v=r(!1);const q=r([]),Y=L=>{v.value||ye({id:l.value.id,style:"newest",page:s,page_size:ee}).then(C=>{L!==null&&(S=L),C.list.length0&&(s===1?q.value=C.list:q.value.push(...C.list),y.value=q.value),S.loaded(),m.value=!1}).catch(C=>{m.value=!1,S.error()})},W=L=>{x.value<1||(y.value.length===0&&(m.value=!0),D.value==="default"?(y.value=z.value,h(L)):D.value==="hots"?(y.value=O.value,j(L)):(y.value=q.value,Y(L)),m.value=!1)},K=()=>{U=1,M.value=!1,z.value=[],$=1,k.value=!1,O.value=[],s=1,v.value=!1,q.value=[],W(S)};return Re(()=>{f()}),Ke(x,()=>{x.value>0&&N.name==="post"&&f()}),(L,C)=>{const G=ls,Q=ko,g=Wt,w=Jt,b=Kt,T=Gt,B=Qt,e=lo,c=ss,H=Ys,ae=Ee,X=Yt;return o(),_("div",null,[t(G,{title:"泡泡详情",back:!0}),t(X,{class:"main-content-wrap",bordered:""},{default:n(()=>[t(b,null,{default:n(()=>[t(w,{show:d.value},{default:n(()=>[l.value.id>1?(o(),_("div",bo,[t(Q,{post:l.value,onReload:f},null,8,["post"])])):(o(),_("div",$o,[t(g,{size:"large",description:"暂无数据"})]))]),_:1},8,["show"])]),_:1}),l.value.id>0?(o(),_("div",Co,[t(B,{type:"bar","justify-content":"end",size:"small","tab-style":"margin-left: -24px;",animated:"","onUpdate:value":A},{prefix:n(()=>[xo]),default:n(()=>[t(T,{name:"default",tab:"推荐"}),t(T,{name:"hots",tab:"热门"}),t(T,{name:"newest",tab:"最新"})]),_:1})])):u("",!0),l.value.id>0?(o(),I(b,{key:1},{default:n(()=>[t(e,{lock:l.value.is_lock,"post-id":l.value.id,onPostSuccess:K},null,8,["lock","post-id"])]),_:1})):u("",!0),l.value.id>0?(o(),_("div",Io,[m.value?(o(),_("div",To,[t(c,{num:5})])):(o(),_("div",Po,[y.value.length===0?(o(),_("div",Uo,[t(g,{size:"large",description:"暂无评论,快来抢沙发"})])):u("",!0),(o(!0),_(me,null,ve(y.value,se=>(o(),I(b,{key:se.id},{default:n(()=>[t(H,{comment:se,postUserId:l.value.user_id,onReload:K},null,8,["comment","postUserId"])]),_:2},1024))),128))]))])):u("",!0),y.value.length>=ee?(o(),I(ae,{key:3,justify:"center"},{default:n(()=>[t(a(is),{class:"load-more",slots:{complete:"没有更多数据了",error:"加载出错"},onInfinite:W},{spinner:n(()=>[i.value&&M.value?(o(),_("span",zo)):u("",!0),!i.value&&a(k)?(o(),_("span",Ro)):u("",!0),!i.value&&a(v)?(o(),_("span",So)):u("",!0),i.value&&!M.value?(o(),_("span",Oo,"加载评论")):u("",!0),!i.value&&!a(k)?(o(),_("span",Lo,"加载评论")):u("",!0),!i.value&&!a(v)?(o(),_("span",Ao,"加载评论")):u("",!0)]),_:1})]),_:1})):u("",!0)]),_:1})])}}});const fn=re(Do,[["__scopeId","data-v-c5bf4463"]]);export{fn as default};
diff --git a/web/dist/assets/Post-8fdcb727.css b/web/dist/assets/Post-cb9db946.css
similarity index 60%
rename from web/dist/assets/Post-8fdcb727.css
rename to web/dist/assets/Post-cb9db946.css
index 6ae9fdfa..25de9caa 100644
--- a/web/dist/assets/Post-8fdcb727.css
+++ b/web/dist/assets/Post-cb9db946.css
@@ -1 +1 @@
-.reply-item[data-v-187a4ed3]{display:flex;flex-direction:column;font-size:12px;padding:8px;border-bottom:1px solid #f3f3f3}.reply-item .header-wrap[data-v-187a4ed3]{display:flex;align-items:center;justify-content:space-between}.reply-item .header-wrap .username[data-v-187a4ed3]{max-width:50%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.reply-item .header-wrap .username .reply-name[data-v-187a4ed3]{margin:0 3px;opacity:.75}.reply-item .header-wrap .timestamp[data-v-187a4ed3]{opacity:.75;text-align:right;max-width:50%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.reply-item .base-wrap[data-v-187a4ed3]{display:block}.reply-item .base-wrap .content[data-v-187a4ed3]{width:100%;margin-top:4px;font-size:12px;text-align:justify;line-height:2}.reply-item .base-wrap .reply-switch[data-v-187a4ed3]{display:flex;align-items:center;justify-content:space-between;font-size:12px}.reply-item .base-wrap .reply-switch .actions[data-v-187a4ed3]{display:flex;align-items:center;text-align:right;font-size:12px;margin:10px 0}.reply-item .base-wrap .reply-switch .time-item[data-v-187a4ed3]{font-size:12px;opacity:.75;margin-right:18px}.reply-item .base-wrap .reply-switch .action-item[data-v-187a4ed3]{display:flex;align-items:center;margin-left:18px;opacity:.65}.reply-item .base-wrap .reply-switch .action-item .upvote-count[data-v-187a4ed3]{margin-left:4px;font-size:12px}.reply-item .base-wrap .reply-switch .action-item.hover[data-v-187a4ed3]{cursor:pointer}.reply-item .base-wrap .reply-switch .opacity-item[data-v-187a4ed3]{opacity:.75}.reply-item .base-wrap .reply-switch .reply-btn[data-v-187a4ed3]{margin-left:18px}.reply-item .base-wrap .reply-switch .show[data-v-187a4ed3]{color:#18a058;cursor:pointer}.reply-item .base-wrap .reply-switch .hide[data-v-187a4ed3]{opacity:.75;cursor:pointer}.dark .reply-item[data-v-187a4ed3]{border-bottom:1px solid #262628;background-color:#101014bf}.dark .reply-item .base-wrap .reply-switch .show[data-v-187a4ed3]{color:#63e2b7}.reply-compose-wrap .reply-switch[data-v-f9af7a93]{display:flex;align-items:center;justify-content:space-between;text-align:right;font-size:12px}.reply-compose-wrap .reply-switch .actions[data-v-f9af7a93]{display:flex;align-items:center;text-align:right;font-size:12px;margin:10px 0}.reply-compose-wrap .reply-switch .time-item[data-v-f9af7a93]{font-size:12px;opacity:.65;margin-right:18px}.reply-compose-wrap .reply-switch .action-item[data-v-f9af7a93]{display:flex;align-items:center;margin-left:18px;opacity:.65}.reply-compose-wrap .reply-switch .action-item .upvote-count[data-v-f9af7a93]{margin-left:4px;font-size:12px}.reply-compose-wrap .reply-switch .action-item.hover[data-v-f9af7a93]{cursor:pointer}.reply-compose-wrap .reply-switch .reply-btn[data-v-f9af7a93]{margin-left:18px}.reply-compose-wrap .reply-switch .show[data-v-f9af7a93]{color:#18a058;cursor:pointer;opacity:.75}.reply-compose-wrap .reply-switch .hide[data-v-f9af7a93]{opacity:.75;cursor:pointer}.dark .reply-compose-wrap[data-v-f9af7a93]{background-color:#101014bf}.dark .reply-compose-wrap .reply-switch .show[data-v-f9af7a93]{color:#63e2b7}.comment-item[data-v-36dac8c8]{width:100%;padding:16px;box-sizing:border-box}.comment-item .nickname-wrap[data-v-36dac8c8]{font-size:14px}.comment-item .username-wrap[data-v-36dac8c8]{font-size:14px;opacity:.75}.comment-item .opt-wrap[data-v-36dac8c8]{display:flex;align-items:center}.comment-item .opt-wrap .timestamp[data-v-36dac8c8]{opacity:.75;font-size:12px}.comment-item .opt-wrap .del-btn[data-v-36dac8c8]{margin-left:4px}.comment-item .comment-text[data-v-36dac8c8]{display:block;text-align:justify;overflow:hidden;white-space:pre-wrap;word-break:break-all}.comment-item .opt-item[data-v-36dac8c8]{display:flex;align-items:center;opacity:.7}.comment-item .opt-item .opt-item-icon[data-v-36dac8c8]{margin-right:10px}.reply-wrap[data-v-36dac8c8]{margin-top:10px;border-radius:5px;background:#fafafc}.reply-wrap .reply-item[data-v-36dac8c8]:last-child{border-bottom:none}.dark .reply-wrap[data-v-36dac8c8]{background:#18181c}.dark .comment-item[data-v-36dac8c8]{background-color:#101014bf}.compose-wrap[data-v-d9073453]{width:100%;padding:16px;box-sizing:border-box}.compose-wrap .compose-line[data-v-d9073453]{display:flex;flex-direction:row}.compose-wrap .compose-line .compose-user[data-v-d9073453]{width:42px;height:42px;display:flex;align-items:center}.compose-wrap .compose-line.compose-options[data-v-d9073453]{margin-top:6px;padding-left:42px;display:flex;justify-content:space-between}.compose-wrap .compose-line.compose-options .submit-wrap[data-v-d9073453]{display:flex;align-items:center}.compose-wrap .compose-line.compose-options .submit-wrap .cancel-btn[data-v-d9073453]{margin-right:8px}.compose-wrap .login-only-wrap[data-v-d9073453]{display:flex;justify-content:center;width:100%}.compose-wrap .login-only-wrap button[data-v-d9073453]{margin:0 4px;width:50%}.compose-wrap .login-wrap[data-v-d9073453]{display:flex;justify-content:center;width:100%}.compose-wrap .login-wrap .login-banner[data-v-d9073453]{margin-bottom:12px;opacity:.8}.compose-wrap .login-wrap button[data-v-d9073453]{margin:0 4px}.attachment[data-v-d9073453]{display:flex;align-items:center}.attachment .text-statistic[data-v-d9073453]{margin-left:8px;width:18px;height:18px;transform:rotate(180deg)}.attachment-list-wrap[data-v-d9073453]{margin-top:12px;margin-left:42px}.attachment-list-wrap .n-upload-file-info__thumbnail[data-v-d9073453]{overflow:hidden}.dark .compose-mention[data-v-d9073453],.dark .compose-wrap[data-v-d9073453]{background-color:#101014bf}.detail-item{width:100%;padding:16px;box-sizing:border-box;background:#f7f9f9}.detail-item .nickname-wrap{font-size:14px}.detail-item .username-wrap{font-size:14px;opacity:.75}.detail-item .top-tag{transform:scale(.75)}.detail-item .options{opacity:.75}.detail-item .post-text{font-size:16px;text-align:justify;overflow:hidden;white-space:pre-wrap;word-break:break-all}.detail-item .opts-wrap{margin-top:20px}.detail-item .opts-wrap .opt-item{display:flex;align-items:center;opacity:.7}.detail-item .opts-wrap .opt-item .opt-item-icon{margin-right:10px}.detail-item .opts-wrap .opt-item.hover{cursor:pointer}.detail-item .n-thing .n-thing-avatar-header-wrapper{align-items:center}.detail-item .timestamp{opacity:.75;font-size:12px;margin-top:10px}.dark .detail-item{background:#18181c}.detail-wrap[data-v-a8d601f1]{min-height:100px}.comment-opts-wrap[data-v-a8d601f1]{padding-top:6px;padding-left:16px;padding-right:16px;opacity:.75}.comment-opts-wrap .comment-title-item[data-v-a8d601f1]{padding-top:4px;font-size:16px;text-align:center}.main-content-wrap .load-more[data-v-a8d601f1]{margin-bottom:8px}.main-content-wrap .load-more .load-more-spinner[data-v-a8d601f1]{font-size:14px;opacity:.65}.dark .main-content-wrap[data-v-a8d601f1],.dark .skeleton-wrap[data-v-a8d601f1]{background-color:#101014bf}
+.reply-item[data-v-eccdbbd8]{display:flex;flex-direction:column;font-size:12px;padding:8px;border-bottom:1px solid #f3f3f3}.reply-item .header-wrap[data-v-eccdbbd8]{display:flex;align-items:center;justify-content:space-between}.reply-item .header-wrap .username[data-v-eccdbbd8]{max-width:50%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.reply-item .header-wrap .username .reply-name[data-v-eccdbbd8]{margin:0 3px;opacity:.75}.reply-item .header-wrap .timestamp[data-v-eccdbbd8]{opacity:.75;text-align:right;max-width:50%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.reply-item .base-wrap[data-v-eccdbbd8]{display:block}.reply-item .base-wrap .content[data-v-eccdbbd8]{width:100%;margin-top:4px;font-size:12px;text-align:justify;line-height:2}.reply-item .base-wrap .reply-switch[data-v-eccdbbd8]{display:flex;align-items:center;justify-content:space-between;font-size:12px}.reply-item .base-wrap .reply-switch .actions[data-v-eccdbbd8]{display:flex;align-items:center;text-align:right;font-size:12px;margin:10px 0}.reply-item .base-wrap .reply-switch .time-item[data-v-eccdbbd8]{font-size:12px;opacity:.75;margin-right:18px}.reply-item .base-wrap .reply-switch .action-item[data-v-eccdbbd8]{display:flex;align-items:center;margin-left:18px;opacity:.65}.reply-item .base-wrap .reply-switch .action-item .upvote-count[data-v-eccdbbd8]{margin-left:4px;font-size:12px}.reply-item .base-wrap .reply-switch .action-item.hover[data-v-eccdbbd8]{cursor:pointer}.reply-item .base-wrap .reply-switch .opacity-item[data-v-eccdbbd8]{opacity:.75}.reply-item .base-wrap .reply-switch .reply-btn[data-v-eccdbbd8]{margin-left:18px}.reply-item .base-wrap .reply-switch .show[data-v-eccdbbd8]{color:#18a058;cursor:pointer}.reply-item .base-wrap .reply-switch .hide[data-v-eccdbbd8]{opacity:.75;cursor:pointer}.dark .reply-item[data-v-eccdbbd8]{border-bottom:1px solid #262628;background-color:#101014bf}.dark .reply-item .base-wrap .reply-switch .show[data-v-eccdbbd8]{color:#63e2b7}.reply-compose-wrap .reply-switch[data-v-f9af7a93]{display:flex;align-items:center;justify-content:space-between;text-align:right;font-size:12px}.reply-compose-wrap .reply-switch .actions[data-v-f9af7a93]{display:flex;align-items:center;text-align:right;font-size:12px;margin:10px 0}.reply-compose-wrap .reply-switch .time-item[data-v-f9af7a93]{font-size:12px;opacity:.65;margin-right:18px}.reply-compose-wrap .reply-switch .action-item[data-v-f9af7a93]{display:flex;align-items:center;margin-left:18px;opacity:.65}.reply-compose-wrap .reply-switch .action-item .upvote-count[data-v-f9af7a93]{margin-left:4px;font-size:12px}.reply-compose-wrap .reply-switch .action-item.hover[data-v-f9af7a93]{cursor:pointer}.reply-compose-wrap .reply-switch .reply-btn[data-v-f9af7a93]{margin-left:18px}.reply-compose-wrap .reply-switch .show[data-v-f9af7a93]{color:#18a058;cursor:pointer;opacity:.75}.reply-compose-wrap .reply-switch .hide[data-v-f9af7a93]{opacity:.75;cursor:pointer}.dark .reply-compose-wrap[data-v-f9af7a93]{background-color:#101014bf}.dark .reply-compose-wrap .reply-switch .show[data-v-f9af7a93]{color:#63e2b7}.comment-item[data-v-e1f04c6b]{width:100%;padding:16px;box-sizing:border-box}.comment-item .nickname-wrap[data-v-e1f04c6b]{font-size:14px}.comment-item .username-wrap[data-v-e1f04c6b]{font-size:14px;opacity:.75}.comment-item .top-tag[data-v-e1f04c6b]{transform:scale(.75)}.comment-item .opt-wrap[data-v-e1f04c6b]{display:flex;align-items:center}.comment-item .opt-wrap .timestamp[data-v-e1f04c6b]{opacity:.75;font-size:12px}.comment-item .opt-wrap .action-btn[data-v-e1f04c6b]{margin-left:4px}.comment-item .comment-text[data-v-e1f04c6b]{display:block;text-align:justify;overflow:hidden;white-space:pre-wrap;word-break:break-all}.comment-item .opt-item[data-v-e1f04c6b]{display:flex;align-items:center;opacity:.7}.comment-item .opt-item .opt-item-icon[data-v-e1f04c6b]{margin-right:10px}.reply-wrap[data-v-e1f04c6b]{margin-top:10px;border-radius:5px;background:#fafafc}.reply-wrap .reply-item[data-v-e1f04c6b]:last-child{border-bottom:none}.dark .reply-wrap[data-v-e1f04c6b]{background:#18181c}.dark .comment-item[data-v-e1f04c6b]{background-color:#101014bf}.compose-wrap[data-v-d9073453]{width:100%;padding:16px;box-sizing:border-box}.compose-wrap .compose-line[data-v-d9073453]{display:flex;flex-direction:row}.compose-wrap .compose-line .compose-user[data-v-d9073453]{width:42px;height:42px;display:flex;align-items:center}.compose-wrap .compose-line.compose-options[data-v-d9073453]{margin-top:6px;padding-left:42px;display:flex;justify-content:space-between}.compose-wrap .compose-line.compose-options .submit-wrap[data-v-d9073453]{display:flex;align-items:center}.compose-wrap .compose-line.compose-options .submit-wrap .cancel-btn[data-v-d9073453]{margin-right:8px}.compose-wrap .login-only-wrap[data-v-d9073453]{display:flex;justify-content:center;width:100%}.compose-wrap .login-only-wrap button[data-v-d9073453]{margin:0 4px;width:50%}.compose-wrap .login-wrap[data-v-d9073453]{display:flex;justify-content:center;width:100%}.compose-wrap .login-wrap .login-banner[data-v-d9073453]{margin-bottom:12px;opacity:.8}.compose-wrap .login-wrap button[data-v-d9073453]{margin:0 4px}.attachment[data-v-d9073453]{display:flex;align-items:center}.attachment .text-statistic[data-v-d9073453]{margin-left:8px;width:18px;height:18px;transform:rotate(180deg)}.attachment-list-wrap[data-v-d9073453]{margin-top:12px;margin-left:42px}.attachment-list-wrap .n-upload-file-info__thumbnail[data-v-d9073453]{overflow:hidden}.dark .compose-mention[data-v-d9073453],.dark .compose-wrap[data-v-d9073453]{background-color:#101014bf}.detail-item{width:100%;padding:16px;box-sizing:border-box;background:#f7f9f9}.detail-item .nickname-wrap{font-size:14px}.detail-item .username-wrap{font-size:14px;opacity:.75}.detail-item .top-tag{transform:scale(.75)}.detail-item .options{opacity:.75}.detail-item .post-text{font-size:16px;text-align:justify;overflow:hidden;white-space:pre-wrap;word-break:break-all}.detail-item .opts-wrap{margin-top:20px}.detail-item .opts-wrap .opt-item{display:flex;align-items:center;opacity:.7}.detail-item .opts-wrap .opt-item .opt-item-icon{margin-right:10px}.detail-item .opts-wrap .opt-item.hover{cursor:pointer}.detail-item .n-thing .n-thing-avatar-header-wrapper{align-items:center}.detail-item .timestamp{opacity:.75;font-size:12px;margin-top:10px}.dark .detail-item{background:#18181c}.detail-wrap[data-v-c5bf4463]{min-height:100px}.comment-opts-wrap[data-v-c5bf4463]{padding-top:6px;padding-left:16px;padding-right:16px;opacity:.75}.comment-opts-wrap .comment-title-item[data-v-c5bf4463]{padding-top:4px;font-size:16px;text-align:center}.main-content-wrap .load-more[data-v-c5bf4463]{margin-bottom:8px}.main-content-wrap .load-more .load-more-spinner[data-v-c5bf4463]{font-size:14px;opacity:.65}.dark .main-content-wrap[data-v-c5bf4463],.dark .skeleton-wrap[data-v-c5bf4463]{background-color:#101014bf}
diff --git a/web/dist/assets/Profile-3ffb7be9.css b/web/dist/assets/Profile-3ffb7be9.css
deleted file mode 100644
index f5f36861..00000000
--- a/web/dist/assets/Profile-3ffb7be9.css
+++ /dev/null
@@ -1 +0,0 @@
-.profile-baseinfo[data-v-756dadd0]{display:flex;padding:16px}.profile-baseinfo .avatar[data-v-756dadd0]{width:72px}.profile-baseinfo .base-info[data-v-756dadd0]{position:relative;margin-left:12px;width:calc(100% - 84px)}.profile-baseinfo .base-info .username[data-v-756dadd0]{line-height:16px;font-size:16px}.profile-baseinfo .base-info .userinfo[data-v-756dadd0]{font-size:14px;line-height:14px;margin-top:10px;opacity:.75}.profile-baseinfo .base-info .userinfo .info-item[data-v-756dadd0]{margin-right:12px}.profile-baseinfo .base-info .top-tag[data-v-756dadd0]{transform:scale(.75)}.profile-tabs-wrap[data-v-756dadd0]{padding:0 16px}.load-more[data-v-756dadd0]{margin:20px}.load-more .load-more-wrap[data-v-756dadd0]{display:flex;flex-direction:row;justify-content:center;align-items:center;gap:14px}.load-more .load-more-wrap .load-more-spinner[data-v-756dadd0]{font-size:14px;opacity:.65}.dark .profile-wrap[data-v-756dadd0],.dark .pagination-wrap[data-v-756dadd0]{background-color:#101014bf}
diff --git a/web/dist/assets/Profile-4778c0d5.js b/web/dist/assets/Profile-4778c0d5.js
new file mode 100644
index 00000000..6d8ce981
--- /dev/null
+++ b/web/dist/assets/Profile-4778c0d5.js
@@ -0,0 +1 @@
+import{_ as ge}from"./whisper-9b4eeceb.js";import{_ as we,a as ke}from"./post-item.vue_vue_type_style_index_0_lang-c2092e3d.js";import{_ as ye}from"./post-skeleton-8434d30b.js";import{_ as be}from"./main-nav.vue_vue_type_style_index_0_lang-93352cc4.js";import{d as Ie,H as i,b as Pe,E as Oe,r as Te,f as n,k as r,bf as u,q as f,w as _,Y as d,e as a,j as p,x as O,A as W,y as ae,F as b,u as I}from"./@vue-a481fc63.js";import{u as Fe}from"./vuex-44de225f.js";import{b as Ae}from"./vue-router-e5a2430e.js";import{e as x,J as Me,u as xe,f as ze,_ as $e}from"./index-daff1b26.js";import{W as qe}from"./v3-infinite-loading-2c58ec2f.js";import{F as Ce,G as Se,a as Le,o as Ue,M as Be,f as De,g as He,J as Ne,k as Ve,H as We}from"./naive-ui-defd0b2d.js";import"./content-64a02a2f.js";import"./@vicons-c265fba6.js";import"./paopao-video-player-2fe58954.js";import"./copy-to-clipboard-4ef7d3eb.js";import"./@babel-725317a4.js";import"./toggle-selection-93f4ad84.js";import"./vooks-6d99783e.js";import"./evtd-b614532e.js";import"./axios-4a70c6fc.js";import"./moment-2ab8298d.js";/* empty css */import"./seemly-76b7b838.js";import"./vueuc-39372edb.js";import"./@css-render-7124a1a5.js";import"./vdirs-b0483831.js";import"./@juggle-41516555.js";import"./css-render-6a5c5852.js";import"./@emotion-8a8e73f6.js";import"./lodash-es-8412e618.js";import"./treemate-25c27bff.js";import"./async-validator-dee29e8b.js";import"./date-fns-975a2d8f.js";const je={class:"profile-baseinfo"},Ee={class:"avatar"},Je={class:"base-info"},Re={class:"username"},Ge={class:"userinfo"},Ye={class:"info-item"},Ke={class:"info-item"},Qe={class:"userinfo"},Xe={class:"info-item"},Ze={class:"info-item"},et={key:0,class:"skeleton-wrap"},tt={key:1},at={key:0,class:"empty-wrap"},st={key:1},lt={key:0},ot={key:1},nt={key:2},ut={key:3},it={key:4},rt={key:2},ct={key:0},_t={key:1},vt={key:2},dt={key:3},mt={key:4},ft={class:"load-more-wrap"},pt={class:"load-more-spinner"},ht=Ie({__name:"Profile",setup(gt){const o=Fe(),T=Ae(),se=Ce(),v=i(!1),P=i(!1),l=i([]),z=i([]),$=i([]),q=i([]),C=i([]),S=i([]),m=i("post"),j=i(+T.query.p||1),E=i(1),J=i(1),R=i(1),G=i(1),s=i(+T.query.p||1),g=i(20),c=i(0),Y=i(0),K=i(0),Q=i(0),X=i(0),Z=i(0),L=i(!1),ee=i({id:0,avatar:"",username:"",nickname:"",is_admin:!1,is_friend:!0,is_following:!1,created_on:0,follows:0,followings:0,status:1}),w=e=>{ee.value=e,L.value=!0},le=()=>{L.value=!1},k=e=>{se.success({title:"提示",content:"确定"+(e.user.is_following?"取消关注":"关注")+"该用户吗?",positiveText:"确定",negativeText:"取消",onPositiveClick:()=>{e.user.is_following?xe({user_id:e.user.id}).then(h=>{window.$message.success("操作成功"),e.user.is_following=!1}).catch(h=>{}):ze({user_id:e.user.id}).then(h=>{window.$message.success("关注成功"),e.user.is_following=!0}).catch(h=>{})}})},U=()=>{switch(m.value){case"post":B();break;case"comment":D();break;case"highlight":H();break;case"media":N();break;case"star":V();break}},B=()=>{v.value=!0,x({username:o.state.userInfo.username,style:"post",page:s.value,page_size:g.value}).then(e=>{v.value=!1,e.list.length===0&&(P.value=!0),s.value>1?l.value=l.value.concat(e.list):(l.value=e.list||[],window.scrollTo(0,0)),c.value=Math.ceil(e.pager.total_rows/g.value),z.value=l.value,Y.value=c.value}).catch(e=>{l.value=[],s.value>1&&s.value--,v.value=!1})},D=()=>{v.value=!0,x({username:o.state.userInfo.username,style:"comment",page:s.value,page_size:g.value}).then(e=>{v.value=!1,e.list.length===0&&(P.value=!0),s.value>1?l.value=l.value.concat(e.list):(l.value=e.list||[],window.scrollTo(0,0)),c.value=Math.ceil(e.pager.total_rows/g.value),$.value=l.value,K.value=c.value}).catch(e=>{l.value=[],s.value>1&&s.value--,v.value=!1})},H=()=>{v.value=!0,x({username:o.state.userInfo.username,style:"highlight",page:s.value,page_size:g.value}).then(e=>{v.value=!1,e.list.length===0&&(P.value=!0),s.value>1?l.value=l.value.concat(e.list):(l.value=e.list||[],window.scrollTo(0,0)),c.value=Math.ceil(e.pager.total_rows/g.value),q.value=l.value,Q.value=c.value}).catch(e=>{l.value=[],s.value>1&&s.value--,v.value=!1})},N=()=>{v.value=!0,x({username:o.state.userInfo.username,style:"media",page:s.value,page_size:g.value}).then(e=>{v.value=!1,e.list.length===0&&(P.value=!0),s.value>1?l.value=l.value.concat(e.list):(l.value=e.list||[],window.scrollTo(0,0)),c.value=Math.ceil(e.pager.total_rows/g.value),C.value=l.value,X.value=c.value}).catch(e=>{l.value=[],s.value>1&&s.value--,v.value=!1})},V=()=>{v.value=!0,x({username:o.state.userInfo.username,style:"star",page:s.value,page_size:g.value}).then(e=>{v.value=!1,e.list.length===0&&(P.value=!0),s.value>1?l.value=l.value.concat(e.list):(l.value=e.list||[],window.scrollTo(0,0)),c.value=Math.ceil(e.pager.total_rows/g.value),S.value=l.value,Z.value=c.value}).catch(e=>{l.value=[],s.value>1&&s.value--,v.value=!1})},oe=e=>{switch(m.value=e,m.value){case"post":l.value=z.value,s.value=j.value,c.value=Y.value,B();break;case"comment":l.value=$.value,s.value=E.value,c.value=K.value,D();break;case"highlight":l.value=q.value,s.value=J.value,c.value=Q.value,H();break;case"media":l.value=C.value,s.value=R.value,c.value=X.value,N();break;case"star":l.value=S.value,s.value=G.value,c.value=Z.value,V();break}},ne=()=>{switch(m.value){case"post":j.value=s.value,B();break;case"comment":E.value=s.value,D();break;case"highlight":J.value=s.value,H();break;case"media":R.value=s.value,N();break;case"star":G.value=s.value,V();break}},ue=()=>{s.value{U()}),Oe(()=>({path:T.path,query:T.query,refresh:o.state.refresh}),(e,h)=>{if(e.refresh!==h.refresh){s.value=+T.query.p||1,setTimeout(()=>{U()},0);return}h.path!=="/post"&&e.path==="/profile"&&(s.value=+T.query.p||1,setTimeout(()=>{U()},0))}),(e,h)=>{const ie=be,re=Ue,ce=Be,te=Te("router-link"),F=De,_e=He,ve=ye,de=Ne,A=we,y=We,M=ke,me=ge,fe=Se,pe=Ve,he=Le;return a(),n("div",null,[r(ie,{title:"主页"}),u(o).state.userInfo.id>0?(a(),f(fe,{key:0,class:"main-content-wrap profile-wrap",bordered:""},{default:_(()=>[p("div",je,[p("div",Ee,[r(re,{size:72,src:u(o).state.userInfo.avatar},null,8,["src"])]),p("div",Je,[p("div",Re,[p("strong",null,O(u(o).state.userInfo.nickname),1),p("span",null," @"+O(u(o).state.userInfo.username),1),u(o).state.userInfo.is_admin?(a(),f(ce,{key:0,class:"top-tag",type:"error",size:"small",round:""},{default:_(()=>[W(" 管理员 ")]),_:1})):d("",!0)]),p("div",Ge,[p("span",Ye,"UID. "+O(u(o).state.userInfo.id),1),p("span",Ke,O(u(Me)(u(o).state.userInfo.created_on))+" 加入",1)]),p("div",Qe,[p("span",Xe,[r(te,{onClick:h[0]||(h[0]=ae(()=>{},["stop"])),class:"following-link",to:{name:"following",query:{s:u(o).state.userInfo.username,n:u(o).state.userInfo.nickname,t:"follows"}}},{default:_(()=>[W(" 关注 "+O(u(o).state.userInfo.follows),1)]),_:1},8,["to"])]),p("span",Ze,[r(te,{onClick:h[1]||(h[1]=ae(()=>{},["stop"])),class:"following-link",to:{name:"following",query:{s:u(o).state.userInfo.username,n:u(o).state.userInfo.nickname,t:"followings"}}},{default:_(()=>[W(" 粉丝 "+O(u(o).state.userInfo.followings),1)]),_:1},8,["to"])])])])]),r(_e,{class:"profile-tabs-wrap",type:"line",animated:"","onUpdate:value":oe},{default:_(()=>[r(F,{name:"post",tab:"泡泡"}),r(F,{name:"comment",tab:"评论"}),r(F,{name:"highlight",tab:"亮点"}),r(F,{name:"media",tab:"图文"}),r(F,{name:"star",tab:"喜欢"})]),_:1}),v.value&&l.value.length===0?(a(),n("div",et,[r(ve,{num:g.value},null,8,["num"])])):(a(),n("div",tt,[l.value.length===0?(a(),n("div",at,[r(de,{size:"large",description:"暂无数据"})])):d("",!0),u(o).state.desktopModelShow?(a(),n("div",st,[m.value==="post"?(a(),n("div",lt,[(a(!0),n(b,null,I(z.value,t=>(a(),f(y,{key:t.id},{default:_(()=>[r(A,{post:t,isOwner:u(o).state.userInfo.id==t.user_id,addFollowAction:!0,onSendWhisper:w,onHandleFollowAction:k},null,8,["post","isOwner"])]),_:2},1024))),128))])):d("",!0),m.value==="comment"?(a(),n("div",ot,[(a(!0),n(b,null,I($.value,t=>(a(),f(y,{key:t.id},{default:_(()=>[r(A,{post:t,isOwner:u(o).state.userInfo.id==t.user_id,addFollowAction:!0,onSendWhisper:w,onHandleFollowAction:k},null,8,["post","isOwner"])]),_:2},1024))),128))])):d("",!0),m.value==="highlight"?(a(),n("div",nt,[(a(!0),n(b,null,I(q.value,t=>(a(),f(y,{key:t.id},{default:_(()=>[r(A,{post:t,isOwner:u(o).state.userInfo.id==t.user_id,addFollowAction:!0,onSendWhisper:w,onHandleFollowAction:k},null,8,["post","isOwner"])]),_:2},1024))),128))])):d("",!0),m.value==="media"?(a(),n("div",ut,[(a(!0),n(b,null,I(C.value,t=>(a(),f(y,{key:t.id},{default:_(()=>[r(A,{post:t,isOwner:u(o).state.userInfo.id==t.user_id,addFollowAction:!0,onSendWhisper:w,onHandleFollowAction:k},null,8,["post","isOwner"])]),_:2},1024))),128))])):d("",!0),m.value==="star"?(a(),n("div",it,[(a(!0),n(b,null,I(S.value,t=>(a(),f(y,{key:t.id},{default:_(()=>[r(A,{post:t,isOwner:u(o).state.userInfo.id==t.user_id,addFollowAction:!0,onSendWhisper:w,onHandleFollowAction:k},null,8,["post","isOwner"])]),_:2},1024))),128))])):d("",!0)])):(a(),n("div",rt,[m.value==="post"?(a(),n("div",ct,[(a(!0),n(b,null,I(z.value,t=>(a(),f(y,{key:t.id},{default:_(()=>[r(M,{post:t,isOwner:u(o).state.userInfo.id==t.user_id,addFollowAction:!0,onSendWhisper:w,onHandleFollowAction:k},null,8,["post","isOwner"])]),_:2},1024))),128))])):d("",!0),m.value==="comment"?(a(),n("div",_t,[(a(!0),n(b,null,I($.value,t=>(a(),f(y,{key:t.id},{default:_(()=>[r(M,{post:t,isOwner:u(o).state.userInfo.id==t.user_id,addFollowAction:!0,onSendWhisper:w,onHandleFollowAction:k},null,8,["post","isOwner"])]),_:2},1024))),128))])):d("",!0),m.value==="highlight"?(a(),n("div",vt,[(a(!0),n(b,null,I(q.value,t=>(a(),f(y,{key:t.id},{default:_(()=>[r(M,{post:t,isOwner:u(o).state.userInfo.id==t.user_id,addFollowAction:!0,onSendWhisper:w,onHandleFollowAction:k},null,8,["post","isOwner"])]),_:2},1024))),128))])):d("",!0),m.value==="media"?(a(),n("div",dt,[(a(!0),n(b,null,I(C.value,t=>(a(),f(y,{key:t.id},{default:_(()=>[r(M,{post:t,isOwner:u(o).state.userInfo.id==t.user_id,addFollowAction:!0,onSendWhisper:w,onHandleFollowAction:k},null,8,["post","isOwner"])]),_:2},1024))),128))])):d("",!0),m.value==="star"?(a(),n("div",mt,[(a(!0),n(b,null,I(S.value,t=>(a(),f(y,{key:t.id},{default:_(()=>[r(M,{post:t,isOwner:u(o).state.userInfo.id==t.user_id,addFollowAction:!0,onSendWhisper:w,onHandleFollowAction:k},null,8,["post","isOwner"])]),_:2},1024))),128))])):d("",!0)]))])),r(me,{show:L.value,user:ee.value,onSuccess:le},null,8,["show","user"])]),_:1})):d("",!0),c.value>0?(a(),f(he,{key:1,justify:"center"},{default:_(()=>[r(u(qe),{class:"load-more",slots:{complete:"没有更多泡泡了",error:"加载出错"},onInfinite:h[2]||(h[2]=t=>ue())},{spinner:_(()=>[p("div",ft,[P.value?d("",!0):(a(),f(pe,{key:0,size:14})),p("span",pt,O(P.value?"没有更多泡泡了":"加载更多"),1)])]),_:1})]),_:1})):d("",!0)])}}});const Qt=$e(ht,[["__scopeId","data-v-4727fe2e"]]);export{Qt as default};
diff --git a/web/dist/assets/Profile-5fc46d20.css b/web/dist/assets/Profile-5fc46d20.css
new file mode 100644
index 00000000..95a122d3
--- /dev/null
+++ b/web/dist/assets/Profile-5fc46d20.css
@@ -0,0 +1 @@
+.profile-baseinfo[data-v-4727fe2e]{display:flex;padding:16px}.profile-baseinfo .avatar[data-v-4727fe2e]{width:72px}.profile-baseinfo .base-info[data-v-4727fe2e]{position:relative;margin-left:12px;width:calc(100% - 84px)}.profile-baseinfo .base-info .username[data-v-4727fe2e]{line-height:16px;font-size:16px}.profile-baseinfo .base-info .userinfo[data-v-4727fe2e]{font-size:14px;line-height:14px;margin-top:10px;opacity:.75}.profile-baseinfo .base-info .userinfo .info-item[data-v-4727fe2e]{margin-right:12px}.profile-baseinfo .base-info .top-tag[data-v-4727fe2e]{transform:scale(.75)}.profile-tabs-wrap[data-v-4727fe2e]{padding:0 16px}.load-more[data-v-4727fe2e]{margin:20px}.load-more .load-more-wrap[data-v-4727fe2e]{display:flex;flex-direction:row;justify-content:center;align-items:center;gap:14px}.load-more .load-more-wrap .load-more-spinner[data-v-4727fe2e]{font-size:14px;opacity:.65}.dark .profile-wrap[data-v-4727fe2e],.dark .pagination-wrap[data-v-4727fe2e]{background-color:#101014bf}
diff --git a/web/dist/assets/Profile-6e748e2f.js b/web/dist/assets/Profile-6e748e2f.js
deleted file mode 100644
index 6b216f3f..00000000
--- a/web/dist/assets/Profile-6e748e2f.js
+++ /dev/null
@@ -1 +0,0 @@
-import{_ as fe}from"./whisper-7dcedd50.js";import{_ as he,a as ge}from"./post-item.vue_vue_type_style_index_0_lang-a5e9cab2.js";import{_ as ke}from"./post-skeleton-4d2b103e.js";import{_ as ye}from"./main-nav.vue_vue_type_style_index_0_lang-2982e04a.js";import{d as we,H as n,b as be,E as Pe,r as Ie,f as o,k as u,bf as _,q as d,w as c,Y as m,e,j as f,x as I,A as E,y as ae,F as y,u as w}from"./@vue-a481fc63.js";import{u as Te}from"./vuex-44de225f.js";import{b as Me}from"./vue-router-e5a2430e.js";import{e as x,F as ze,_ as qe}from"./index-4a465428.js";import{W as xe}from"./v3-infinite-loading-2c58ec2f.js";import{F as Se,a as $e,o as Ce,M as Le,f as Be,g as Fe,I as Ne,k as Ve,G as De}from"./naive-ui-d8de3dda.js";import"./content-0e30acaf.js";import"./@vicons-7a4ef312.js";import"./paopao-video-player-2fe58954.js";import"./copy-to-clipboard-4ef7d3eb.js";import"./@babel-725317a4.js";import"./toggle-selection-93f4ad84.js";import"./vooks-6d99783e.js";import"./evtd-b614532e.js";import"./axios-4a70c6fc.js";import"./moment-2ab8298d.js";/* empty css */import"./seemly-76b7b838.js";import"./vueuc-39372edb.js";import"./@css-render-7124a1a5.js";import"./vdirs-b0483831.js";import"./@juggle-41516555.js";import"./css-render-6a5c5852.js";import"./@emotion-8a8e73f6.js";import"./lodash-es-8412e618.js";import"./treemate-25c27bff.js";import"./async-validator-dee29e8b.js";import"./date-fns-975a2d8f.js";const Ue={class:"profile-baseinfo"},We={class:"avatar"},je={class:"base-info"},Ee={class:"username"},He={class:"userinfo"},Re={class:"info-item"},Ae={class:"info-item"},Ge={class:"userinfo"},Ye={class:"info-item"},Je={class:"info-item"},Ke={key:0,class:"skeleton-wrap"},Oe={key:1},Qe={key:0,class:"empty-wrap"},Xe={key:1},Ze={key:0},ea={key:1},aa={key:2},ta={key:3},sa={key:4},la={key:2},oa={key:0},na={key:1},ua={key:2},ia={key:3},ra={key:4},ca={class:"load-more-wrap"},va={class:"load-more-spinner"},_a=we({__name:"Profile",setup(ma){const i=Te(),T=Me(),v=n(!1),b=n(!1),s=n([]),S=n([]),$=n([]),C=n([]),L=n([]),B=n([]),p=n("post"),H=n(+T.query.p||1),R=n(1),A=n(1),G=n(1),Y=n(1),t=n(+T.query.p||1),h=n(20),r=n(0),J=n(0),K=n(0),O=n(0),Q=n(0),X=n(0),F=n(!1),Z=n({id:0,avatar:"",username:"",nickname:"",is_admin:!1,is_friend:!0,is_following:!1,created_on:0,follows:0,followings:0,status:1}),g=a=>{Z.value=a,F.value=!0},te=()=>{F.value=!1},N=()=>{switch(p.value){case"post":V();break;case"comment":D();break;case"highlight":U();break;case"media":W();break;case"star":j();break}},V=()=>{v.value=!0,x({username:i.state.userInfo.username,style:"post",page:t.value,page_size:h.value}).then(a=>{v.value=!1,a.list.length===0&&(b.value=!0),t.value>1?s.value=s.value.concat(a.list):(s.value=a.list||[],window.scrollTo(0,0)),r.value=Math.ceil(a.pager.total_rows/h.value),S.value=s.value,J.value=r.value}).catch(a=>{s.value=[],t.value>1&&t.value--,v.value=!1})},D=()=>{v.value=!0,x({username:i.state.userInfo.username,style:"comment",page:t.value,page_size:h.value}).then(a=>{v.value=!1,a.list.length===0&&(b.value=!0),t.value>1?s.value=s.value.concat(a.list):(s.value=a.list||[],window.scrollTo(0,0)),r.value=Math.ceil(a.pager.total_rows/h.value),$.value=s.value,K.value=r.value}).catch(a=>{s.value=[],t.value>1&&t.value--,v.value=!1})},U=()=>{v.value=!0,x({username:i.state.userInfo.username,style:"highlight",page:t.value,page_size:h.value}).then(a=>{v.value=!1,a.list.length===0&&(b.value=!0),t.value>1?s.value=s.value.concat(a.list):(s.value=a.list||[],window.scrollTo(0,0)),r.value=Math.ceil(a.pager.total_rows/h.value),C.value=s.value,O.value=r.value}).catch(a=>{s.value=[],t.value>1&&t.value--,v.value=!1})},W=()=>{v.value=!0,x({username:i.state.userInfo.username,style:"media",page:t.value,page_size:h.value}).then(a=>{v.value=!1,a.list.length===0&&(b.value=!0),t.value>1?s.value=s.value.concat(a.list):(s.value=a.list||[],window.scrollTo(0,0)),r.value=Math.ceil(a.pager.total_rows/h.value),L.value=s.value,Q.value=r.value}).catch(a=>{s.value=[],t.value>1&&t.value--,v.value=!1})},j=()=>{v.value=!0,x({username:i.state.userInfo.username,style:"star",page:t.value,page_size:h.value}).then(a=>{v.value=!1,a.list.length===0&&(b.value=!0),t.value>1?s.value=s.value.concat(a.list):(s.value=a.list||[],window.scrollTo(0,0)),r.value=Math.ceil(a.pager.total_rows/h.value),B.value=s.value,X.value=r.value}).catch(a=>{s.value=[],t.value>1&&t.value--,v.value=!1})},se=a=>{switch(p.value=a,p.value){case"post":s.value=S.value,t.value=H.value,r.value=J.value,V();break;case"comment":s.value=$.value,t.value=R.value,r.value=K.value,D();break;case"highlight":s.value=C.value,t.value=A.value,r.value=O.value,U();break;case"media":s.value=L.value,t.value=G.value,r.value=Q.value,W();break;case"star":s.value=B.value,t.value=Y.value,r.value=X.value,j();break}},le=()=>{switch(p.value){case"post":H.value=t.value,V();break;case"comment":R.value=t.value,D();break;case"highlight":A.value=t.value,U();break;case"media":G.value=t.value,W();break;case"star":Y.value=t.value,j();break}},oe=()=>{t.value{N()}),Pe(()=>({path:T.path,query:T.query,refresh:i.state.refresh}),(a,P)=>{if(a.refresh!==P.refresh){t.value=+T.query.p||1,setTimeout(()=>{N()},0);return}P.path!=="/post"&&a.path==="/profile"&&(t.value=+T.query.p||1,setTimeout(()=>{N()},0))}),(a,P)=>{const ne=ye,ue=Ce,ie=Le,ee=Ie("router-link"),M=Be,re=Fe,ce=ke,ve=Ne,z=he,k=De,q=ge,_e=fe,me=Se,pe=Ve,de=$e;return e(),o("div",null,[u(ne,{title:"主页"}),_(i).state.userInfo.id>0?(e(),d(me,{key:0,class:"main-content-wrap profile-wrap",bordered:""},{default:c(()=>[f("div",Ue,[f("div",We,[u(ue,{size:72,src:_(i).state.userInfo.avatar},null,8,["src"])]),f("div",je,[f("div",Ee,[f("strong",null,I(_(i).state.userInfo.nickname),1),f("span",null," @"+I(_(i).state.userInfo.username),1),_(i).state.userInfo.is_admin?(e(),d(ie,{key:0,class:"top-tag",type:"error",size:"small",round:""},{default:c(()=>[E(" 管理员 ")]),_:1})):m("",!0)]),f("div",He,[f("span",Re,"UID. "+I(_(i).state.userInfo.id),1),f("span",Ae,I(_(ze)(_(i).state.userInfo.created_on))+" 加入",1)]),f("div",Ge,[f("span",Ye,[u(ee,{onClick:P[0]||(P[0]=ae(()=>{},["stop"])),class:"following-link",to:{name:"following",query:{s:_(i).state.userInfo.username,n:_(i).state.userInfo.nickname,t:"follows"}}},{default:c(()=>[E(" 关注 "+I(_(i).state.userInfo.follows),1)]),_:1},8,["to"])]),f("span",Je,[u(ee,{onClick:P[1]||(P[1]=ae(()=>{},["stop"])),class:"following-link",to:{name:"following",query:{s:_(i).state.userInfo.username,n:_(i).state.userInfo.nickname,t:"followings"}}},{default:c(()=>[E(" 粉丝 "+I(_(i).state.userInfo.followings),1)]),_:1},8,["to"])])])])]),u(re,{class:"profile-tabs-wrap",type:"line",animated:"","onUpdate:value":se},{default:c(()=>[u(M,{name:"post",tab:"泡泡"}),u(M,{name:"comment",tab:"评论"}),u(M,{name:"highlight",tab:"亮点"}),u(M,{name:"media",tab:"图文"}),u(M,{name:"star",tab:"喜欢"})]),_:1}),v.value&&s.value.length===0?(e(),o("div",Ke,[u(ce,{num:h.value},null,8,["num"])])):(e(),o("div",Oe,[s.value.length===0?(e(),o("div",Qe,[u(ve,{size:"large",description:"暂无数据"})])):m("",!0),_(i).state.desktopModelShow?(e(),o("div",Xe,[p.value==="post"?(e(),o("div",Ze,[(e(!0),o(y,null,w(S.value,l=>(e(),d(k,{key:l.id},{default:c(()=>[u(z,{post:l,onSendWhisper:g},null,8,["post"])]),_:2},1024))),128))])):m("",!0),p.value==="comment"?(e(),o("div",ea,[(e(!0),o(y,null,w($.value,l=>(e(),d(k,{key:l.id},{default:c(()=>[u(z,{post:l,onSendWhisper:g},null,8,["post"])]),_:2},1024))),128))])):m("",!0),p.value==="highlight"?(e(),o("div",aa,[(e(!0),o(y,null,w(C.value,l=>(e(),d(k,{key:l.id},{default:c(()=>[u(z,{post:l,onSendWhisper:g},null,8,["post"])]),_:2},1024))),128))])):m("",!0),p.value==="media"?(e(),o("div",ta,[(e(!0),o(y,null,w(L.value,l=>(e(),d(k,{key:l.id},{default:c(()=>[u(z,{post:l,onSendWhisper:g},null,8,["post"])]),_:2},1024))),128))])):m("",!0),p.value==="star"?(e(),o("div",sa,[(e(!0),o(y,null,w(B.value,l=>(e(),d(k,{key:l.id},{default:c(()=>[u(z,{post:l,onSendWhisper:g},null,8,["post"])]),_:2},1024))),128))])):m("",!0)])):(e(),o("div",la,[p.value==="post"?(e(),o("div",oa,[(e(!0),o(y,null,w(S.value,l=>(e(),d(k,{key:l.id},{default:c(()=>[u(q,{post:l,onSendWhisper:g},null,8,["post"])]),_:2},1024))),128))])):m("",!0),p.value==="comment"?(e(),o("div",na,[(e(!0),o(y,null,w($.value,l=>(e(),d(k,{key:l.id},{default:c(()=>[u(q,{post:l,onSendWhisper:g},null,8,["post"])]),_:2},1024))),128))])):m("",!0),p.value==="highlight"?(e(),o("div",ua,[(e(!0),o(y,null,w(C.value,l=>(e(),d(k,{key:l.id},{default:c(()=>[u(q,{post:l,onSendWhisper:g},null,8,["post"])]),_:2},1024))),128))])):m("",!0),p.value==="media"?(e(),o("div",ia,[(e(!0),o(y,null,w(L.value,l=>(e(),d(k,{key:l.id},{default:c(()=>[u(q,{post:l,onSendWhisper:g},null,8,["post"])]),_:2},1024))),128))])):m("",!0),p.value==="star"?(e(),o("div",ra,[(e(!0),o(y,null,w(B.value,l=>(e(),d(k,{key:l.id},{default:c(()=>[u(q,{post:l,onSendWhisper:g},null,8,["post"])]),_:2},1024))),128))])):m("",!0)]))])),u(_e,{show:F.value,user:Z.value,onSuccess:te},null,8,["show","user"])]),_:1})):m("",!0),r.value>0?(e(),d(de,{key:1,justify:"center"},{default:c(()=>[u(_(xe),{class:"load-more",slots:{complete:"没有更多泡泡了",error:"加载出错"},onInfinite:P[2]||(P[2]=l=>oe())},{spinner:c(()=>[f("div",ca,[b.value?m("",!0):(e(),d(pe,{key:0,size:14})),f("span",va,I(b.value?"没有更多泡泡了":"加载更多"),1)])]),_:1})]),_:1})):m("",!0)])}}});const Ga=qe(_a,[["__scopeId","data-v-756dadd0"]]);export{Ga as default};
diff --git a/web/dist/assets/Setting-bde8e499.js b/web/dist/assets/Setting-439150e0.js
similarity index 69%
rename from web/dist/assets/Setting-bde8e499.js
rename to web/dist/assets/Setting-439150e0.js
index 7028fcd1..2d2cfdde 100644
--- a/web/dist/assets/Setting-bde8e499.js
+++ b/web/dist/assets/Setting-439150e0.js
@@ -1 +1 @@
-import{_ as we}from"./main-nav.vue_vue_type_style_index_0_lang-2982e04a.js";import{d as ye,H as d,R as Q,b as ke,f as g,k as t,w as s,q as b,Y as _,e as r,j as m,bf as u,A as p,x as R,O as be,D as Ce,Z as q,y as A,$ as Ie,a0 as $e}from"./@vue-a481fc63.js";import{u as Pe}from"./vuex-44de225f.js";import{a0 as X,a1 as Se,a2 as Ue,a3 as Re,a4 as qe,a5 as Ae,a6 as Be,_ as Ne}from"./index-4a465428.js";import{Y as ze}from"./@vicons-7a4ef312.js";import{h as Ke,o as xe,e as De,B as Fe,b as je,j as Oe,S as Te,$ as Ve,K as Ee,a0 as Le,a1 as Me,d as We}from"./naive-ui-d8de3dda.js";import"./vue-router-e5a2430e.js";import"./vooks-6d99783e.js";import"./evtd-b614532e.js";import"./axios-4a70c6fc.js";import"./moment-2ab8298d.js";/* empty css */import"./seemly-76b7b838.js";import"./vueuc-39372edb.js";import"./@css-render-7124a1a5.js";import"./vdirs-b0483831.js";import"./@juggle-41516555.js";import"./css-render-6a5c5852.js";import"./@emotion-8a8e73f6.js";import"./lodash-es-8412e618.js";import"./treemate-25c27bff.js";import"./async-validator-dee29e8b.js";import"./date-fns-975a2d8f.js";const j=B=>(Ie("data-v-a681720e"),B=B(),$e(),B),Ye={class:"base-line avatar"},Ge={class:"base-line"},He=j(()=>m("span",{class:"base-label"},"昵称",-1)),Je={key:0},Ze={class:"base-line"},Qe=j(()=>m("span",{class:"base-label"},"用户名",-1)),Xe={key:0},et={key:1},tt=j(()=>m("br",null,null,-1)),at={key:2,class:"phone-bind-wrap"},st={class:"captcha-img-wrap"},nt={class:"captcha-img"},ot=["src"],lt={class:"form-submit-wrap"},rt={key:0},it={key:1},ut=j(()=>m("br",null,null,-1)),dt={key:2,class:"phone-bind-wrap"},pt={class:"captcha-img-wrap"},ct={class:"captcha-img"},_t=["src"],mt={class:"form-submit-wrap"},vt={key:1,class:"phone-bind-wrap"},ft={class:"form-submit-wrap"},gt=ye({__name:"Setting",setup(B){const ee="/v1/attachment",te="Bearer "+localStorage.getItem("PAOPAO_TOKEN"),N=d("public/avatar"),$="true".toLowerCase()==="true",ae="false".toLowerCase()==="true",o=Pe(),P=d(!1),z=d(!1),K=d(!1),M=d(),W=d(),C=d(!1),x=d(!1),S=d(!1),U=d(!1),I=d(60),y=d(!1),k=d(!1),Y=d(),G=d(),H=d(),J=d(),a=Q({id:"",b64s:"",imgCaptcha:"",phone:"",phone_captcha:"",password:"",old_password:"",reenteredPassword:""}),i=Q({id:"",b64s:"",imgCaptcha:"",activate_code:""}),se=async n=>{var e,v;return N.value==="public/avatar"&&!["image/png","image/jpg","image/jpeg"].includes((e=n.file.file)==null?void 0:e.type)?(window.$message.warning("头像仅允许 png/jpg 格式"),!1):N.value==="image"&&((v=n.file.file)==null?void 0:v.size)>1048576?(window.$message.warning("头像大小不能超过1MB"),!1):!0},ne=({file:n,event:e})=>{var v;try{let f=JSON.parse((v=e.target)==null?void 0:v.response);f.code===0&&N.value==="public/avatar"&&Se({avatar:f.data.content}).then(c=>{var D;window.$message.success("头像更新成功"),(D=M.value)==null||D.clear(),o.commit("updateUserinfo",{...o.state.userInfo,avatar:f.data.content})}).catch(c=>{console.log(c)})}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=J.value)==null||n.validate({trigger:"password-input"}))},ie=n=>{var e;n.preventDefault(),(e=H.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=Y.value)==null||e.validate(v=>{v||(z.value=!0,Re({phone:a.phone,captcha:a.phone_captcha}).then(f=>{z.value=!1,y.value=!1,window.$message.success("绑定成功"),o.commit("updateUserinfo",{...o.state.userInfo,phone:a.phone}),a.id="",a.b64s="",a.imgCaptcha="",a.phone="",a.phone_captcha=""}).catch(f=>{z.value=!1}))})},de=n=>{var e;n.preventDefault(),(e=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&&T()}))})},O=()=>{X().then(n=>{a.id=n.id,a.b64s=n.b64s}).catch(n=>{console.log(n)})},T=()=>{X().then(n=>{i.id=n.id,i.b64s=n.b64s}).catch(n=>{console.log(n)})},pe=()=>{Ae({nickname:o.state.userInfo.nickname||""}).then(n=>{C.value=!1,window.$message.success("昵称修改成功")}).catch(n=>{C.value=!0})},ce=()=>{if(!(I.value>0&&U.value)){if(a.imgCaptcha===""){window.$message.warning("请输入图片验证码");return}P.value=!0,Be({phone:a.phone,img_captcha:a.imgCaptcha,img_captcha_id:a.id}).then(n=>{U.value=!0,P.value=!1,window.$message.success("发送成功");let e=setInterval(()=>{I.value--,I.value===0&&(clearInterval(e),I.value=60,U.value=!1)},1e3)}).catch(n=>{P.value=!1,n.code===20012&&O(),console.log(n)})}},_e={phone:[{required:!0,message:"请输入手机号",trigger:["input"],validator:(n,e)=>/^[1]+[3-9]{1}\d{9}$/.test(e)}],phone_captcha:[{required:!0,message:"请输入手机验证码"}]},me={activate_code:[{required:!0,message:"请输入激活码",trigger:["input"],validator:(n,e)=>/\d{6}$/.test(e)}]},ve={password:[{required:!0,message:"请输入新密码"}],old_password:[{required:!0,message:"请输入旧密码"}],reenteredPassword:[{required:!0,message:"请再次输入密码",trigger:["input","blur"]},{validator:oe,message:"两次密码输入不一致",trigger:"input"},{validator:le,message:"两次密码输入不一致",trigger:["blur","password-input"]}]},fe=()=>{C.value=!0,setTimeout(()=>{var n;(n=W.value)==null||n.focus()},30)};return ke(()=>{o.state.userInfo.id===0&&(o.commit("triggerAuth",!0),o.commit("triggerAuthKey","signin")),O(),T()}),(n,e)=>{const v=we,f=xe,c=De,D=Fe,h=je,ge=Oe,F=Ke,Z=Te,w=Ve,he=Ee,V=Le,E=Me,L=We;return r(),g("div",null,[t(v,{title:"设置",theme:""}),t(F,{title:"基本信息",size:"small",class:"setting-card"},{default:s(()=>[m("div",Ye,[t(f,{class:"avatar-img",size:80,src:u(o).state.userInfo.avatar},null,8,["src"]),!$||$&&u(o).state.userInfo.phone&&u(o).state.userInfo.phone.length>0?(r(),b(D,{key:0,ref_key:"avatarRef",ref:M,action:ee,headers:{Authorization:te},data:{type:N.value},onBeforeUpload:se,onFinish:ne},{default:s(()=>[t(c,{size:"small"},{default:s(()=>[p("更改头像")]),_:1})]),_:1},8,["headers","data"])):_("",!0)]),m("div",Ge,[He,C.value?_("",!0):(r(),g("div",Je,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:pe,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(c,{key:1,quaternary:"",round:"",type:"success",size:"small",onClick:fe},{icon:s(()=>[t(ge,null,{default:s(()=>[t(u(ze))]),_:1})]),_:1})):_("",!0)]),m("div",Ze,[Qe,p(" @"+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",Xe,[p(R(u(o).state.userInfo.phone)+" ",1),!y.value&&u(o).state.userInfo.status==1?(r(),b(c,{key:0,quaternary:"",round:"",type:"success",onClick:e[1]||(e[1]=l=>y.value=!0)},{default:s(()=>[p(" 换绑手机 ")]),_:1})):_("",!0)])):(r(),g("div",et,[t(Z,{title:"手机绑定提示",type:"warning"},{default:s(()=>[p(" 成功绑定手机后,才能进行换头像、发动态、回复等交互~"),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:Y,model:a,rules:_e},{default:s(()=>[t(w,{path:"phone",label:"手机号"},{default:s(()=>[t(h,{value:a.phone,"onUpdate:value":e[3]||(e[3]=l=>a.phone=l.trim()),placeholder:"请输入中国大陆手机号",onKeydown:e[4]||(e[4]=q(A(()=>{},["prevent"]),["enter"]))},null,8,["value"])]),_:1}),t(w,{path:"img_captcha",label:"图形验证码"},{default:s(()=>[m("div",st,[t(h,{value:a.imgCaptcha,"onUpdate:value":e[5]||(e[5]=l=>a.imgCaptcha=l),placeholder:"请输入图形验证码后获取验证码"},null,8,["value"]),m("div",nt,[a.b64s?(r(),g("img",{key:0,src:a.b64s,onClick:O},null,8,ot)):_("",!0)])])]),_:1}),t(w,{path:"phone_captcha",label:"短信验证码"},{default:s(()=>[t(he,null,{default:s(()=>[t(h,{value:a.phone_captcha,"onUpdate:value":e[6]||(e[6]=l=>a.phone_captcha=l),placeholder:"请输入收到的短信验证码"},null,8,["value"]),t(c,{type:"primary",ghost:"",disabled:U.value,loading:P.value,onClick:ce},{default:s(()=>[p(R(I.value>0&&U.value?I.value+"s后重新发送":"发送验证码"),1)]),_:1},8,["disabled","loading"])]),_:1})]),_:1}),t(E,{gutter:[0,24]},{default:s(()=>[t(V,{span:24},{default:s(()=>[m("div",lt,[t(c,{quaternary:"",round:"",onClick:e[7]||(e[7]=l=>y.value=!1)},{default:s(()=>[p(" 取消 ")]),_:1}),t(c,{secondary:"",round:"",type:"primary",loading:z.value,onClick:ue},{default:s(()=>[p(" 绑定 ")]),_: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,[p(R(u(o).state.userInfo.activation)+" ",1),k.value?_("",!0):(r(),b(c,{key:0,quaternary:"",round:"",type:"success",onClick:e[8]||(e[8]=l=>k.value=!0)},{default:s(()=>[p(" 重新激活 ")]),_:1}))])):(r(),g("div",it,[t(Z,{title:"激活码激活提示",type:"warning"},{default:s(()=>[p(" 成功激活后后,才能发(公开/好友可见)动态、回复~"),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(A(()=>{},["prevent"]),["enter"]))},null,8,["value"])]),_:1}),t(w,{path:"img_captcha",label:"图形验证码"},{default:s(()=>[m("div",pt,[t(h,{value:i.imgCaptcha,"onUpdate:value":e[12]||(e[12]=l=>i.imgCaptcha=l),placeholder:"请输入图形验证码后获取验证码"},null,8,["value"]),m("div",ct,[i.b64s?(r(),g("img",{key:0,src:i.b64s,onClick:T},null,8,_t)):_("",!0)])])]),_:1}),t(E,{gutter:[0,24]},{default:s(()=>[t(V,{span:24},{default:s(()=>[m("div",mt,[t(c,{quaternary:"",round:"",onClick:e[13]||(e[13]=l=>k.value=!1)},{default:s(()=>[p(" 取消 ")]),_:1}),t(c,{secondary:"",round:"",type:"primary",loading:K.value,onClick:de},{default:s(()=>[p(" 激活 ")]),_:1},8,["loading"])])]),_:1})]),_:1})]),_:1},8,["model"])])):_("",!0)]),_:1})):_("",!0),t(F,{title:"账户安全",size:"small",class:"setting-card"},{default:s(()=>[p(" 您已设置密码 "),S.value?_("",!0):(r(),b(c,{key:0,quaternary:"",round:"",type:"success",onClick:e[14]||(e[14]=l=>S.value=!0)},{default:s(()=>[p(" 重置密码 ")]),_:1})),S.value?(r(),g("div",vt,[t(L,{ref_key:"formRef",ref:H,model:a,rules:ve},{default:s(()=>[t(w,{path:"old_password",label:"旧密码"},{default:s(()=>[t(h,{value:a.old_password,"onUpdate:value":e[15]||(e[15]=l=>a.old_password=l),type:"password",placeholder:"请输入当前密码",onKeydown:e[16]||(e[16]=q(A(()=>{},["prevent"]),["enter"]))},null,8,["value"])]),_:1}),t(w,{path:"password",label:"新密码"},{default:s(()=>[t(h,{value:a.password,"onUpdate:value":e[17]||(e[17]=l=>a.password=l),type:"password",placeholder:"请输入新密码",onInput:re,onKeydown:e[18]||(e[18]=q(A(()=>{},["prevent"]),["enter"]))},null,8,["value"])]),_:1}),t(w,{ref_key:"rPasswordFormItemRef",ref:J,first:"",path:"reenteredPassword",label:"重复密码"},{default:s(()=>[t(h,{value:a.reenteredPassword,"onUpdate:value":e[19]||(e[19]=l=>a.reenteredPassword=l),disabled:!a.password,type:"password",placeholder:"请再次输入密码",onKeydown:e[20]||(e[20]=q(A(()=>{},["prevent"]),["enter"]))},null,8,["value","disabled"])]),_:1},512),t(E,{gutter:[0,24]},{default:s(()=>[t(V,{span:24},{default:s(()=>[m("div",ft,[t(c,{quaternary:"",round:"",onClick:e[21]||(e[21]=l=>S.value=!1)},{default:s(()=>[p(" 取消 ")]),_:1}),t(c,{secondary:"",round:"",type:"primary",loading:x.value,onClick:ie},{default:s(()=>[p(" 更新 ")]),_:1},8,["loading"])])]),_:1})]),_:1})]),_:1},8,["model"])])):_("",!0)]),_:1})])}}});const Tt=Ne(gt,[["__scopeId","data-v-a681720e"]]);export{Tt as default};
+import{_ as we}from"./main-nav.vue_vue_type_style_index_0_lang-93352cc4.js";import{d as ye,H as d,R as Q,b as ke,f as g,k as t,w as s,q as b,Y as _,e as r,j as m,bf as u,A as p,x as S,O as be,D as Ce,Z as q,y as A,$ as Ie,a0 as $e}from"./@vue-a481fc63.js";import{u as Pe}from"./vuex-44de225f.js";import{a1 as X,a2 as Ue,a3 as Re,a4 as Se,a5 as qe,a6 as Ae,a7 as Be,_ as Ne}from"./index-daff1b26.js";import{_ as ze}from"./@vicons-c265fba6.js";import{h as xe,o as De,e as Ke,B as Fe,b as Te,j as je,T as Oe,$ as Ve,L as Ee,a0 as Le,a1 as Me,d as We}from"./naive-ui-defd0b2d.js";import"./vue-router-e5a2430e.js";import"./vooks-6d99783e.js";import"./evtd-b614532e.js";import"./axios-4a70c6fc.js";import"./moment-2ab8298d.js";/* empty css */import"./seemly-76b7b838.js";import"./vueuc-39372edb.js";import"./@css-render-7124a1a5.js";import"./vdirs-b0483831.js";import"./@juggle-41516555.js";import"./css-render-6a5c5852.js";import"./@emotion-8a8e73f6.js";import"./lodash-es-8412e618.js";import"./treemate-25c27bff.js";import"./async-validator-dee29e8b.js";import"./date-fns-975a2d8f.js";const T=B=>(Ie("data-v-a681720e"),B=B(),$e(),B),Ge={class:"base-line avatar"},He={class:"base-line"},Je=T(()=>m("span",{class:"base-label"},"昵称",-1)),Ye={key:0},Ze={class:"base-line"},Qe=T(()=>m("span",{class:"base-label"},"用户名",-1)),Xe={key:0},et={key:1},tt=T(()=>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=T(()=>m("br",null,null,-1)),dt={key:2,class:"phone-bind-wrap"},pt={class:"captcha-img-wrap"},ct={class:"captcha-img"},_t=["src"],mt={class:"form-submit-wrap"},vt={key:1,class:"phone-bind-wrap"},ft={class:"form-submit-wrap"},gt=ye({__name:"Setting",setup(B){const ee="/v1/attachment",te="Bearer "+localStorage.getItem("PAOPAO_TOKEN"),N=d("public/avatar"),$="true".toLowerCase()==="true",ae="false".toLowerCase()==="true",o=Pe(),P=d(!1),z=d(!1),x=d(!1),M=d(),W=d(),C=d(!1),D=d(!1),U=d(!1),R=d(!1),I=d(60),y=d(!1),k=d(!1),G=d(),H=d(),J=d(),Y=d(),a=Q({id:"",b64s:"",imgCaptcha:"",phone:"",phone_captcha:"",password:"",old_password:"",reenteredPassword:""}),i=Q({id:"",b64s:"",imgCaptcha:"",activate_code:""}),se=async n=>{var e,v;return N.value==="public/avatar"&&!["image/png","image/jpg","image/jpeg"].includes((e=n.file.file)==null?void 0:e.type)?(window.$message.warning("头像仅允许 png/jpg 格式"),!1):N.value==="image"&&((v=n.file.file)==null?void 0:v.size)>1048576?(window.$message.warning("头像大小不能超过1MB"),!1):!0},ne=({file:n,event:e})=>{var v;try{let f=JSON.parse((v=e.target)==null?void 0:v.response);f.code===0&&N.value==="public/avatar"&&Ue({avatar:f.data.content}).then(c=>{var K;window.$message.success("头像更新成功"),(K=M.value)==null||K.clear(),o.commit("updateUserinfo",{...o.state.userInfo,avatar:f.data.content})}).catch(c=>{console.log(c)})}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=Y.value)==null||n.validate({trigger:"password-input"}))},ie=n=>{var e;n.preventDefault(),(e=J.value)==null||e.validate(v=>{v||(D.value=!0,Re({password:a.password,old_password:a.old_password}).then(f=>{D.value=!1,U.value=!1,window.$message.success("密码重置成功"),o.commit("userLogout"),o.commit("triggerAuth",!0),o.commit("triggerAuthKey","signin")}).catch(f=>{D.value=!1}))})},ue=n=>{var e;n.preventDefault(),(e=G.value)==null||e.validate(v=>{v||(z.value=!0,Se({phone:a.phone,captcha:a.phone_captcha}).then(f=>{z.value=!1,y.value=!1,window.$message.success("绑定成功"),o.commit("updateUserinfo",{...o.state.userInfo,phone:a.phone}),a.id="",a.b64s="",a.imgCaptcha="",a.phone="",a.phone_captcha=""}).catch(f=>{z.value=!1}))})},de=n=>{var e;n.preventDefault(),(e=H.value)==null||e.validate(v=>{if(i.imgCaptcha===""){window.$message.warning("请输入图片验证码");return}P.value=!0,v||(x.value=!0,qe({activate_code:i.activate_code,captcha_id:i.id,imgCaptcha:i.imgCaptcha}).then(f=>{x.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=>{x.value=!1,f.code===20012&&O()}))})},j=()=>{X().then(n=>{a.id=n.id,a.b64s=n.b64s}).catch(n=>{console.log(n)})},O=()=>{X().then(n=>{i.id=n.id,i.b64s=n.b64s}).catch(n=>{console.log(n)})},pe=()=>{Ae({nickname:o.state.userInfo.nickname||""}).then(n=>{C.value=!1,window.$message.success("昵称修改成功")}).catch(n=>{C.value=!0})},ce=()=>{if(!(I.value>0&&R.value)){if(a.imgCaptcha===""){window.$message.warning("请输入图片验证码");return}P.value=!0,Be({phone:a.phone,img_captcha:a.imgCaptcha,img_captcha_id:a.id}).then(n=>{R.value=!0,P.value=!1,window.$message.success("发送成功");let e=setInterval(()=>{I.value--,I.value===0&&(clearInterval(e),I.value=60,R.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(),O()}),(n,e)=>{const v=we,f=De,c=Ke,K=Fe,h=Te,ge=je,F=xe,Z=Oe,w=Ve,he=Ee,V=Le,E=Me,L=We;return r(),g("div",null,[t(v,{title:"设置",theme:""}),t(F,{title:"基本信息",size:"small",class:"setting-card"},{default:s(()=>[m("div",Ge,[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(K,{key:0,ref_key:"avatarRef",ref:M,action:ee,headers:{Authorization:te},data:{type:N.value},onBeforeUpload:se,onFinish:ne},{default:s(()=>[t(c,{size:"small"},{default:s(()=>[p("更改头像")]),_:1})]),_:1},8,["headers","data"])):_("",!0)]),m("div",He,[Je,C.value?_("",!0):(r(),g("div",Ye,S(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:pe,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(c,{key:1,quaternary:"",round:"",type:"success",size:"small",onClick:fe},{icon:s(()=>[t(ge,null,{default:s(()=>[t(u(ze))]),_:1})]),_:1})):_("",!0)]),m("div",Ze,[Qe,p(" @"+S(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",Xe,[p(S(u(o).state.userInfo.phone)+" ",1),!y.value&&u(o).state.userInfo.status==1?(r(),b(c,{key:0,quaternary:"",round:"",type:"success",onClick:e[1]||(e[1]=l=>y.value=!0)},{default:s(()=>[p(" 换绑手机 ")]),_:1})):_("",!0)])):(r(),g("div",et,[t(Z,{title:"手机绑定提示",type:"warning"},{default:s(()=>[p(" 成功绑定手机后,才能进行换头像、发动态、回复等交互~"),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:G,model:a,rules:_e},{default:s(()=>[t(w,{path:"phone",label:"手机号"},{default:s(()=>[t(h,{value:a.phone,"onUpdate:value":e[3]||(e[3]=l=>a.phone=l.trim()),placeholder:"请输入中国大陆手机号",onKeydown:e[4]||(e[4]=q(A(()=>{},["prevent"]),["enter"]))},null,8,["value"])]),_:1}),t(w,{path:"img_captcha",label:"图形验证码"},{default:s(()=>[m("div",st,[t(h,{value:a.imgCaptcha,"onUpdate:value":e[5]||(e[5]=l=>a.imgCaptcha=l),placeholder:"请输入图形验证码后获取验证码"},null,8,["value"]),m("div",nt,[a.b64s?(r(),g("img",{key:0,src:a.b64s,onClick: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(c,{type:"primary",ghost:"",disabled:R.value,loading:P.value,onClick:ce},{default:s(()=>[p(S(I.value>0&&R.value?I.value+"s后重新发送":"发送验证码"),1)]),_:1},8,["disabled","loading"])]),_:1})]),_:1}),t(E,{gutter:[0,24]},{default:s(()=>[t(V,{span:24},{default:s(()=>[m("div",lt,[t(c,{quaternary:"",round:"",onClick:e[7]||(e[7]=l=>y.value=!1)},{default:s(()=>[p(" 取消 ")]),_:1}),t(c,{secondary:"",round:"",type:"primary",loading:z.value,onClick:ue},{default:s(()=>[p(" 绑定 ")]),_: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,[p(S(u(o).state.userInfo.activation)+" ",1),k.value?_("",!0):(r(),b(c,{key:0,quaternary:"",round:"",type:"success",onClick:e[8]||(e[8]=l=>k.value=!0)},{default:s(()=>[p(" 重新激活 ")]),_:1}))])):(r(),g("div",it,[t(Z,{title:"激活码激活提示",type:"warning"},{default:s(()=>[p(" 成功激活后后,才能发(公开/好友可见)动态、回复~"),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:H,model:i,rules:me},{default:s(()=>[t(w,{path:"activate_code",label:"激活码"},{default:s(()=>[t(h,{value:i.activate_code,"onUpdate:value":e[10]||(e[10]=l=>i.activate_code=l.trim()),placeholder:"请输入激活码",onKeydown:e[11]||(e[11]=q(A(()=>{},["prevent"]),["enter"]))},null,8,["value"])]),_:1}),t(w,{path:"img_captcha",label:"图形验证码"},{default:s(()=>[m("div",pt,[t(h,{value:i.imgCaptcha,"onUpdate:value":e[12]||(e[12]=l=>i.imgCaptcha=l),placeholder:"请输入图形验证码后获取验证码"},null,8,["value"]),m("div",ct,[i.b64s?(r(),g("img",{key:0,src:i.b64s,onClick:O},null,8,_t)):_("",!0)])])]),_:1}),t(E,{gutter:[0,24]},{default:s(()=>[t(V,{span:24},{default:s(()=>[m("div",mt,[t(c,{quaternary:"",round:"",onClick:e[13]||(e[13]=l=>k.value=!1)},{default:s(()=>[p(" 取消 ")]),_:1}),t(c,{secondary:"",round:"",type:"primary",loading:x.value,onClick:de},{default:s(()=>[p(" 激活 ")]),_:1},8,["loading"])])]),_:1})]),_:1})]),_:1},8,["model"])])):_("",!0)]),_:1})):_("",!0),t(F,{title:"账户安全",size:"small",class:"setting-card"},{default:s(()=>[p(" 您已设置密码 "),U.value?_("",!0):(r(),b(c,{key:0,quaternary:"",round:"",type:"success",onClick:e[14]||(e[14]=l=>U.value=!0)},{default:s(()=>[p(" 重置密码 ")]),_: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(A(()=>{},["prevent"]),["enter"]))},null,8,["value"])]),_:1}),t(w,{path:"password",label:"新密码"},{default:s(()=>[t(h,{value:a.password,"onUpdate:value":e[17]||(e[17]=l=>a.password=l),type:"password",placeholder:"请输入新密码",onInput:re,onKeydown:e[18]||(e[18]=q(A(()=>{},["prevent"]),["enter"]))},null,8,["value"])]),_:1}),t(w,{ref_key:"rPasswordFormItemRef",ref:Y,first:"",path:"reenteredPassword",label:"重复密码"},{default:s(()=>[t(h,{value:a.reenteredPassword,"onUpdate:value":e[19]||(e[19]=l=>a.reenteredPassword=l),disabled:!a.password,type:"password",placeholder:"请再次输入密码",onKeydown:e[20]||(e[20]=q(A(()=>{},["prevent"]),["enter"]))},null,8,["value","disabled"])]),_:1},512),t(E,{gutter:[0,24]},{default:s(()=>[t(V,{span:24},{default:s(()=>[m("div",ft,[t(c,{quaternary:"",round:"",onClick:e[21]||(e[21]=l=>U.value=!1)},{default:s(()=>[p(" 取消 ")]),_:1}),t(c,{secondary:"",round:"",type:"primary",loading:D.value,onClick:ie},{default:s(()=>[p(" 更新 ")]),_:1},8,["loading"])])]),_:1})]),_:1})]),_:1},8,["model"])])):_("",!0)]),_:1})])}}});const Ot=Ne(gt,[["__scopeId","data-v-a681720e"]]);export{Ot as default};
diff --git a/web/dist/assets/Topic-a63673d1.js b/web/dist/assets/Topic-9f150caf.js
similarity index 66%
rename from web/dist/assets/Topic-a63673d1.js
rename to web/dist/assets/Topic-9f150caf.js
index 0e212094..79fdbc7b 100644
--- a/web/dist/assets/Topic-a63673d1.js
+++ b/web/dist/assets/Topic-9f150caf.js
@@ -1 +1 @@
-import{A as $,B as M,C as O,D as x,_ as z}from"./index-4a465428.js";import{x as D}from"./@vicons-7a4ef312.js";import{d as F,H as i,c as A,b as q,r as U,e as c,f as _,k as n,w as s,q as b,A as B,x as f,Y as u,bf as h,E as j,al as H,F as Y,u as G}from"./@vue-a481fc63.js";import{o as J,M as C,j as K,e as P,O as Q,L as R,F as W,f as X,g as Z,a as ee,k as oe}from"./naive-ui-d8de3dda.js";import{_ as te}from"./main-nav.vue_vue_type_style_index_0_lang-2982e04a.js";import{u as ne}from"./vuex-44de225f.js";import"./vue-router-e5a2430e.js";import"./axios-4a70c6fc.js";import"./moment-2ab8298d.js";/* empty css */import"./seemly-76b7b838.js";import"./vueuc-39372edb.js";import"./evtd-b614532e.js";import"./@css-render-7124a1a5.js";import"./vooks-6d99783e.js";import"./vdirs-b0483831.js";import"./@juggle-41516555.js";import"./css-render-6a5c5852.js";import"./@emotion-8a8e73f6.js";import"./lodash-es-8412e618.js";import"./treemate-25c27bff.js";import"./async-validator-dee29e8b.js";import"./date-fns-975a2d8f.js";const se={key:0,class:"tag-item"},ae={key:0,class:"tag-quote"},ce={key:1,class:"tag-quote tag-follow"},le={key:0,class:"options"},ie=F({__name:"tag-item",props:{tag:{},showAction:{type:Boolean},checkFollowing:{type:Boolean}},setup(T){const t=T,r=i(!1),m=A(()=>{let e=[];return t.tag.is_following===0?e.push({label:"关注",key:"follow"}):(t.tag.is_top===0?e.push({label:"置顶",key:"stick"}):e.push({label:"取消置顶",key:"unstick"}),e.push({label:"取消关注",key:"unfollow"})),e}),l=e=>{switch(e){case"follow":O({topic_id:t.tag.id}).then(o=>{t.tag.is_following=1,window.$message.success("关注成功")}).catch(o=>{console.log(o)});break;case"unfollow":M({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=U("router-link"),g=J,k=C,a=K,d=P,v=Q,p=R;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(()=>[B(" #"+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(D))]),_: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);j(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,x({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=X,L=C,V=Z,N=ie,S=ee,E=oe,I=W;return c(),_("div",null,[n(v,{title:"话题"}),n(I,{class:"main-content-wrap tags-wrap",bordered:""},{default:s(()=>[n(V,{type:"line",animated:"","onUpdate:value":k},H({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(L,{checked:e.value,"onUpdate:checked":d[0]||(d[0]=y=>e.value=y),checkable:""},{default:s(()=>[B(f(w.value),1)]),_:1},8,["checked"])]),key:"0"}:void 0]),1024),n(E,{show:l.value},{default:s(()=>[n(S,null,{default:s(()=>[(c(!0),_(Y,null,G(r.value,y=>(c(),b(N,{tag:y,showAction:h(t).state.userLogined&&e.value,checkFollowing:o.value},null,8,["tag","showAction","checkFollowing"]))),256))]),_:1})]),_:1},8,["show"])]),_:1})])}}});const Se=z(_e,[["__scopeId","data-v-1fb31ecf"]]);export{Se as default};
+import{E as $,F as M,G as O,H as z,_ as D}from"./index-daff1b26.js";import{D as G}from"./@vicons-c265fba6.js";import{d as F,H as i,c as q,b as A,r as H,e as c,f as _,k as n,w as s,q as b,A as B,x as f,Y as u,bf as h,E as U,al as j,F as x,u as P}from"./@vue-a481fc63.js";import{o as Y,M as C,j as J,e as K,P as Q,O as R,G as W,f as X,g as Z,a as ee,k as oe}from"./naive-ui-defd0b2d.js";import{_ as te}from"./main-nav.vue_vue_type_style_index_0_lang-93352cc4.js";import{u as ne}from"./vuex-44de225f.js";import"./vue-router-e5a2430e.js";import"./axios-4a70c6fc.js";import"./moment-2ab8298d.js";/* empty css */import"./seemly-76b7b838.js";import"./vueuc-39372edb.js";import"./evtd-b614532e.js";import"./@css-render-7124a1a5.js";import"./vooks-6d99783e.js";import"./vdirs-b0483831.js";import"./@juggle-41516555.js";import"./css-render-6a5c5852.js";import"./@emotion-8a8e73f6.js";import"./lodash-es-8412e618.js";import"./treemate-25c27bff.js";import"./async-validator-dee29e8b.js";import"./date-fns-975a2d8f.js";const se={key:0,class:"tag-item"},ae={key:0,class:"tag-quote"},ce={key:1,class:"tag-quote tag-follow"},le={key:0,class:"options"},ie=F({__name:"tag-item",props:{tag:{},showAction:{type:Boolean},checkFollowing:{type:Boolean}},setup(T){const t=T,r=i(!1),m=q(()=>{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":O({topic_id:t.tag.id}).then(o=>{t.tag.is_following=1,window.$message.success("关注成功")}).catch(o=>{console.log(o)});break;case"unfollow":M({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 A(()=>{r.value=!1}),(e,o)=>{const w=H("router-link"),g=Y,k=C,a=J,d=K,v=Q,p=R;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(()=>[B(" #"+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(G))]),_: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);U(e,()=>{e.value||(window.$message.success("保存成功"),t.commit("refreshTopicFollow"))});const w=q({get:()=>{let a="编辑";return e.value&&(a="保存"),a},set:a=>{}}),g=()=>{l.value=!0,z({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 A(()=>{g()}),(a,d)=>{const v=te,p=X,V=C,E=Z,L=ie,N=ee,S=oe,I=W;return c(),_("div",null,[n(v,{title:"话题"}),n(I,{class:"main-content-wrap tags-wrap",bordered:""},{default:s(()=>[n(E,{type:"line",animated:"","onUpdate:value":k},j({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(V,{checked:e.value,"onUpdate:checked":d[0]||(d[0]=y=>e.value=y),checkable:""},{default:s(()=>[B(f(w.value),1)]),_:1},8,["checked"])]),key:"0"}:void 0]),1024),n(S,{show:l.value},{default:s(()=>[n(N,null,{default:s(()=>[(c(!0),_(x,null,P(r.value,y=>(c(),b(L,{tag:y,showAction:h(t).state.userLogined&&e.value,checkFollowing:o.value},null,8,["tag","showAction","checkFollowing"]))),256))]),_:1})]),_:1},8,["show"])]),_:1})])}}});const Ne=D(_e,[["__scopeId","data-v-1fb31ecf"]]);export{Ne as default};
diff --git a/web/dist/assets/User-4853e1bd.css b/web/dist/assets/User-4853e1bd.css
new file mode 100644
index 00000000..9a65894c
--- /dev/null
+++ b/web/dist/assets/User-4853e1bd.css
@@ -0,0 +1 @@
+.profile-tabs-wrap[data-v-8046429c]{padding:0 16px}.profile-baseinfo[data-v-8046429c]{display:flex;padding:16px}.profile-baseinfo .avatar[data-v-8046429c]{width:72px}.profile-baseinfo .base-info[data-v-8046429c]{position:relative;margin-left:12px;width:calc(100% - 84px)}.profile-baseinfo .base-info .username[data-v-8046429c]{line-height:16px;font-size:16px}.profile-baseinfo .base-info .userinfo[data-v-8046429c]{font-size:14px;line-height:14px;margin-top:10px;opacity:.75}.profile-baseinfo .base-info .userinfo .info-item[data-v-8046429c]{margin-right:12px}.profile-baseinfo .base-info .top-tag[data-v-8046429c]{transform:scale(.75)}.profile-baseinfo .user-opts[data-v-8046429c]{position:absolute;top:16px;right:16px;opacity:.75}.load-more[data-v-8046429c]{margin:20px}.load-more .load-more-wrap[data-v-8046429c]{display:flex;flex-direction:row;justify-content:center;align-items:center;gap:14px}.load-more .load-more-wrap .load-more-spinner[data-v-8046429c]{font-size:14px;opacity:.65}.dark .profile-wrap[data-v-8046429c],.dark .pagination-wrap[data-v-8046429c]{background-color:#101014bf}
diff --git a/web/dist/assets/User-5ca51361.js b/web/dist/assets/User-5ca51361.js
new file mode 100644
index 00000000..8786abb1
--- /dev/null
+++ b/web/dist/assets/User-5ca51361.js
@@ -0,0 +1 @@
+import{_ as De,a as He}from"./post-item.vue_vue_type_style_index_0_lang-c2092e3d.js";import{_ as Ne}from"./post-skeleton-8434d30b.js";import{_ as Ve}from"./whisper-9b4eeceb.js";import{_ as je}from"./main-nav.vue_vue_type_style_index_0_lang-93352cc4.js";import{d as Je,H as i,R as Re,c as Ee,b as Ge,E as Ke,r as Ye,f as u,k as n,w as r,q as g,Y as d,e as s,j as h,x,bf as c,A as D,y as ce,F,u as I,h as ve}from"./@vue-a481fc63.js";import{u as Qe}from"./vuex-44de225f.js";import{b as Xe}from"./vue-router-e5a2430e.js";import{K as Ze,J as ea,e as H,h as aa,u as _e,f as de,L as sa,_ as ta}from"./index-daff1b26.js";import{W as la}from"./whisper-add-friend-7ede77e9.js";import{W as oa}from"./v3-infinite-loading-2c58ec2f.js";import{k as na,r as ua,G as me,s as ia,t as ra,J as ca,K as va}from"./@vicons-c265fba6.js";import{F as _a,G as da,a as ma,j as fe,o as fa,M as pa,e as ga,P as ha,k as wa,f as ka,g as ya,J as ba,H as Pa}from"./naive-ui-defd0b2d.js";import"./content-64a02a2f.js";import"./paopao-video-player-2fe58954.js";import"./copy-to-clipboard-4ef7d3eb.js";import"./@babel-725317a4.js";import"./toggle-selection-93f4ad84.js";import"./vooks-6d99783e.js";import"./evtd-b614532e.js";import"./axios-4a70c6fc.js";import"./moment-2ab8298d.js";/* empty css */import"./seemly-76b7b838.js";import"./vueuc-39372edb.js";import"./@css-render-7124a1a5.js";import"./vdirs-b0483831.js";import"./@juggle-41516555.js";import"./css-render-6a5c5852.js";import"./@emotion-8a8e73f6.js";import"./lodash-es-8412e618.js";import"./treemate-25c27bff.js";import"./async-validator-dee29e8b.js";import"./date-fns-975a2d8f.js";const Oa={key:0,class:"profile-baseinfo"},Fa={class:"avatar"},Ia={class:"base-info"},Ta={class:"username"},Aa={class:"userinfo"},xa={class:"info-item"},$a={class:"info-item"},za={class:"userinfo"},Ua={class:"info-item"},Ca={class:"info-item"},qa={key:0,class:"user-opts"},Ma={key:0,class:"skeleton-wrap"},Sa={key:1},Wa={key:0,class:"empty-wrap"},La={key:1},Ba={key:0},Da={key:1},Ha={key:2},Na={key:3},Va={key:4},ja={key:2},Ja={key:0},Ra={key:1},Ea={key:2},Ga={key:3},Ka={key:4},Ya={class:"load-more-wrap"},Qa={class:"load-more-spinner"},Xa=Je({__name:"User",setup(Za){const N=_a(),_=Qe(),$=Xe(),ue="true".toLowerCase()==="true",m=i(!1),y=i(!1),a=Re({id:0,avatar:"",username:"",nickname:"",is_admin:!1,is_friend:!0,is_following:!1,created_on:0,follows:0,followings:0,status:1}),p=i(!1),V=i(!1),J=i(!1),l=i([]),z=i([]),U=i([]),C=i([]),q=i([]),M=i([]),T=i($.query.s||""),o=i(+$.query.p||1),f=i("post"),R=i(+$.query.p||1),E=i(1),G=i(1),K=i(1),Y=i(1),k=i(20),v=i(0),Q=i(0),X=i(0),Z=i(0),ee=i(0),ae=i(0),b=e=>{a.id=e.id,a.username=e.username,a.nickname=e.nickname,a.avatar=e.avatar,V.value=!0},P=e=>{N.success({title:"提示",content:"确定"+(e.user.is_following?"取消关注":"关注")+"该用户吗?",positiveText:"确定",negativeText:"取消",onPositiveClick:()=>{e.user.is_following?_e({user_id:e.user.id}).then(w=>{window.$message.success("操作成功"),e.user.is_following=!1}).catch(w=>{}):de({user_id:e.user.id}).then(w=>{window.$message.success("关注成功"),e.user.is_following=!0}).catch(w=>{})}})},pe=()=>{y.value=!1,l.value=[],z.value=[],U.value=[],C.value=[],q.value=[],M.value=[],f.value="post",o.value=1,R.value=1,E.value=1,G.value=1,K.value=1,Y.value=1,v.value=0,Q.value=0,X.value=0,Z.value=0,ee.value=0,ae.value=0},ge=()=>{switch(f.value){case"post":j();break;case"comment":se();break;case"highlight":te();break;case"media":le();break;case"star":oe();break}},j=()=>{m.value=!0,H({username:T.value,style:"post",page:o.value,page_size:k.value}).then(e=>{m.value=!1,e.list.length===0&&(y.value=!0),o.value>1?l.value=l.value.concat(e.list):(l.value=e.list||[],window.scrollTo(0,0)),v.value=Math.ceil(e.pager.total_rows/k.value),z.value=l.value,Q.value=v.value}).catch(e=>{l.value=[],o.value>1&&o.value--,m.value=!1})},se=()=>{m.value=!0,H({username:T.value,style:"comment",page:o.value,page_size:k.value}).then(e=>{m.value=!1,e.list.length===0&&(y.value=!0),o.value>1?l.value=l.value.concat(e.list):(l.value=e.list||[],window.scrollTo(0,0)),v.value=Math.ceil(e.pager.total_rows/k.value),U.value=l.value,X.value=v.value}).catch(e=>{l.value=[],o.value>1&&o.value--,m.value=!1})},te=()=>{m.value=!0,H({username:T.value,style:"highlight",page:o.value,page_size:k.value}).then(e=>{m.value=!1,e.list.length===0&&(y.value=!0),o.value>1?l.value=l.value.concat(e.list):(l.value=e.list||[],window.scrollTo(0,0)),v.value=Math.ceil(e.pager.total_rows/k.value),C.value=l.value,Z.value=v.value}).catch(e=>{l.value=[],o.value>1&&o.value--,m.value=!1})},le=()=>{m.value=!0,H({username:T.value,style:"media",page:o.value,page_size:k.value}).then(e=>{m.value=!1,e.list.length===0&&(y.value=!0),o.value>1?l.value=l.value.concat(e.list):(l.value=e.list||[],window.scrollTo(0,0)),v.value=Math.ceil(e.pager.total_rows/k.value),q.value=l.value,ee.value=v.value}).catch(e=>{l.value=[],o.value>1&&o.value--,m.value=!1})},oe=()=>{m.value=!0,H({username:T.value,style:"star",page:o.value,page_size:k.value}).then(e=>{m.value=!1,e.list.length===0&&(y.value=!0),o.value>1?l.value=l.value.concat(e.list):(l.value=e.list||[],window.scrollTo(0,0)),v.value=Math.ceil(e.pager.total_rows/k.value),M.value=l.value,ae.value=v.value}).catch(e=>{l.value=[],o.value>1&&o.value--,m.value=!1})},he=e=>{switch(f.value=e,f.value){case"post":l.value=z.value,o.value=R.value,v.value=Q.value,j();break;case"comment":l.value=U.value,o.value=E.value,v.value=X.value,se();break;case"highlight":l.value=C.value,o.value=G.value,v.value=Z.value,te();break;case"media":l.value=q.value,o.value=K.value,v.value=ee.value,le();break;case"star":l.value=M.value,o.value=Y.value,v.value=ae.value,oe();break}},S=()=>{p.value=!0,Ze({username:T.value}).then(e=>{p.value=!1,a.id=e.id,a.avatar=e.avatar,a.username=e.username,a.nickname=e.nickname,a.is_admin=e.is_admin,a.is_friend=e.is_friend,a.created_on=e.created_on,a.is_following=e.is_following,a.follows=e.follows,a.followings=e.followings,a.status=e.status,ge()}).catch(e=>{p.value=!1,console.log(e)})},we=()=>{switch(f.value){case"post":R.value=o.value,j();break;case"comment":E.value=o.value,se();break;case"highlight":G.value=o.value,te();break;case"media":K.value=o.value,le();break;case"star":Y.value=o.value,oe();break}},ke=()=>{V.value=!0},ye=()=>{J.value=!0},be=()=>{V.value=!1},Pe=()=>{J.value=!1},A=e=>()=>ve(fe,null,{default:()=>ve(e)}),Oe=Ee(()=>{let e=[{label:"私信",key:"whisper",icon:A(ua)}];return _.state.userInfo.is_admin&&(a.status===1?e.push({label:"禁言",key:"banned",icon:A(me)}):e.push({label:"解封",key:"deblocking",icon:A(me)})),a.is_following?e.push({label:"取消关注",key:"unfollow",icon:A(ia)}):e.push({label:"关注",key:"follow",icon:A(ra)}),ue&&(a.is_friend?e.push({label:"删除好友",key:"delete",icon:A(ca)}):e.push({label:"添加朋友",key:"requesting",icon:A(va)})),e}),Fe=e=>{switch(e){case"whisper":ke();break;case"delete":Ie();break;case"requesting":ye();break;case"follow":case"unfollow":Te();break;case"banned":case"deblocking":Ae();break}},Ie=()=>{N.warning({title:"删除好友",content:"将好友 “"+a.nickname+"” 删除,将同时删除 点赞/收藏 列表中关于该朋友的 “好友可见” 推文",positiveText:"确定",negativeText:"取消",onPositiveClick:()=>{p.value=!0,aa({user_id:a.id}).then(e=>{p.value=!1,a.is_friend=!1,j()}).catch(e=>{p.value=!1,console.log(e)})}})},Te=()=>{N.success({title:"提示",content:"确定"+(a.is_following?"取消关注":"关注")+"该用户吗?",positiveText:"确定",negativeText:"取消",onPositiveClick:()=>{p.value=!0,a.is_following?_e({user_id:a.id}).then(e=>{p.value=!1,window.$message.success("取消关注成功"),S()}).catch(e=>{p.value=!1,console.log(e)}):de({user_id:a.id}).then(e=>{p.value=!1,window.$message.success("关注成功"),S()}).catch(e=>{p.value=!1,console.log(e)})}})},Ae=()=>{N.warning({title:"警告",content:"确定对该用户进行"+(a.status===1?"禁言":"解封")+"处理吗?",positiveText:"确定",negativeText:"取消",onPositiveClick:()=>{p.value=!0,sa({id:a.id,status:a.status===1?2:1}).then(e=>{p.value=!1,a.status===1?window.$message.success("禁言成功"):window.$message.success("解封成功"),S()}).catch(e=>{p.value=!1,console.log(e)})}})},xe=()=>{o.value{S()}),Ke(()=>({path:$.path,query:$.query}),(e,w)=>{w.path==="/u"&&e.path==="/u"&&(T.value=$.query.s||"",pe(),S())}),(e,w)=>{const $e=je,ze=fa,ne=pa,ie=Ye("router-link"),Ue=ga,Ce=ha,qe=Ve,re=wa,W=ka,Me=ya,Se=Ne,We=ba,L=De,O=Pa,B=He,Le=da,Be=ma;return s(),u("div",null,[n($e,{title:"用户详情"}),n(Le,{class:"main-content-wrap profile-wrap",bordered:""},{default:r(()=>[n(re,{show:p.value},{default:r(()=>[a.id>0?(s(),u("div",Oa,[h("div",Fa,[n(ze,{size:72,src:a.avatar},null,8,["src"])]),h("div",Ia,[h("div",Ta,[h("strong",null,x(a.nickname),1),h("span",null," @"+x(a.username),1),ue&&c(_).state.userInfo.id>0&&c(_).state.userInfo.username!=a.username&&a.is_friend?(s(),g(ne,{key:0,class:"top-tag",type:"info",size:"small",round:""},{default:r(()=>[D(" 好友 ")]),_:1})):d("",!0),c(_).state.userInfo.id>0&&c(_).state.userInfo.username!=a.username&&a.is_following?(s(),g(ne,{key:1,class:"top-tag",type:"success",size:"small",round:""},{default:r(()=>[D(" 已关注 ")]),_:1})):d("",!0),a.is_admin?(s(),g(ne,{key:2,class:"top-tag",type:"error",size:"small",round:""},{default:r(()=>[D(" 管理员 ")]),_:1})):d("",!0)]),h("div",Aa,[h("span",xa,"UID. "+x(a.id),1),h("span",$a,x(c(ea)(a.created_on))+" 加入",1)]),h("div",za,[h("span",Ua,[n(ie,{onClick:w[0]||(w[0]=ce(()=>{},["stop"])),class:"following-link",to:{name:"following",query:{s:a.username,n:a.nickname,t:"follows"}}},{default:r(()=>[D(" 关注 "+x(a.follows),1)]),_:1},8,["to"])]),h("span",Ca,[n(ie,{onClick:w[1]||(w[1]=ce(()=>{},["stop"])),class:"following-link",to:{name:"following",query:{s:a.username,n:a.nickname,t:"followings"}}},{default:r(()=>[D(" 粉丝 "+x(a.followings),1)]),_:1},8,["to"])])])]),c(_).state.userInfo.id>0&&c(_).state.userInfo.username!=a.username?(s(),u("div",qa,[n(Ce,{placement:"bottom-end",trigger:"click",size:"small",options:Oe.value,onSelect:Fe},{default:r(()=>[n(Ue,{quaternary:"",circle:""},{icon:r(()=>[n(c(fe),null,{default:r(()=>[n(c(na))]),_:1})]),_:1})]),_:1},8,["options"])])):d("",!0)])):d("",!0),n(qe,{show:V.value,user:a,onSuccess:be},null,8,["show","user"]),n(la,{show:J.value,user:a,onSuccess:Pe},null,8,["show","user"])]),_:1},8,["show"]),n(Me,{class:"profile-tabs-wrap",type:"line",animated:"",value:f.value,"onUpdate:value":he},{default:r(()=>[n(W,{name:"post",tab:"泡泡"}),n(W,{name:"comment",tab:"评论"}),n(W,{name:"highlight",tab:"亮点"}),n(W,{name:"media",tab:"图文"}),n(W,{name:"star",tab:"喜欢"})]),_:1},8,["value"]),m.value&&l.value.length===0?(s(),u("div",Ma,[n(Se,{num:k.value},null,8,["num"])])):(s(),u("div",Sa,[l.value.length===0?(s(),u("div",Wa,[n(We,{size:"large",description:"暂无数据"})])):d("",!0),c(_).state.desktopModelShow?(s(),u("div",La,[f.value==="post"?(s(),u("div",Ba,[(s(!0),u(F,null,I(z.value,t=>(s(),g(O,{key:t.id},{default:r(()=>[n(L,{post:t,isOwner:c(_).state.userInfo.id==t.user_id,addFollowAction:!0,onSendWhisper:b,onHandleFollowAction:P},null,8,["post","isOwner"])]),_:2},1024))),128))])):d("",!0),f.value==="comment"?(s(),u("div",Da,[(s(!0),u(F,null,I(U.value,t=>(s(),g(O,{key:t.id},{default:r(()=>[n(L,{post:t,isOwner:c(_).state.userInfo.id==t.user_id,addFollowAction:!0,onSendWhisper:b,onHandleFollowAction:P},null,8,["post","isOwner"])]),_:2},1024))),128))])):d("",!0),f.value==="highlight"?(s(),u("div",Ha,[(s(!0),u(F,null,I(C.value,t=>(s(),g(O,{key:t.id},{default:r(()=>[n(L,{post:t,isOwner:c(_).state.userInfo.id==t.user_id,addFollowAction:!0,onSendWhisper:b,onHandleFollowAction:P},null,8,["post","isOwner"])]),_:2},1024))),128))])):d("",!0),f.value==="media"?(s(),u("div",Na,[(s(!0),u(F,null,I(q.value,t=>(s(),g(O,{key:t.id},{default:r(()=>[n(L,{post:t,isOwner:c(_).state.userInfo.id==t.user_id,addFollowAction:!0,onSendWhisper:b,onHandleFollowAction:P},null,8,["post","isOwner"])]),_:2},1024))),128))])):d("",!0),f.value==="star"?(s(),u("div",Va,[(s(!0),u(F,null,I(M.value,t=>(s(),g(O,{key:t.id},{default:r(()=>[n(L,{post:t,isOwner:c(_).state.userInfo.id==t.user_id,addFollowAction:!0,onSendWhisper:b,onHandleFollowAction:P},null,8,["post","isOwner"])]),_:2},1024))),128))])):d("",!0)])):(s(),u("div",ja,[f.value==="post"?(s(),u("div",Ja,[(s(!0),u(F,null,I(z.value,t=>(s(),g(O,{key:t.id},{default:r(()=>[n(B,{post:t,isOwner:c(_).state.userInfo.id==t.user_id,addFollowAction:!0,onSendWhisper:b,onHandleFollowAction:P},null,8,["post","isOwner"])]),_:2},1024))),128))])):d("",!0),f.value==="comment"?(s(),u("div",Ra,[(s(!0),u(F,null,I(U.value,t=>(s(),g(O,{key:t.id},{default:r(()=>[n(B,{post:t,isOwner:c(_).state.userInfo.id==t.user_id,addFollowAction:!0,onSendWhisper:b,onHandleFollowAction:P},null,8,["post","isOwner"])]),_:2},1024))),128))])):d("",!0),f.value==="highlight"?(s(),u("div",Ea,[(s(!0),u(F,null,I(C.value,t=>(s(),g(O,{key:t.id},{default:r(()=>[n(B,{post:t,isOwner:c(_).state.userInfo.id==t.user_id,addFollowAction:!0,onSendWhisper:b,onHandleFollowAction:P},null,8,["post","isOwner"])]),_:2},1024))),128))])):d("",!0),f.value==="media"?(s(),u("div",Ga,[(s(!0),u(F,null,I(q.value,t=>(s(),g(O,{key:t.id},{default:r(()=>[n(B,{post:t,isOwner:c(_).state.userInfo.id==t.user_id,addFollowAction:!0,onSendWhisper:b,onHandleFollowAction:P},null,8,["post","isOwner"])]),_:2},1024))),128))])):d("",!0),f.value==="star"?(s(),u("div",Ka,[(s(!0),u(F,null,I(M.value,t=>(s(),g(O,{key:t.id},{default:r(()=>[n(B,{post:t,isOwner:c(_).state.userInfo.id==t.user_id,addFollowAction:!0,onSendWhisper:b,onHandleFollowAction:P},null,8,["post","isOwner"])]),_:2},1024))),128))])):d("",!0)]))]))]),_:1}),v.value>0?(s(),g(Be,{key:0,justify:"center"},{default:r(()=>[n(c(oa),{class:"load-more",slots:{complete:"没有更多泡泡了",error:"加载出错"},onInfinite:w[2]||(w[2]=t=>xe())},{spinner:r(()=>[h("div",Ya,[y.value?d("",!0):(s(),g(re,{key:0,size:14})),h("span",Qa,x(y.value?"没有更多泡泡了":"加载更多"),1)])]),_:1})]),_:1})):d("",!0)])}}});const Cs=ta(Xa,[["__scopeId","data-v-8046429c"]]);export{Cs as default};
diff --git a/web/dist/assets/User-9ecd5433.js b/web/dist/assets/User-9ecd5433.js
deleted file mode 100644
index 224c6cb8..00000000
--- a/web/dist/assets/User-9ecd5433.js
+++ /dev/null
@@ -1 +0,0 @@
-import{_ as Re,a as He}from"./post-item.vue_vue_type_style_index_0_lang-a5e9cab2.js";import{_ as Ne}from"./post-skeleton-4d2b103e.js";import{_ as Ve}from"./whisper-7dcedd50.js";import{_ as je}from"./main-nav.vue_vue_type_style_index_0_lang-2982e04a.js";import{d as pe,H as i,e as s,q as m,w as r,j as f,k as t,A as U,x,R as Ge,c as Ee,b as Je,E as Ke,r as Ye,f as u,Y as d,bf as k,y as ce,F as $,u as T,h as _e}from"./@vue-a481fc63.js";import{u as Qe}from"./vuex-44de225f.js";import{b as Xe}from"./vue-router-e5a2430e.js";import{G as Ze,_ as me,H as ea,F as aa,e as V,I as sa,J as ta,K as la,L as na}from"./index-4a465428.js";import{R as oa,H as ua,S as ia,b as ra,e as fe,i as ca,T as _a,F as va,a as da,j as ve,o as pa,M as ma,O as fa,k as ha,f as ga,g as wa,I as ka,G as ya}from"./naive-ui-d8de3dda.js";import{W as ba}from"./v3-infinite-loading-2c58ec2f.js";import{i as Pa,p as $a,y as de,z as Ta,v as xa,D as za,G as Ua}from"./@vicons-7a4ef312.js";import"./content-0e30acaf.js";import"./paopao-video-player-2fe58954.js";import"./copy-to-clipboard-4ef7d3eb.js";import"./@babel-725317a4.js";import"./toggle-selection-93f4ad84.js";import"./vooks-6d99783e.js";import"./evtd-b614532e.js";import"./axios-4a70c6fc.js";import"./moment-2ab8298d.js";/* empty css */import"./seemly-76b7b838.js";import"./vueuc-39372edb.js";import"./@css-render-7124a1a5.js";import"./vdirs-b0483831.js";import"./@juggle-41516555.js";import"./css-render-6a5c5852.js";import"./@emotion-8a8e73f6.js";import"./lodash-es-8412e618.js";import"./treemate-25c27bff.js";import"./async-validator-dee29e8b.js";import"./date-fns-975a2d8f.js";const Fa={class:"whisper-wrap"},Ia={class:"whisper-line"},qa={class:"whisper-line send-wrap"},Ca=pe({__name:"whisper-add-friend",props:{show:{type:Boolean,default:!1},user:{}},emits:["success"],setup(ue,{emit:O}){const y=ue,g=i(""),F=i(!1),c=()=>{O("success")},h=()=>{F.value=!0,Ze({user_id:y.user.id,greetings:g.value}).then(a=>{window.$message.success("发送成功"),F.value=!1,g.value="",c()}).catch(a=>{F.value=!1})};return(a,v)=>{const L=oa,A=ua,l=ia,I=ra,q=fe,C=ca;return s(),m(C,{show:a.show,"onUpdate:show":c,class:"whisper-card",preset:"card",size:"small",title:"申请添加朋友","mask-closable":!1,bordered:!1,style:{width:"360px"}},{default:r(()=>[f("div",Fa,[t(l,{"show-icon":!1},{default:r(()=>[U(" 发送添加朋友申请给: "),t(A,{style:{"max-width":"100%"}},{default:r(()=>[t(L,{type:"success"},{default:r(()=>[U(x(a.user.nickname)+"@"+x(a.user.username),1)]),_:1})]),_:1})]),_:1}),f("div",Ia,[t(I,{type:"textarea",placeholder:"请输入真挚的问候语",autosize:{minRows:5,maxRows:10},value:g.value,"onUpdate:value":v[0]||(v[0]=M=>g.value=M),maxlength:"120","show-count":""},null,8,["value"])]),f("div",qa,[t(q,{strong:"",secondary:"",type:"primary",loading:F.value,onClick:h},{default:r(()=>[U(" 发送 ")]),_:1},8,["loading"])])])]),_:1},8,["show"])}}});const Ma=me(Ca,[["__scopeId","data-v-60be56a2"]]),Sa={key:0,class:"profile-baseinfo"},Wa={class:"avatar"},La={class:"base-info"},Oa={class:"username"},Aa={class:"userinfo"},Ba={class:"info-item"},Da={class:"info-item"},Ra={class:"userinfo"},Ha={class:"info-item"},Na={class:"info-item"},Va={key:0,class:"user-opts"},ja={key:0,class:"skeleton-wrap"},Ga={key:1},Ea={key:0,class:"empty-wrap"},Ja={key:1},Ka={key:0},Ya={key:1},Qa={key:2},Xa={key:3},Za={key:4},es={key:2},as={key:0},ss={key:1},ts={key:2},ls={key:3},ns={key:4},os={class:"load-more-wrap"},us={class:"load-more-spinner"},is=pe({__name:"User",setup(ue){const O=_a(),y=Qe(),g=Xe(),F="true".toLowerCase()==="true",c=i(!1),h=i(!1),a=Ge({id:0,avatar:"",username:"",nickname:"",is_admin:!1,is_friend:!0,is_following:!1,created_on:0,follows:0,followings:0,status:1}),v=i(!1),L=i(!1),A=i(!1),l=i([]),I=i([]),q=i([]),C=i([]),M=i([]),B=i([]),S=i(g.query.s||""),n=i(+g.query.p||1),p=i("post"),G=i(+g.query.p||1),E=i(1),J=i(1),K=i(1),Y=i(1),w=i(20),_=i(0),Q=i(0),X=i(0),Z=i(0),ee=i(0),ae=i(0),b=e=>{a.id=e.id,a.username=e.username,a.nickname=e.nickname,a.avatar=e.avatar,L.value=!0},he=()=>{h.value=!1,l.value=[],I.value=[],q.value=[],C.value=[],M.value=[],B.value=[],p.value="post",n.value=1,G.value=1,E.value=1,J.value=1,K.value=1,Y.value=1,_.value=0,Q.value=0,X.value=0,Z.value=0,ee.value=0,ae.value=0},ge=()=>{switch(p.value){case"post":j();break;case"comment":se();break;case"highlight":te();break;case"media":le();break;case"star":ne();break}},j=()=>{c.value=!0,V({username:S.value,style:"post",page:n.value,page_size:w.value}).then(e=>{c.value=!1,e.list.length===0&&(h.value=!0),n.value>1?l.value=l.value.concat(e.list):(l.value=e.list||[],window.scrollTo(0,0)),_.value=Math.ceil(e.pager.total_rows/w.value),I.value=l.value,Q.value=_.value}).catch(e=>{l.value=[],n.value>1&&n.value--,c.value=!1})},se=()=>{c.value=!0,V({username:S.value,style:"comment",page:n.value,page_size:w.value}).then(e=>{c.value=!1,e.list.length===0&&(h.value=!0),n.value>1?l.value=l.value.concat(e.list):(l.value=e.list||[],window.scrollTo(0,0)),_.value=Math.ceil(e.pager.total_rows/w.value),q.value=l.value,X.value=_.value}).catch(e=>{l.value=[],n.value>1&&n.value--,c.value=!1})},te=()=>{c.value=!0,V({username:S.value,style:"highlight",page:n.value,page_size:w.value}).then(e=>{c.value=!1,e.list.length===0&&(h.value=!0),n.value>1?l.value=l.value.concat(e.list):(l.value=e.list||[],window.scrollTo(0,0)),_.value=Math.ceil(e.pager.total_rows/w.value),C.value=l.value,Z.value=_.value}).catch(e=>{l.value=[],n.value>1&&n.value--,c.value=!1})},le=()=>{c.value=!0,V({username:S.value,style:"media",page:n.value,page_size:w.value}).then(e=>{c.value=!1,e.list.length===0&&(h.value=!0),n.value>1?l.value=l.value.concat(e.list):(l.value=e.list||[],window.scrollTo(0,0)),_.value=Math.ceil(e.pager.total_rows/w.value),M.value=l.value,ee.value=_.value}).catch(e=>{l.value=[],n.value>1&&n.value--,c.value=!1})},ne=()=>{c.value=!0,V({username:S.value,style:"star",page:n.value,page_size:w.value}).then(e=>{c.value=!1,e.list.length===0&&(h.value=!0),n.value>1?l.value=l.value.concat(e.list):(l.value=e.list||[],window.scrollTo(0,0)),_.value=Math.ceil(e.pager.total_rows/w.value),B.value=l.value,ae.value=_.value}).catch(e=>{l.value=[],n.value>1&&n.value--,c.value=!1})},we=e=>{switch(p.value=e,p.value){case"post":l.value=I.value,n.value=G.value,_.value=Q.value,j();break;case"comment":l.value=q.value,n.value=E.value,_.value=X.value,se();break;case"highlight":l.value=C.value,n.value=J.value,_.value=Z.value,te();break;case"media":l.value=M.value,n.value=K.value,_.value=ee.value,le();break;case"star":l.value=B.value,n.value=Y.value,_.value=ae.value,ne();break}},D=()=>{v.value=!0,ea({username:S.value}).then(e=>{v.value=!1,a.id=e.id,a.avatar=e.avatar,a.username=e.username,a.nickname=e.nickname,a.is_admin=e.is_admin,a.is_friend=e.is_friend,a.created_on=e.created_on,a.is_following=e.is_following,a.follows=e.follows,a.followings=e.followings,a.status=e.status,ge()}).catch(e=>{v.value=!1,console.log(e)})},ke=()=>{switch(p.value){case"post":G.value=n.value,j();break;case"comment":E.value=n.value,se();break;case"highlight":J.value=n.value,te();break;case"media":K.value=n.value,le();break;case"star":Y.value=n.value,ne();break}},ye=()=>{L.value=!0},be=()=>{A.value=!0},Pe=()=>{L.value=!1},$e=()=>{A.value=!1},W=e=>()=>_e(ve,null,{default:()=>_e(e)}),Te=Ee(()=>{let e=[{label:"私信",key:"whisper",icon:W($a)}];return y.state.userInfo.is_admin&&(a.status===1?e.push({label:"禁言",key:"banned",icon:W(de)}):e.push({label:"解封",key:"deblocking",icon:W(de)})),a.is_following?e.push({label:"取消关注",key:"unfollow",icon:W(Ta)}):e.push({label:"关注",key:"follow",icon:W(xa)}),F&&(a.is_friend?e.push({label:"删除好友",key:"delete",icon:W(za)}):e.push({label:"添加朋友",key:"requesting",icon:W(Ua)})),e}),xe=e=>{switch(e){case"whisper":ye();break;case"delete":ze();break;case"requesting":be();break;case"follow":case"unfollow":Ue();break;case"banned":case"deblocking":Fe();break}},ze=()=>{O.warning({title:"删除好友",content:"将好友 “"+a.nickname+"” 删除,将同时删除 点赞/收藏 列表中关于该朋友的 “好友可见” 推文",positiveText:"确定",negativeText:"取消",onPositiveClick:()=>{v.value=!0,sa({user_id:a.id}).then(e=>{v.value=!1,a.is_friend=!1,j()}).catch(e=>{v.value=!1,console.log(e)})}})},Ue=()=>{O.success({title:"提示",content:"确定"+(a.is_following?"取消关注":"关注")+"该用户吗?",positiveText:"确定",negativeText:"取消",onPositiveClick:()=>{v.value=!0,a.is_following?ta({user_id:a.id}).then(e=>{v.value=!1,window.$message.success("取消关注成功"),D()}).catch(e=>{v.value=!1,console.log(e)}):la({user_id:a.id}).then(e=>{v.value=!1,window.$message.success("关注成功"),D()}).catch(e=>{v.value=!1,console.log(e)})}})},Fe=()=>{O.warning({title:"警告",content:"确定对该用户进行"+(a.status===1?"禁言":"解封")+"处理吗?",positiveText:"确定",negativeText:"取消",onPositiveClick:()=>{v.value=!0,na({id:a.id,status:a.status===1?2:1}).then(e=>{v.value=!1,a.status===1?window.$message.success("禁言成功"):window.$message.success("解封成功"),D()}).catch(e=>{v.value=!1,console.log(e)})}})},Ie=()=>{n.value<_.value||_.value==0?(h.value=!1,n.value++,ke()):h.value=!0};return Je(()=>{D()}),Ke(()=>({path:g.path,query:g.query}),(e,z)=>{z.path==="/u"&&e.path==="/u"&&(S.value=g.query.s||"",he(),D())}),(e,z)=>{const qe=je,Ce=pa,oe=ma,ie=Ye("router-link"),Me=fe,Se=fa,We=Ve,re=ha,R=ga,Le=wa,Oe=Ne,Ae=ka,H=Re,P=ya,N=He,Be=va,De=da;return s(),u("div",null,[t(qe,{title:"用户详情"}),t(Be,{class:"main-content-wrap profile-wrap",bordered:""},{default:r(()=>[t(re,{show:v.value},{default:r(()=>[a.id>0?(s(),u("div",Sa,[f("div",Wa,[t(Ce,{size:72,src:a.avatar},null,8,["src"])]),f("div",La,[f("div",Oa,[f("strong",null,x(a.nickname),1),f("span",null," @"+x(a.username),1),F&&k(y).state.userInfo.id>0&&k(y).state.userInfo.username!=a.username&&a.is_friend?(s(),m(oe,{key:0,class:"top-tag",type:"info",size:"small",round:""},{default:r(()=>[U(" 好友 ")]),_:1})):d("",!0),k(y).state.userInfo.id>0&&k(y).state.userInfo.username!=a.username&&a.is_following?(s(),m(oe,{key:1,class:"top-tag",type:"success",size:"small",round:""},{default:r(()=>[U(" 已关注 ")]),_:1})):d("",!0),a.is_admin?(s(),m(oe,{key:2,class:"top-tag",type:"error",size:"small",round:""},{default:r(()=>[U(" 管理员 ")]),_:1})):d("",!0)]),f("div",Aa,[f("span",Ba,"UID. "+x(a.id),1),f("span",Da,x(k(aa)(a.created_on))+" 加入",1)]),f("div",Ra,[f("span",Ha,[t(ie,{onClick:z[0]||(z[0]=ce(()=>{},["stop"])),class:"following-link",to:{name:"following",query:{s:a.username,n:a.nickname,t:"follows"}}},{default:r(()=>[U(" 关注 "+x(a.follows),1)]),_:1},8,["to"])]),f("span",Na,[t(ie,{onClick:z[1]||(z[1]=ce(()=>{},["stop"])),class:"following-link",to:{name:"following",query:{s:a.username,n:a.nickname,t:"followings"}}},{default:r(()=>[U(" 粉丝 "+x(a.followings),1)]),_:1},8,["to"])])])]),k(y).state.userInfo.id>0&&k(y).state.userInfo.username!=a.username?(s(),u("div",Va,[t(Se,{placement:"bottom-end",trigger:"click",size:"small",options:Te.value,onSelect:xe},{default:r(()=>[t(Me,{quaternary:"",circle:""},{icon:r(()=>[t(k(ve),null,{default:r(()=>[t(k(Pa))]),_:1})]),_:1})]),_:1},8,["options"])])):d("",!0)])):d("",!0),t(We,{show:L.value,user:a,onSuccess:Pe},null,8,["show","user"]),t(Ma,{show:A.value,user:a,onSuccess:$e},null,8,["show","user"])]),_:1},8,["show"]),t(Le,{class:"profile-tabs-wrap",type:"line",animated:"",value:p.value,"onUpdate:value":we},{default:r(()=>[t(R,{name:"post",tab:"泡泡"}),t(R,{name:"comment",tab:"评论"}),t(R,{name:"highlight",tab:"亮点"}),t(R,{name:"media",tab:"图文"}),t(R,{name:"star",tab:"喜欢"})]),_:1},8,["value"]),c.value&&l.value.length===0?(s(),u("div",ja,[t(Oe,{num:w.value},null,8,["num"])])):(s(),u("div",Ga,[l.value.length===0?(s(),u("div",Ea,[t(Ae,{size:"large",description:"暂无数据"})])):d("",!0),k(y).state.desktopModelShow?(s(),u("div",Ja,[p.value==="post"?(s(),u("div",Ka,[(s(!0),u($,null,T(I.value,o=>(s(),m(P,{key:o.id},{default:r(()=>[t(H,{post:o,onSendWhisper:b},null,8,["post"])]),_:2},1024))),128))])):d("",!0),p.value==="comment"?(s(),u("div",Ya,[(s(!0),u($,null,T(q.value,o=>(s(),m(P,{key:o.id},{default:r(()=>[t(H,{post:o,onSendWhisper:b},null,8,["post"])]),_:2},1024))),128))])):d("",!0),p.value==="highlight"?(s(),u("div",Qa,[(s(!0),u($,null,T(C.value,o=>(s(),m(P,{key:o.id},{default:r(()=>[t(H,{post:o,onSendWhisper:b},null,8,["post"])]),_:2},1024))),128))])):d("",!0),p.value==="media"?(s(),u("div",Xa,[(s(!0),u($,null,T(M.value,o=>(s(),m(P,{key:o.id},{default:r(()=>[t(H,{post:o,onSendWhisper:b},null,8,["post"])]),_:2},1024))),128))])):d("",!0),p.value==="star"?(s(),u("div",Za,[(s(!0),u($,null,T(B.value,o=>(s(),m(P,{key:o.id},{default:r(()=>[t(H,{post:o,onSendWhisper:b},null,8,["post"])]),_:2},1024))),128))])):d("",!0)])):(s(),u("div",es,[p.value==="post"?(s(),u("div",as,[(s(!0),u($,null,T(I.value,o=>(s(),m(P,{key:o.id},{default:r(()=>[t(N,{post:o,onSendWhisper:b},null,8,["post"])]),_:2},1024))),128))])):d("",!0),p.value==="comment"?(s(),u("div",ss,[(s(!0),u($,null,T(q.value,o=>(s(),m(P,{key:o.id},{default:r(()=>[t(N,{post:o,onSendWhisper:b},null,8,["post"])]),_:2},1024))),128))])):d("",!0),p.value==="highlight"?(s(),u("div",ts,[(s(!0),u($,null,T(C.value,o=>(s(),m(P,{key:o.id},{default:r(()=>[t(N,{post:o,onSendWhisper:b},null,8,["post"])]),_:2},1024))),128))])):d("",!0),p.value==="media"?(s(),u("div",ls,[(s(!0),u($,null,T(M.value,o=>(s(),m(P,{key:o.id},{default:r(()=>[t(N,{post:o,onSendWhisper:b},null,8,["post"])]),_:2},1024))),128))])):d("",!0),p.value==="star"?(s(),u("div",ns,[(s(!0),u($,null,T(B.value,o=>(s(),m(P,{key:o.id},{default:r(()=>[t(N,{post:o,onSendWhisper:b},null,8,["post"])]),_:2},1024))),128))])):d("",!0)]))]))]),_:1}),_.value>0?(s(),m(De,{key:0,justify:"center"},{default:r(()=>[t(k(ba),{class:"load-more",slots:{complete:"没有更多泡泡了",error:"加载出错"},onInfinite:z[2]||(z[2]=o=>Ie())},{spinner:r(()=>[f("div",os,[h.value?d("",!0):(s(),m(re,{key:0,size:14})),f("span",us,x(h.value?"没有更多泡泡了":"加载更多"),1)])]),_:1})]),_:1})):d("",!0)])}}});const Rs=me(is,[["__scopeId","data-v-ebc19734"]]);export{Rs as default};
diff --git a/web/dist/assets/User-b21ba7c9.css b/web/dist/assets/User-b21ba7c9.css
deleted file mode 100644
index bc185ee1..00000000
--- a/web/dist/assets/User-b21ba7c9.css
+++ /dev/null
@@ -1 +0,0 @@
-.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-ebc19734]{padding:0 16px}.profile-baseinfo[data-v-ebc19734]{display:flex;padding:16px}.profile-baseinfo .avatar[data-v-ebc19734]{width:72px}.profile-baseinfo .base-info[data-v-ebc19734]{position:relative;margin-left:12px;width:calc(100% - 84px)}.profile-baseinfo .base-info .username[data-v-ebc19734]{line-height:16px;font-size:16px}.profile-baseinfo .base-info .userinfo[data-v-ebc19734]{font-size:14px;line-height:14px;margin-top:10px;opacity:.75}.profile-baseinfo .base-info .userinfo .info-item[data-v-ebc19734]{margin-right:12px}.profile-baseinfo .base-info .top-tag[data-v-ebc19734]{transform:scale(.75)}.profile-baseinfo .user-opts[data-v-ebc19734]{position:absolute;top:16px;right:16px;opacity:.75}.load-more[data-v-ebc19734]{margin:20px}.load-more .load-more-wrap[data-v-ebc19734]{display:flex;flex-direction:row;justify-content:center;align-items:center;gap:14px}.load-more .load-more-wrap .load-more-spinner[data-v-ebc19734]{font-size:14px;opacity:.65}.dark .profile-wrap[data-v-ebc19734],.dark .pagination-wrap[data-v-ebc19734]{background-color:#101014bf}
diff --git a/web/dist/assets/Wallet-22a3cef6.js b/web/dist/assets/Wallet-22a3cef6.js
deleted file mode 100644
index 31397827..00000000
--- a/web/dist/assets/Wallet-22a3cef6.js
+++ /dev/null
@@ -1 +0,0 @@
-import{_ as G}from"./post-skeleton-4d2b103e.js";import{_ as H}from"./main-nav.vue_vue_type_style_index_0_lang-2982e04a.js";import{d as K,H as c,b as J,f as _,k as e,w as o,e as a,bf as y,Y as w,j as n,A as k,F as q,u as z,O as ee,D as te,x as r,q as N,l as oe,y as ne,$ as ae,a0 as se}from"./@vue-a481fc63.js";import{u as le}from"./vuex-44de225f.js";import{b as ce}from"./vue-router-e5a2430e.js";import{b as ie}from"./qrcode-9719fc56.js";import{X as _e,Y as re,Z as ue,$ as pe,E as de,_ as me}from"./index-4a465428.js";import{X as ge}from"./@vicons-7a4ef312.js";import{F as ve,i as he,Y as fe,Z as ye,e as we,a as ke,Q as be,I as xe,j as Ce,l as Ie,h as Se,G as Ae}from"./naive-ui-d8de3dda.js";import"./vooks-6d99783e.js";import"./evtd-b614532e.js";import"./encode-utf8-f813de00.js";import"./dijkstrajs-f906a09e.js";import"./axios-4a70c6fc.js";import"./moment-2ab8298d.js";/* empty css */import"./seemly-76b7b838.js";import"./vueuc-39372edb.js";import"./@css-render-7124a1a5.js";import"./vdirs-b0483831.js";import"./@juggle-41516555.js";import"./css-render-6a5c5852.js";import"./@emotion-8a8e73f6.js";import"./lodash-es-8412e618.js";import"./treemate-25c27bff.js";import"./async-validator-dee29e8b.js";import"./date-fns-975a2d8f.js";const B=m=>(ae("data-v-870bd246"),m=m(),se(),m),Re={class:"balance-wrap"},$e={class:"balance-line"},qe={class:"balance-opts"},ze={key:0,class:"pagination-wrap"},Ne={key:0,class:"skeleton-wrap"},Be={key:1},Ee={key:0,class:"empty-wrap"},Fe={class:"bill-line"},Oe={key:0,class:"amount-options"},Pe={key:1,style:{"margin-top":"10px"}},Te={class:"qrcode-wrap"},We=B(()=>n("canvas",{id:"qrcode-container"},null,-1)),De={class:"pay-tips"},Le={class:"pay-sub-tips"},Ue=B(()=>n("span",{style:{"margin-left":"6px"}}," 支付结果实时同步中... ",-1)),Ve=K({__name:"Wallet",setup(m){const i=le(),E=ce(),g=c(!1),u=c(100),v=c(!1),p=c(""),h=c(!1),b=c([]),x=c(+E.query.p||1),C=c(20),I=c(0),F=c([100,200,300,500,1e3,3e3,5e3,1e4,5e4]),A=()=>{h.value=!0,re({page:x.value,page_size:C.value}).then(s=>{h.value=!1,b.value=s.list,I.value=Math.ceil(s.pager.total_rows/C.value),window.scrollTo(0,0)}).catch(s=>{h.value=!1})},O=s=>{x.value=s,A()},R=()=>{const s=localStorage.getItem("PAOPAO_TOKEN")||"";s?_e(s).then(l=>{i.commit("updateUserinfo",l),i.commit("triggerAuth",!1),A()}).catch(l=>{i.commit("triggerAuth",!0),i.commit("userLogout")}):(i.commit("triggerAuth",!0),i.commit("userLogout"))},P=()=>{g.value=!0},T=s=>{v.value=!0,ue({amount:u.value}).then(l=>{v.value=!1,p.value=l.pay,ie.toCanvas(document.querySelector("#qrcode-container"),l.pay,{width:150,margin:2});const S=setInterval(()=>{pe({id:l.id}).then(d=>{d.status==="TRADE_SUCCESS"&&(clearInterval(S),window.$message.success("充值成功"),g.value=!1,p.value="",R())}).catch(d=>{console.log(d)})},2e3)}).catch(l=>{v.value=!1})},W=()=>{i.state.userInfo.balance==0?window.$message.warning("您暂无可提现资金"):window.$message.warning("该功能即将开放")};return J(()=>{R()}),(s,l)=>{const S=H,d=fe,D=ye,f=we,$=ke,L=be,U=G,V=xe,M=Ae,Y=ve,j=Ce,Q=Ie,X=Se,Z=he;return a(),_("div",null,[e(S,{title:"钱包"}),e(Y,{class:"main-content-wrap",bordered:""},{footer:o(()=>[I.value>1?(a(),_("div",ze,[e(L,{page:x.value,"onUpdate:page":O,"page-slot":y(i).state.collapsedRight?5:8,"page-count":I.value},null,8,["page","page-slot","page-count"])])):w("",!0)]),default:o(()=>[n("div",Re,[n("div",$e,[e(D,{label:"账户余额 (元)"},{default:o(()=>[e(d,{from:0,to:(y(i).state.userInfo.balance||0)/100,duration:500,precision:2},null,8,["to"])]),_:1}),n("div",qe,[e($,{vertical:""},{default:o(()=>[e(f,{size:"small",secondary:"",type:"primary",onClick:P},{default:o(()=>[k(" 充值 ")]),_:1}),e(f,{size:"small",secondary:"",type:"tertiary",onClick:W},{default:o(()=>[k(" 提现 ")]),_:1})]),_:1})])])]),h.value?(a(),_("div",Ne,[e(U,{num:C.value},null,8,["num"])])):(a(),_("div",Be,[b.value.length===0?(a(),_("div",Ee,[e(V,{size:"large",description:"暂无数据"})])):w("",!0),(a(!0),_(q,null,z(b.value,t=>(a(),N(M,{key:t.id},{default:o(()=>[n("div",Fe,[n("div",null,"NO."+r(t.id),1),n("div",null,r(t.reason),1),n("div",{class:oe({income:t.change_amount>=0,out:t.change_amount<0})},r((t.change_amount>0?"+":"")+(t.change_amount/100).toFixed(2)),3),n("div",null,r(y(de)(t.created_on)),1)])]),_:2},1024))),128))]))]),_:1}),e(Z,{show:g.value,"onUpdate:show":l[0]||(l[0]=t=>g.value=t)},{default:o(()=>[e(X,{bordered:!1,title:"请选择充值金额",role:"dialog","aria-modal":"true",style:{width:"100%","max-width":"330px"}},{default:o(()=>[p.value.length===0?(a(),_("div",Oe,[e($,{align:"baseline"},{default:o(()=>[(a(!0),_(q,null,z(F.value,t=>(a(),N(f,{key:t,size:"small",secondary:"",type:u.value===t?"info":"default",onClick:ne(Me=>u.value=t,["stop"])},{default:o(()=>[k(r(t/100)+"元 ",1)]),_:2},1032,["type","onClick"]))),128))]),_:1})])):w("",!0),u.value>0&&p.value.length===0?(a(),_("div",Pe,[e(f,{loading:v.value,strong:"",secondary:"",type:"info",style:{width:"100%"},onClick:T},{icon:o(()=>[e(j,null,{default:o(()=>[e(y(ge))]),_:1})]),default:o(()=>[k(" 前往支付 ")]),_:1},8,["loading"])])):w("",!0),ee(n("div",Te,[We,n("div",De," 请使用支付宝扫码支付"+r((u.value/100).toFixed(2))+"元 ",1),n("div",Le,[e(Q,{value:100,type:"info",dot:"",processing:""}),Ue])],512),[[te,p.value.length>0]])]),_:1})]),_:1},8,["show"])])}}});const ft=me(Ve,[["__scopeId","data-v-870bd246"]]);export{ft as default};
diff --git a/web/dist/assets/Wallet-90a1802e.js b/web/dist/assets/Wallet-90a1802e.js
new file mode 100644
index 00000000..2695da58
--- /dev/null
+++ b/web/dist/assets/Wallet-90a1802e.js
@@ -0,0 +1 @@
+import{_ as J}from"./post-skeleton-8434d30b.js";import{_ as K}from"./main-nav.vue_vue_type_style_index_0_lang-93352cc4.js";import{d as Q,H as c,b as X,f as _,k as e,w as o,e as a,bf as y,Y as w,j as n,A as k,F as q,u as z,O as ee,D as te,x as r,q as N,l as oe,y as ne,$ as ae,a0 as se}from"./@vue-a481fc63.js";import{u as le}from"./vuex-44de225f.js";import{b as ce}from"./vue-router-e5a2430e.js";import{b as ie}from"./qrcode-9719fc56.js";import{Y as _e,Z as re,$ as ue,a0 as pe,I as de,_ as me}from"./index-daff1b26.js";import{Z as ge}from"./@vicons-c265fba6.js";import{G as ve,i as he,Y as fe,Z as ye,e as we,a as ke,R as be,J as xe,j as Ce,l as Ie,h as Se,H as Re}from"./naive-ui-defd0b2d.js";import"./vooks-6d99783e.js";import"./evtd-b614532e.js";import"./encode-utf8-f813de00.js";import"./dijkstrajs-f906a09e.js";import"./axios-4a70c6fc.js";import"./moment-2ab8298d.js";/* empty css */import"./seemly-76b7b838.js";import"./vueuc-39372edb.js";import"./@css-render-7124a1a5.js";import"./vdirs-b0483831.js";import"./@juggle-41516555.js";import"./css-render-6a5c5852.js";import"./@emotion-8a8e73f6.js";import"./lodash-es-8412e618.js";import"./treemate-25c27bff.js";import"./async-validator-dee29e8b.js";import"./date-fns-975a2d8f.js";const B=m=>(ae("data-v-870bd246"),m=m(),se(),m),Ae={class:"balance-wrap"},$e={class:"balance-line"},qe={class:"balance-opts"},ze={key:0,class:"pagination-wrap"},Ne={key:0,class:"skeleton-wrap"},Be={key:1},Oe={key:0,class:"empty-wrap"},Pe={class:"bill-line"},Te={key:0,class:"amount-options"},We={key:1,style:{"margin-top":"10px"}},De={class:"qrcode-wrap"},Ee=B(()=>n("canvas",{id:"qrcode-container"},null,-1)),Fe={class:"pay-tips"},Le={class:"pay-sub-tips"},Ue=B(()=>n("span",{style:{"margin-left":"6px"}}," 支付结果实时同步中... ",-1)),Ve=Q({__name:"Wallet",setup(m){const i=le(),O=ce(),g=c(!1),u=c(100),v=c(!1),p=c(""),h=c(!1),b=c([]),x=c(+O.query.p||1),C=c(20),I=c(0),P=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})},T=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"))},W=()=>{g.value=!0},D=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})},E=()=>{i.state.userInfo.balance==0?window.$message.warning("您暂无可提现资金"):window.$message.warning("该功能即将开放")};return X(()=>{A()}),(s,l)=>{const S=K,d=fe,F=ye,f=we,$=ke,L=be,U=J,V=xe,M=Re,Y=ve,Z=Ce,j=Ie,H=Se,G=he;return a(),_("div",null,[e(S,{title:"钱包"}),e(Y,{class:"main-content-wrap",bordered:""},{footer:o(()=>[I.value>1?(a(),_("div",ze,[e(L,{page:x.value,"onUpdate:page":T,"page-slot":y(i).state.collapsedRight?5:8,"page-count":I.value},null,8,["page","page-slot","page-count"])])):w("",!0)]),default:o(()=>[n("div",Ae,[n("div",$e,[e(F,{label:"账户余额 (元)"},{default:o(()=>[e(d,{from:0,to:(y(i).state.userInfo.balance||0)/100,duration:500,precision:2},null,8,["to"])]),_:1}),n("div",qe,[e($,{vertical:""},{default:o(()=>[e(f,{size:"small",secondary:"",type:"primary",onClick:W},{default:o(()=>[k(" 充值 ")]),_:1}),e(f,{size:"small",secondary:"",type:"tertiary",onClick:E},{default:o(()=>[k(" 提现 ")]),_:1})]),_:1})])])]),h.value?(a(),_("div",Ne,[e(U,{num:C.value},null,8,["num"])])):(a(),_("div",Be,[b.value.length===0?(a(),_("div",Oe,[e(V,{size:"large",description:"暂无数据"})])):w("",!0),(a(!0),_(q,null,z(b.value,t=>(a(),N(M,{key:t.id},{default:o(()=>[n("div",Pe,[n("div",null,"NO."+r(t.id),1),n("div",null,r(t.reason),1),n("div",{class:oe({income:t.change_amount>=0,out:t.change_amount<0})},r((t.change_amount>0?"+":"")+(t.change_amount/100).toFixed(2)),3),n("div",null,r(y(de)(t.created_on)),1)])]),_:2},1024))),128))]))]),_:1}),e(G,{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?(a(),_("div",Te,[e($,{align:"baseline"},{default:o(()=>[(a(!0),_(q,null,z(P.value,t=>(a(),N(f,{key:t,size:"small",secondary:"",type:u.value===t?"info":"default",onClick:ne(Me=>u.value=t,["stop"])},{default:o(()=>[k(r(t/100)+"元 ",1)]),_:2},1032,["type","onClick"]))),128))]),_:1})])):w("",!0),u.value>0&&p.value.length===0?(a(),_("div",We,[e(f,{loading:v.value,strong:"",secondary:"",type:"info",style:{width:"100%"},onClick:D},{icon:o(()=>[e(Z,null,{default:o(()=>[e(y(ge))]),_:1})]),default:o(()=>[k(" 前往支付 ")]),_:1},8,["loading"])])):w("",!0),ee(n("div",De,[Ee,n("div",Fe," 请使用支付宝扫码支付"+r((u.value/100).toFixed(2))+"元 ",1),n("div",Le,[e(j,{value:100,type:"info",dot:"",processing:""}),Ue])],512),[[te,p.value.length>0]])]),_:1})]),_:1},8,["show"])])}}});const ft=me(Ve,[["__scopeId","data-v-870bd246"]]);export{ft as default};
diff --git a/web/dist/assets/content-0e30acaf.js b/web/dist/assets/content-64a02a2f.js
similarity index 89%
rename from web/dist/assets/content-0e30acaf.js
rename to web/dist/assets/content-64a02a2f.js
index ddf025e7..766123c0 100644
--- a/web/dist/assets/content-0e30acaf.js
+++ b/web/dist/assets/content-64a02a2f.js
@@ -1 +1 @@
-import{d as h,e,f as r,F as a,u as m,k as s,w as o,bf as c,j as C,y as k,x as I,q as d,Y as g,H as j,A as N,h as b}from"./@vue-a481fc63.js";import{R as V,U as T}from"./@vicons-7a4ef312.js";import{j as $,V as A,W as B,m as U,X as z,e as F,i as L}from"./naive-ui-d8de3dda.js";import{_ as D,S as R,T as M}from"./index-4a465428.js";import{e as O}from"./paopao-video-player-2fe58954.js";const P={class:"link-wrap"},S={class:"link-txt-wrap"},q=["href"],H={class:"link-txt"},W=h({__name:"post-link",props:{links:{default:()=>[]}},setup(y){const l=y;return(p,u)=>{const x=$;return e(),r("div",P,[(e(!0),r(a,null,m(l.links,n=>(e(),r("div",{class:"link-item",key:n.id},[s(x,{class:"hash-link"},{default:o(()=>[s(c(V))]),_:1}),C("div",S,[C("a",{href:n.content,class:"hash-link",target:"_blank",onClick:u[0]||(u[0]=k(()=>{},["stop"]))},[C("span",H,I(n.content),1)],8,q)])]))),128))])}}});const ot=D(W,[["__scopeId","data-v-36eef76b"]]),X={key:0},st=h({__name:"post-video",props:{videos:{default:()=>[]},full:{type:Boolean,default:!1}},setup(y){const l=y;return(p,u)=>{const x=A,n=B;return l.videos.length>0?(e(),r("div",X,[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(O),{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)}}}),Y={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=U,_=A,f=B,w=z;return e(),r("div",Y,[[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 Z={class:"attachment-wrap"},G=h({__name:"post-attachment",props:{attachments:{default:()=>[]},price:{default:0}},setup(y){const l=y,p=j(!1),u=j(""),x=j(0),n=_=>{p.value=!0,x.value=_.id,u.value="这是一个免费附件,您可以直接下载?",_.type===8&&(u.value=()=>b("div",{},[b("p",{},"这是一个收费附件,下载将收取"+(l.price/100).toFixed(2)+"元")]),R({id:x.value}).then(f=>{f.paid&&(u.value=()=>b("div",{},[b("p",{},"此次下载您已支付或无需付费,请确认下载")]))}).catch(f=>{p.value=!1}))},v=()=>{M({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",Z,[(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(T))]),_:1})]),default:o(()=>[N(" "+I(E.type===8?"收费":"免费")+"附件 ",1)]),_:2},1032,["onClick"])]))),128)),s(i,{show:p.value,"onUpdate:show":f[0]||(f[0]=E=>p.value=E),"mask-closable":!1,preset:"dialog",title:"下载提示",content:u.value,"positive-text":"确认下载","negative-text":"取消","icon-placement":"top",onPositiveClick:v},null,8,["show","content"])])}}});const lt=D(G,[["__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};
+import{d as h,e,f as r,F as a,u as m,k as s,w as o,bf as c,j as C,y as k,x as I,q as d,Y as g,H as j,A as N,h as b}from"./@vue-a481fc63.js";import{X as V,Y as T}from"./@vicons-c265fba6.js";import{j as $,V as A,W as B,m as U,X as z,e as F,i as L}from"./naive-ui-defd0b2d.js";import{_ as D,T as M,U as O}from"./index-daff1b26.js";import{e as P}from"./paopao-video-player-2fe58954.js";const R={class:"link-wrap"},X={class:"link-txt-wrap"},Y=["href"],q={class:"link-txt"},H=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(V))]),_:1}),C("div",X,[C("a",{href:n.content,class:"hash-link",target:"_blank",onClick:u[0]||(u[0]=k(()=>{},["stop"]))},[C("span",q,I(n.content),1)],8,Y)])]))),128))])}}});const ot=D(H,[["__scopeId","data-v-36eef76b"]]),S={key:0},st=h({__name:"post-video",props:{videos:{default:()=>[]},full:{type:Boolean,default:!1}},setup(y){const l=y;return(p,u)=>{const x=A,n=B;return l.videos.length>0?(e(),r("div",S,[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)}}}),W={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=U,_=A,f=B,w=z;return e(),r("div",W,[[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 Z={class:"attachment-wrap"},G=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)+"元")]),M({id:x.value}).then(f=>{f.paid&&(u.value=()=>b("div",{},[b("p",{},"此次下载您已支付或无需付费,请确认下载")]))}).catch(f=>{p.value=!1}))},v=()=>{O({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",Z,[(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(T))]),_:1})]),default:o(()=>[N(" "+I(E.type===8?"收费":"免费")+"附件 ",1)]),_:2},1032,["onClick"])]))),128)),s(i,{show:p.value,"onUpdate:show":f[0]||(f[0]=E=>p.value=E),"mask-closable":!1,preset:"dialog",title:"下载提示",content:u.value,"positive-text":"确认下载","negative-text":"取消","icon-placement":"top",onPositiveClick:v},null,8,["show","content"])])}}});const lt=D(G,[["__scopeId","data-v-22563084"]]),ct=y=>{const l=[],p=[];var u=/(#|#)([^#@\s])+?\s+?/g,x=/@([a-zA-Z0-9])+?\s+?/g;return y=y.replace(/<[^>]*?>/gi,"").replace(/(.*?)<\/[^>]*?>/gi,"").replace(u,n=>(l.push(n.substr(1).trim()),''+n.trim()+" ")).replace(x,n=>(p.push(n.substr(1).trim()),''+n.trim()+" ")),{content:y,tags:l,users:p}};export{rt as _,lt as a,st as b,ot as c,ct as p};
diff --git a/web/dist/assets/index-4a465428.js b/web/dist/assets/index-4a465428.js
deleted file mode 100644
index db8e3743..00000000
--- a/web/dist/assets/index-4a465428.js
+++ /dev/null
@@ -1 +0,0 @@
-import{d as Y,H as k,R as oe,b as Z,e as w,q as K,w as a,j as y,k as s,f as E,A as U,Z as q,y as N,Y as M,bf as f,c as J,E as Q,r as me,F as se,u as ne,x as A,h as P,a5 as Pe,s as re,l as Oe,ag as Le}from"./@vue-a481fc63.js";import{c as Te,a as Ae,u as pe,b as Ee}from"./vue-router-e5a2430e.js";import{c as Ie,u as B}from"./vuex-44de225f.js";import{a as Re}from"./axios-4a70c6fc.js";import{_ as Ce,N as $e,a as _e,b as he,c as Me,d as Se,e as ge,f as Ue,g as De,h as fe,i as xe,j as W,k as qe,u as Ne,l as Ke,m as Fe,n as Ve,o as ze,p as He,q as We,r as Ye,s as Be,t as je}from"./naive-ui-d8de3dda.js";import{h as D}from"./moment-2ab8298d.js";import{S as Ge,M as Qe,L as Ze,C as Je,B as Xe,P as et,W as tt,a as ot,H as ae,b as le,c as ue}from"./@vicons-7a4ef312.js";/* empty css */import"./seemly-76b7b838.js";import"./vueuc-39372edb.js";import"./evtd-b614532e.js";import"./@css-render-7124a1a5.js";import"./vooks-6d99783e.js";import"./vdirs-b0483831.js";import"./@juggle-41516555.js";import"./css-render-6a5c5852.js";import"./@emotion-8a8e73f6.js";import"./lodash-es-8412e618.js";import"./treemate-25c27bff.js";import"./async-validator-dee29e8b.js";import"./date-fns-975a2d8f.js";(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const 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 r(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=r(i);fetch(i.href,n)}})();const st="modulepreload",nt=function(e){return"/"+e},ie={},T=function(t,r,c){if(!r||r.length===0)return t();const i=document.getElementsByTagName("link");return Promise.all(r.map(n=>{if(n=nt(n),n in ie)return;ie[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 v=document.createElement("link");if(v.rel=m?"stylesheet":st,m||(v.as="script",v.crossOrigin=""),v.href=n,document.head.appendChild(v),m)return new Promise((b,_)=>{v.addEventListener("load",b),v.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})},rt=[{path:"/",name:"home",meta:{title:"广场",keepAlive:!0},component:()=>T(()=>import("./Home-0ca93a27.js"),["assets/Home-0ca93a27.js","assets/whisper-7dcedd50.js","assets/naive-ui-d8de3dda.js","assets/seemly-76b7b838.js","assets/@vue-a481fc63.js","assets/vueuc-39372edb.js","assets/evtd-b614532e.js","assets/@css-render-7124a1a5.js","assets/vooks-6d99783e.js","assets/vdirs-b0483831.js","assets/@juggle-41516555.js","assets/css-render-6a5c5852.js","assets/@emotion-8a8e73f6.js","assets/lodash-es-8412e618.js","assets/treemate-25c27bff.js","assets/async-validator-dee29e8b.js","assets/date-fns-975a2d8f.js","assets/whisper-61451957.css","assets/post-item.vue_vue_type_style_index_0_lang-a5e9cab2.js","assets/content-0e30acaf.js","assets/@vicons-7a4ef312.js","assets/paopao-video-player-2fe58954.js","assets/content-2fda112b.css","assets/vuex-44de225f.js","assets/vue-router-e5a2430e.js","assets/copy-to-clipboard-4ef7d3eb.js","assets/@babel-725317a4.js","assets/toggle-selection-93f4ad84.js","assets/post-item-d81938d1.css","assets/post-skeleton-4d2b103e.js","assets/post-skeleton-f1900002.css","assets/lodash-e0b37ac3.js","assets/IEnum-5453a777.js","assets/main-nav.vue_vue_type_style_index_0_lang-2982e04a.js","assets/main-nav-569a7b0c.css","assets/v3-infinite-loading-2c58ec2f.js","assets/v3-infinite-loading-1ff9ffe7.css","assets/@opentiny-d73a2d67.js","assets/vue-1e3b54ec.js","assets/xss-a5544f63.js","assets/cssfilter-af71ba68.js","assets/@opentiny-0f942bd4.css","assets/axios-4a70c6fc.js","assets/moment-2ab8298d.js","assets/Home-b58ba6dd.css","assets/vfonts-7afd136d.css"])},{path:"/post",name:"post",meta:{title:"泡泡详情"},component:()=>T(()=>import("./Post-8403b241.js"),["assets/Post-8403b241.js","assets/@vue-a481fc63.js","assets/vuex-44de225f.js","assets/IEnum-5453a777.js","assets/@vicons-7a4ef312.js","assets/naive-ui-d8de3dda.js","assets/seemly-76b7b838.js","assets/vueuc-39372edb.js","assets/evtd-b614532e.js","assets/@css-render-7124a1a5.js","assets/vooks-6d99783e.js","assets/vdirs-b0483831.js","assets/@juggle-41516555.js","assets/css-render-6a5c5852.js","assets/@emotion-8a8e73f6.js","assets/lodash-es-8412e618.js","assets/treemate-25c27bff.js","assets/async-validator-dee29e8b.js","assets/date-fns-975a2d8f.js","assets/content-0e30acaf.js","assets/paopao-video-player-2fe58954.js","assets/content-2fda112b.css","assets/vue-router-e5a2430e.js","assets/post-skeleton-4d2b103e.js","assets/post-skeleton-f1900002.css","assets/lodash-e0b37ac3.js","assets/@babel-725317a4.js","assets/whisper-7dcedd50.js","assets/whisper-61451957.css","assets/copy-to-clipboard-4ef7d3eb.js","assets/toggle-selection-93f4ad84.js","assets/main-nav.vue_vue_type_style_index_0_lang-2982e04a.js","assets/main-nav-569a7b0c.css","assets/v3-infinite-loading-2c58ec2f.js","assets/v3-infinite-loading-1ff9ffe7.css","assets/axios-4a70c6fc.js","assets/moment-2ab8298d.js","assets/Post-8fdcb727.css","assets/vfonts-7afd136d.css"])},{path:"/topic",name:"topic",meta:{title:"话题"},component:()=>T(()=>import("./Topic-a63673d1.js"),["assets/Topic-a63673d1.js","assets/@vicons-7a4ef312.js","assets/@vue-a481fc63.js","assets/naive-ui-d8de3dda.js","assets/seemly-76b7b838.js","assets/vueuc-39372edb.js","assets/evtd-b614532e.js","assets/@css-render-7124a1a5.js","assets/vooks-6d99783e.js","assets/vdirs-b0483831.js","assets/@juggle-41516555.js","assets/css-render-6a5c5852.js","assets/@emotion-8a8e73f6.js","assets/lodash-es-8412e618.js","assets/treemate-25c27bff.js","assets/async-validator-dee29e8b.js","assets/date-fns-975a2d8f.js","assets/main-nav.vue_vue_type_style_index_0_lang-2982e04a.js","assets/vuex-44de225f.js","assets/vue-router-e5a2430e.js","assets/main-nav-569a7b0c.css","assets/axios-4a70c6fc.js","assets/moment-2ab8298d.js","assets/Topic-384e019e.css","assets/vfonts-7afd136d.css"])},{path:"/anouncement",name:"anouncement",meta:{title:"公告"},component:()=>T(()=>import("./Anouncement-2531033c.js"),["assets/Anouncement-2531033c.js","assets/post-skeleton-4d2b103e.js","assets/naive-ui-d8de3dda.js","assets/seemly-76b7b838.js","assets/@vue-a481fc63.js","assets/vueuc-39372edb.js","assets/evtd-b614532e.js","assets/@css-render-7124a1a5.js","assets/vooks-6d99783e.js","assets/vdirs-b0483831.js","assets/@juggle-41516555.js","assets/css-render-6a5c5852.js","assets/@emotion-8a8e73f6.js","assets/lodash-es-8412e618.js","assets/treemate-25c27bff.js","assets/async-validator-dee29e8b.js","assets/date-fns-975a2d8f.js","assets/post-skeleton-f1900002.css","assets/main-nav.vue_vue_type_style_index_0_lang-2982e04a.js","assets/vuex-44de225f.js","assets/vue-router-e5a2430e.js","assets/@vicons-7a4ef312.js","assets/main-nav-569a7b0c.css","assets/axios-4a70c6fc.js","assets/moment-2ab8298d.js","assets/Anouncement-662e2d95.css","assets/vfonts-7afd136d.css"])},{path:"/profile",name:"profile",meta:{title:"主页"},component:()=>T(()=>import("./Profile-6e748e2f.js"),["assets/Profile-6e748e2f.js","assets/whisper-7dcedd50.js","assets/naive-ui-d8de3dda.js","assets/seemly-76b7b838.js","assets/@vue-a481fc63.js","assets/vueuc-39372edb.js","assets/evtd-b614532e.js","assets/@css-render-7124a1a5.js","assets/vooks-6d99783e.js","assets/vdirs-b0483831.js","assets/@juggle-41516555.js","assets/css-render-6a5c5852.js","assets/@emotion-8a8e73f6.js","assets/lodash-es-8412e618.js","assets/treemate-25c27bff.js","assets/async-validator-dee29e8b.js","assets/date-fns-975a2d8f.js","assets/whisper-61451957.css","assets/post-item.vue_vue_type_style_index_0_lang-a5e9cab2.js","assets/content-0e30acaf.js","assets/@vicons-7a4ef312.js","assets/paopao-video-player-2fe58954.js","assets/content-2fda112b.css","assets/vuex-44de225f.js","assets/vue-router-e5a2430e.js","assets/copy-to-clipboard-4ef7d3eb.js","assets/@babel-725317a4.js","assets/toggle-selection-93f4ad84.js","assets/post-item-d81938d1.css","assets/post-skeleton-4d2b103e.js","assets/post-skeleton-f1900002.css","assets/main-nav.vue_vue_type_style_index_0_lang-2982e04a.js","assets/main-nav-569a7b0c.css","assets/v3-infinite-loading-2c58ec2f.js","assets/v3-infinite-loading-1ff9ffe7.css","assets/axios-4a70c6fc.js","assets/moment-2ab8298d.js","assets/Profile-3ffb7be9.css","assets/vfonts-7afd136d.css"])},{path:"/u",name:"user",meta:{title:"用户详情"},component:()=>T(()=>import("./User-9ecd5433.js"),["assets/User-9ecd5433.js","assets/post-item.vue_vue_type_style_index_0_lang-a5e9cab2.js","assets/content-0e30acaf.js","assets/@vue-a481fc63.js","assets/@vicons-7a4ef312.js","assets/naive-ui-d8de3dda.js","assets/seemly-76b7b838.js","assets/vueuc-39372edb.js","assets/evtd-b614532e.js","assets/@css-render-7124a1a5.js","assets/vooks-6d99783e.js","assets/vdirs-b0483831.js","assets/@juggle-41516555.js","assets/css-render-6a5c5852.js","assets/@emotion-8a8e73f6.js","assets/lodash-es-8412e618.js","assets/treemate-25c27bff.js","assets/async-validator-dee29e8b.js","assets/date-fns-975a2d8f.js","assets/paopao-video-player-2fe58954.js","assets/content-2fda112b.css","assets/vuex-44de225f.js","assets/vue-router-e5a2430e.js","assets/copy-to-clipboard-4ef7d3eb.js","assets/@babel-725317a4.js","assets/toggle-selection-93f4ad84.js","assets/post-item-d81938d1.css","assets/post-skeleton-4d2b103e.js","assets/post-skeleton-f1900002.css","assets/whisper-7dcedd50.js","assets/whisper-61451957.css","assets/main-nav.vue_vue_type_style_index_0_lang-2982e04a.js","assets/main-nav-569a7b0c.css","assets/v3-infinite-loading-2c58ec2f.js","assets/v3-infinite-loading-1ff9ffe7.css","assets/axios-4a70c6fc.js","assets/moment-2ab8298d.js","assets/User-b21ba7c9.css","assets/vfonts-7afd136d.css"])},{path:"/messages",name:"messages",meta:{title:"消息"},component:()=>T(()=>import("./Messages-8ba7b532.js"),["assets/Messages-8ba7b532.js","assets/@vue-a481fc63.js","assets/vuex-44de225f.js","assets/vue-router-e5a2430e.js","assets/@vicons-7a4ef312.js","assets/naive-ui-d8de3dda.js","assets/seemly-76b7b838.js","assets/vueuc-39372edb.js","assets/evtd-b614532e.js","assets/@css-render-7124a1a5.js","assets/vooks-6d99783e.js","assets/vdirs-b0483831.js","assets/@juggle-41516555.js","assets/css-render-6a5c5852.js","assets/@emotion-8a8e73f6.js","assets/lodash-es-8412e618.js","assets/treemate-25c27bff.js","assets/async-validator-dee29e8b.js","assets/date-fns-975a2d8f.js","assets/whisper-7dcedd50.js","assets/whisper-61451957.css","assets/main-nav.vue_vue_type_style_index_0_lang-2982e04a.js","assets/main-nav-569a7b0c.css","assets/axios-4a70c6fc.js","assets/moment-2ab8298d.js","assets/Messages-3c6066fb.css","assets/vfonts-7afd136d.css"])},{path:"/collection",name:"collection",meta:{title:"收藏"},component:()=>T(()=>import("./Collection-6b9226c9.js"),["assets/Collection-6b9226c9.js","assets/whisper-7dcedd50.js","assets/naive-ui-d8de3dda.js","assets/seemly-76b7b838.js","assets/@vue-a481fc63.js","assets/vueuc-39372edb.js","assets/evtd-b614532e.js","assets/@css-render-7124a1a5.js","assets/vooks-6d99783e.js","assets/vdirs-b0483831.js","assets/@juggle-41516555.js","assets/css-render-6a5c5852.js","assets/@emotion-8a8e73f6.js","assets/lodash-es-8412e618.js","assets/treemate-25c27bff.js","assets/async-validator-dee29e8b.js","assets/date-fns-975a2d8f.js","assets/whisper-61451957.css","assets/post-item.vue_vue_type_style_index_0_lang-a5e9cab2.js","assets/content-0e30acaf.js","assets/@vicons-7a4ef312.js","assets/paopao-video-player-2fe58954.js","assets/content-2fda112b.css","assets/vuex-44de225f.js","assets/vue-router-e5a2430e.js","assets/copy-to-clipboard-4ef7d3eb.js","assets/@babel-725317a4.js","assets/toggle-selection-93f4ad84.js","assets/post-item-d81938d1.css","assets/post-skeleton-4d2b103e.js","assets/post-skeleton-f1900002.css","assets/main-nav.vue_vue_type_style_index_0_lang-2982e04a.js","assets/main-nav-569a7b0c.css","assets/axios-4a70c6fc.js","assets/moment-2ab8298d.js","assets/Collection-5c3a44e2.css","assets/vfonts-7afd136d.css"])},{path:"/contacts",name:"contacts",meta:{title:"好友"},component:()=>T(()=>import("./Contacts-cf96d2d4.js"),["assets/Contacts-cf96d2d4.js","assets/whisper-7dcedd50.js","assets/naive-ui-d8de3dda.js","assets/seemly-76b7b838.js","assets/@vue-a481fc63.js","assets/vueuc-39372edb.js","assets/evtd-b614532e.js","assets/@css-render-7124a1a5.js","assets/vooks-6d99783e.js","assets/vdirs-b0483831.js","assets/@juggle-41516555.js","assets/css-render-6a5c5852.js","assets/@emotion-8a8e73f6.js","assets/lodash-es-8412e618.js","assets/treemate-25c27bff.js","assets/async-validator-dee29e8b.js","assets/date-fns-975a2d8f.js","assets/whisper-61451957.css","assets/@vicons-7a4ef312.js","assets/post-skeleton-4d2b103e.js","assets/post-skeleton-f1900002.css","assets/main-nav.vue_vue_type_style_index_0_lang-2982e04a.js","assets/vuex-44de225f.js","assets/vue-router-e5a2430e.js","assets/main-nav-569a7b0c.css","assets/axios-4a70c6fc.js","assets/moment-2ab8298d.js","assets/Contacts-7fa3e0d6.css","assets/vfonts-7afd136d.css"])},{path:"/following",name:"following",meta:{title:"关注"},component:()=>T(()=>import("./Following-3b99fb7a.js"),["assets/Following-3b99fb7a.js","assets/whisper-7dcedd50.js","assets/naive-ui-d8de3dda.js","assets/seemly-76b7b838.js","assets/@vue-a481fc63.js","assets/vueuc-39372edb.js","assets/evtd-b614532e.js","assets/@css-render-7124a1a5.js","assets/vooks-6d99783e.js","assets/vdirs-b0483831.js","assets/@juggle-41516555.js","assets/css-render-6a5c5852.js","assets/@emotion-8a8e73f6.js","assets/lodash-es-8412e618.js","assets/treemate-25c27bff.js","assets/async-validator-dee29e8b.js","assets/date-fns-975a2d8f.js","assets/whisper-61451957.css","assets/vue-router-e5a2430e.js","assets/@vicons-7a4ef312.js","assets/post-skeleton-4d2b103e.js","assets/post-skeleton-f1900002.css","assets/main-nav.vue_vue_type_style_index_0_lang-2982e04a.js","assets/vuex-44de225f.js","assets/main-nav-569a7b0c.css","assets/axios-4a70c6fc.js","assets/moment-2ab8298d.js","assets/Following-6aa7d36c.css","assets/vfonts-7afd136d.css"])},{path:"/wallet",name:"wallet",meta:{title:"钱包"},component:()=>T(()=>import("./Wallet-22a3cef6.js"),["assets/Wallet-22a3cef6.js","assets/post-skeleton-4d2b103e.js","assets/naive-ui-d8de3dda.js","assets/seemly-76b7b838.js","assets/@vue-a481fc63.js","assets/vueuc-39372edb.js","assets/evtd-b614532e.js","assets/@css-render-7124a1a5.js","assets/vooks-6d99783e.js","assets/vdirs-b0483831.js","assets/@juggle-41516555.js","assets/css-render-6a5c5852.js","assets/@emotion-8a8e73f6.js","assets/lodash-es-8412e618.js","assets/treemate-25c27bff.js","assets/async-validator-dee29e8b.js","assets/date-fns-975a2d8f.js","assets/post-skeleton-f1900002.css","assets/main-nav.vue_vue_type_style_index_0_lang-2982e04a.js","assets/vuex-44de225f.js","assets/vue-router-e5a2430e.js","assets/@vicons-7a4ef312.js","assets/main-nav-569a7b0c.css","assets/qrcode-9719fc56.js","assets/encode-utf8-f813de00.js","assets/dijkstrajs-f906a09e.js","assets/axios-4a70c6fc.js","assets/moment-2ab8298d.js","assets/Wallet-77044929.css","assets/vfonts-7afd136d.css"])},{path:"/setting",name:"setting",meta:{title:"设置"},component:()=>T(()=>import("./Setting-bde8e499.js"),["assets/Setting-bde8e499.js","assets/main-nav.vue_vue_type_style_index_0_lang-2982e04a.js","assets/vuex-44de225f.js","assets/@vue-a481fc63.js","assets/vue-router-e5a2430e.js","assets/vooks-6d99783e.js","assets/evtd-b614532e.js","assets/@vicons-7a4ef312.js","assets/naive-ui-d8de3dda.js","assets/seemly-76b7b838.js","assets/vueuc-39372edb.js","assets/@css-render-7124a1a5.js","assets/vdirs-b0483831.js","assets/@juggle-41516555.js","assets/css-render-6a5c5852.js","assets/@emotion-8a8e73f6.js","assets/lodash-es-8412e618.js","assets/treemate-25c27bff.js","assets/async-validator-dee29e8b.js","assets/date-fns-975a2d8f.js","assets/main-nav-569a7b0c.css","assets/axios-4a70c6fc.js","assets/moment-2ab8298d.js","assets/Setting-bfd24152.css","assets/vfonts-7afd136d.css"])},{path:"/404",name:"404",meta:{title:"404"},component:()=>T(()=>import("./404-e41e3193.js"),["assets/404-e41e3193.js","assets/main-nav.vue_vue_type_style_index_0_lang-2982e04a.js","assets/vuex-44de225f.js","assets/@vue-a481fc63.js","assets/vue-router-e5a2430e.js","assets/vooks-6d99783e.js","assets/evtd-b614532e.js","assets/@vicons-7a4ef312.js","assets/naive-ui-d8de3dda.js","assets/seemly-76b7b838.js","assets/vueuc-39372edb.js","assets/@css-render-7124a1a5.js","assets/vdirs-b0483831.js","assets/@juggle-41516555.js","assets/css-render-6a5c5852.js","assets/@emotion-8a8e73f6.js","assets/lodash-es-8412e618.js","assets/treemate-25c27bff.js","assets/async-validator-dee29e8b.js","assets/date-fns-975a2d8f.js","assets/main-nav-569a7b0c.css","assets/axios-4a70c6fc.js","assets/moment-2ab8298d.js","assets/404-020b2afd.css","assets/vfonts-7afd136d.css"])},{path:"/:pathMatch(.*)",redirect:"/404"}],ve=Te({history:Ae(),routes:rt});ve.beforeEach((e,t,r)=>{document.title=`${e.meta.title} | 泡泡 - 一个清新文艺的微社区`,r()});const at=Ie({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,is_admin:!1}},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,is_admin:!1},e.userLogined=!1}},actions:{},modules:{}}),X=Re.create({baseURL:"",timeout:3e4});X.interceptors.request.use(e=>(localStorage.getItem("PAOPAO_TOKEN")&&(e.headers.Authorization="Bearer "+localStorage.getItem("PAOPAO_TOKEN")),e),e=>Promise.reject(e));X.interceptors.response.use(e=>{const{data:t={},code:r=0}=(e==null?void 0:e.data)||{};if(+r==0)return t||{};Promise.reject((e==null?void 0:e.data)||{})},(e={})=>{var r;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(((r=t==null?void 0:t.data)==null?void 0:r.msg)||"请求失败"),Promise.reject((t==null?void 0:t.data)||{})});function o(e){return X(e)}const ce=e=>o({method:"post",url:"/v1/auth/login",data:e}),lt=e=>o({method:"post",url:"/v1/auth/register",data:e}),G=(e="")=>o({method:"get",url:"/v1/user/info",headers:{Authorization:`Bearer ${e}`}}),ut={class:"auth-wrap"},it={key:0},ct=Y({__name:"auth",setup(e){const t=k("true".toLowerCase()==="true"),r=B(),c=k(!1),i=k(),n=oe({username:"",password:""}),m=k(),d=oe({username:"",password:"",repassword:""}),S={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"}]},v=_=>{var u;_.preventDefault(),_.stopPropagation(),(u=i.value)==null||u.validate(I=>{I||(c.value=!0,ce({username:n.username,password:n.password}).then(h=>{const R=(h==null?void 0:h.token)||"";return localStorage.setItem("PAOPAO_TOKEN",R),G(R)}).then(h=>{window.$message.success("登录成功"),c.value=!1,r.commit("updateUserinfo",h),r.commit("triggerAuth",!1),r.commit("refresh"),n.username="",n.password=""}).catch(h=>{c.value=!1}))})},b=_=>{var u;_.preventDefault(),_.stopPropagation(),(u=m.value)==null||u.validate(I=>{I||(c.value=!0,lt({username:d.username,password:d.password}).then(h=>ce({username:d.username,password:d.password})).then(h=>{const R=(h==null?void 0:h.token)||"";return localStorage.setItem("PAOPAO_TOKEN",R),G(R)}).then(h=>{window.$message.success("注册成功"),c.value=!1,r.commit("updateUserinfo",h),r.commit("triggerAuth",!1),d.username="",d.password="",d.repassword=""}).catch(h=>{c.value=!1}))})};return Z(()=>{const _=localStorage.getItem("PAOPAO_TOKEN")||"";_?G(_).then(u=>{r.commit("updateUserinfo",u),r.commit("triggerAuth",!1)}).catch(u=>{r.commit("userLogout")}):r.commit("userLogout")}),(_,u)=>{const I=Ce,h=$e,R=_e,C=he,O=Me,x=Se,l=ge,L=Ue,F=De,H=fe,V=xe;return w(),K(V,{show:f(r).state.authModalShow,"onUpdate:show":u[7]||(u[7]=p=>f(r).state.authModalShow=p),class:"auth-card",preset:"card",size:"small","mask-closable":!1,bordered:!1,style:{width:"360px"}},{default:a(()=>[y("div",ut,[s(H,{bordered:!1},{default:a(()=>[t.value?M("",!0):(w(),E("div",it,[s(R,{justify:"center"},{default:a(()=>[s(h,null,{default:a(()=>[s(I,{type:"success"},{default:a(()=>[U("账号登录")]),_:1})]),_:1})]),_:1}),s(x,{ref_key:"loginRef",ref:i,model:n,rules:{username:{required:!0,message:"请输入账户名"},password:{required:!0,message:"请输入密码"}}},{default:a(()=>[s(O,{label:"账户",path:"username"},{default:a(()=>[s(C,{value:n.username,"onUpdate:value":u[0]||(u[0]=p=>n.username=p),placeholder:"请输入用户名",onKeyup:q(N(v,["prevent"]),["enter"])},null,8,["value","onKeyup"])]),_:1}),s(O,{label:"密码",path:"password"},{default:a(()=>[s(C,{type:"password","show-password-on":"mousedown",value:n.password,"onUpdate:value":u[1]||(u[1]=p=>n.password=p),placeholder:"请输入账户密码",onKeyup:q(N(v,["prevent"]),["enter"])},null,8,["value","onKeyup"])]),_:1})]),_:1},8,["model"]),s(l,{type:"primary",block:"",secondary:"",strong:"",loading:c.value,onClick:v},{default:a(()=>[U(" 登录 ")]),_:1},8,["loading"])])),t.value?(w(),K(F,{key:1,"default-value":f(r).state.authModelTab,size:"large","justify-content":"space-evenly"},{default:a(()=>[s(L,{name:"signin",tab:"登录"},{default:a(()=>[s(x,{ref_key:"loginRef",ref:i,model:n,rules:{username:{required:!0,message:"请输入账户名"},password:{required:!0,message:"请输入密码"}}},{default:a(()=>[s(O,{label:"账户",path:"username"},{default:a(()=>[s(C,{value:n.username,"onUpdate:value":u[2]||(u[2]=p=>n.username=p),placeholder:"请输入用户名",onKeyup:q(N(v,["prevent"]),["enter"])},null,8,["value","onKeyup"])]),_:1}),s(O,{label:"密码",path:"password"},{default:a(()=>[s(C,{type:"password","show-password-on":"mousedown",value:n.password,"onUpdate:value":u[3]||(u[3]=p=>n.password=p),placeholder:"请输入账户密码",onKeyup:q(N(v,["prevent"]),["enter"])},null,8,["value","onKeyup"])]),_:1})]),_:1},8,["model"]),s(l,{type:"primary",block:"",secondary:"",strong:"",loading:c.value,onClick:v},{default:a(()=>[U(" 登录 ")]),_:1},8,["loading"])]),_:1}),s(L,{name:"signup",tab:"注册"},{default:a(()=>[s(x,{ref_key:"registerRef",ref:m,model:d,rules:S},{default:a(()=>[s(O,{label:"用户名",path:"username"},{default:a(()=>[s(C,{value:d.username,"onUpdate:value":u[4]||(u[4]=p=>d.username=p),placeholder:"用户名注册后无法修改"},null,8,["value"])]),_:1}),s(O,{label:"密码",path:"password"},{default:a(()=>[s(C,{type:"password","show-password-on":"mousedown",placeholder:"密码不少于6位",value:d.password,"onUpdate:value":u[5]||(u[5]=p=>d.password=p),onKeyup:q(N(b,["prevent"]),["enter"])},null,8,["value","onKeyup"])]),_:1}),s(O,{label:"重复密码",path:"repassword"},{default:a(()=>[s(C,{type:"password","show-password-on":"mousedown",placeholder:"请再次输入密码",value:d.repassword,"onUpdate:value":u[6]||(u[6]=p=>d.repassword=p),onKeyup:q(N(b,["prevent"]),["enter"])},null,8,["value","onKeyup"])]),_:1})]),_:1},8,["model"]),s(l,{type:"primary",block:"",secondary:"",strong:"",loading:c.value,onClick:b},{default:a(()=>[U(" 注册 ")]),_:1},8,["loading"])]),_:1})]),_:1},8,["default-value"])):M("",!0)]),_:1})])]),_:1},8,["show"])}}});const we=(e,t)=>{const r=e.__vccOpts||e;for(const[c,i]of t)r[c]=i;return r},dt=we(ct,[["__scopeId","data-v-053dfa44"]]),io=e=>o({method:"get",url:"/v1/posts",params:e}),mt=e=>o({method:"get",url:"/v1/tags",params:e}),co=e=>o({method:"get",url:"/v1/post",params:e}),mo=e=>o({method:"get",url:"/v1/post/star",params:e}),po=e=>o({method:"post",url:"/v1/post/star",data:e}),_o=e=>o({method:"get",url:"/v1/post/collection",params:e}),ho=e=>o({method:"post",url:"/v1/post/collection",data:e}),go=e=>o({method:"get",url:"/v1/post/comments",params:e}),fo=e=>o({method:"get",url:"/v1/user/contacts",params:e}),vo=e=>o({method:"post",url:"/v1/post",data:e}),wo=e=>o({method:"delete",url:"/v1/post",data:e}),yo=e=>o({method:"post",url:"/v1/post/lock",data:e}),bo=e=>o({method:"post",url:"/v1/post/stick",data:e}),ko=e=>o({method:"post",url:"/v1/post/highlight",data:e}),Po=e=>o({method:"post",url:"/v1/post/visibility",data:e}),Oo=e=>o({method:"post",url:"/v1/tweet/comment/thumbsup",data:e}),Lo=e=>o({method:"post",url:"/v1/tweet/comment/thumbsdown",data:e}),To=e=>o({method:"post",url:"/v1/tweet/reply/thumbsup",data:e}),Ao=e=>o({method:"post",url:"/v1/tweet/reply/thumbsdown",data:e}),Eo=e=>o({method:"post",url:"/v1/post/comment",data:e}),Io=e=>o({method:"delete",url:"/v1/post/comment",data:e}),Ro=e=>o({method:"post",url:"/v1/post/comment/reply",data:e}),Co=e=>o({method:"delete",url:"/v1/post/comment/reply",data:e}),$o=e=>o({method:"post",url:"/v1/topic/stick",data:e}),Mo=e=>o({method:"post",url:"/v1/topic/follow",data:e}),So=e=>o({method:"post",url:"/v1/topic/unfollow",data:e}),Uo=(e={})=>o({method:"get",url:"/v1/captcha",params:e}),Do=e=>o({method:"post",url:"/v1/captcha",data:e}),xo=e=>o({method:"post",url:"/v1/user/whisper",data:e}),qo=e=>o({method:"post",url:"/v1/friend/requesting",data:e}),No=e=>o({method:"post",url:"/v1/friend/add",data:e}),Ko=e=>o({method:"post",url:"/v1/user/follow",data:e}),Fo=e=>o({method:"post",url:"/v1/user/unfollow",data:e}),Vo=e=>o({method:"get",url:"/v1/user/follows",params:e}),zo=e=>o({method:"get",url:"/v1/user/followings",params:e}),Ho=e=>o({method:"post",url:"/v1/friend/reject",data:e}),Wo=e=>o({method:"post",url:"/v1/friend/delete",data:e}),Yo=e=>o({method:"post",url:"/v1/user/phone",data:e}),Bo=e=>o({method:"post",url:"/v1/user/activate",data:e}),jo=e=>o({method:"post",url:"/v1/user/password",data:e}),Go=e=>o({method:"post",url:"/v1/user/nickname",data:e}),Qo=e=>o({method:"post",url:"/v1/user/avatar",data:e}),de=(e={})=>o({method:"get",url:"/v1/user/msgcount/unread",params:e}),Zo=e=>o({method:"get",url:"/v1/user/messages",params:e}),Jo=e=>o({method:"post",url:"/v1/user/message/read",data:e}),Xo=e=>o({method:"get",url:"/v1/user/collections",params:e}),es=e=>o({method:"get",url:"/v1/user/profile",params:e}),ts=e=>o({method:"get",url:"/v1/user/posts",params:e}),os=e=>o({method:"get",url:"/v1/user/wallet/bills",params:e}),ss=e=>o({method:"post",url:"/v1/user/recharge",data:e}),ns=e=>o({method:"get",url:"/v1/user/recharge",params:e}),rs=e=>o({method:"get",url:"/v1/suggest/users",params:e}),as=e=>o({method:"get",url:"/v1/suggest/tags",params:e}),ls=e=>o({method:"get",url:"/v1/attachment/precheck",params:e}),us=e=>o({method:"get",url:"/v1/attachment",params:e}),is=e=>o({method:"post",url:"/v1/admin/user/status",data:e}),pt=()=>o({method:"get",url:"/v1/admin/site/status"});D.locale("zh-cn");const _t=e=>D.unix(e).fromNow(),cs=e=>{let t=D.unix(e),r=D();return t.year()!=r.year()?t.utc(!0).format("YYYY-MM-DD HH:mm"):D().diff(t,"month")>3?t.utc(!0).format("MM-DD HH:mm"):t.fromNow()},ds=e=>{let t=D.unix(e),r=D();return t.year()!=r.year()?t.utc(!0).format("YYYY-MM-DD"):D().diff(t,"month")>3?t.utc(!0).format("MM-DD"):t.fromNow()},ms=e=>D.unix(e).utc(!0).format("YYYY年MM月"),ht={key:0,class:"rightbar-wrap"},gt={class:"search-wrap"},ft={class:"post-num"},vt={class:"post-num"},wt={class:"copyright"},yt=["href"],bt=["href"],kt={class:"site-info-item"},Pt=Y({__name:"rightbar",setup(e){const t=k([]),r=k([]),c=k(!1),i=k(""),n=B(),m=pe(),d=k(0),S=k(0),v=k(0),b=k(0),_=k(null),u="2023 paopao.info",I="Roc's Me",h="",R="泡泡(PaoPao)开源社区",C="https://www.paopao.info",O=+"6",x=+"12",l=()=>{pt().then(g=>{d.value=g.register_user_count,S.value=g.online_user_count,v.value=g.history_max_online,b.value=g.server_up_time}).catch(g=>{}),p.disconnect()},L=()=>{c.value=!0,mt({type:"hot_extral",num:x,extral_num:O}).then(g=>{t.value=g.topics,r.value=g.extral_topics??[],V.value=!0,c.value=!1}).catch(g=>{c.value=!1})},F=g=>g>=1e3?(g/1e3).toFixed(1)+"k":g,H=()=>{m.push({name:"home",query:{q:i.value}})},V=J({get:()=>n.state.userLogined&&r.value.length!==0,set:g=>{}});Q(()=>({refreshTopicFollow:n.state.refreshTopicFollow,userLogined:n.state.userLogined}),(g,z)=>{(g.refreshTopicFollow!==z.refreshTopicFollow||g.userLogined)&&L(),n.state.userInfo.is_admin&&l()});const p=new IntersectionObserver(g=>{g.forEach(z=>{z.isIntersecting&&l()})},{root:null,rootMargin:"0px",threshold:1});return Z(()=>{_.value&&p.observe(_.value),L()}),(g,z)=>{const ye=W,be=he,ee=me("router-link"),te=qe,j=fe,ke=_e;return f(n).state.collapsedRight?M("",!0):(w(),E("div",ht,[y("div",gt,[s(be,{round:"",clearable:"",placeholder:"搜一搜...",value:i.value,"onUpdate:value":z[0]||(z[0]=$=>i.value=$),onKeyup:q(N(H,["prevent"]),["enter"])},{prefix:a(()=>[s(ye,{component:f(Ge)},null,8,["component"])]),_:1},8,["value","onKeyup"])]),V.value?(w(),K(j,{key:0,class:"hottopic-wrap",title:"关注话题",embedded:"",bordered:!1,size:"small"},{default:a(()=>[s(te,{show:c.value},{default:a(()=>[(w(!0),E(se,null,ne(r.value,$=>(w(),E("div",{class:"hot-tag-item",key:$.id},[s(ee,{class:"hash-link",to:{name:"home",query:{q:$.tag,t:"tag"}}},{default:a(()=>[U(" #"+A($.tag),1)]),_:2},1032,["to"]),y("div",ft,A(F($.quote_num)),1)]))),128))]),_:1},8,["show"])]),_:1})):M("",!0),s(j,{class:"hottopic-wrap",title:"热门话题",embedded:"",bordered:!1,size:"small"},{default:a(()=>[s(te,{show:c.value},{default:a(()=>[(w(!0),E(se,null,ne(t.value,$=>(w(),E("div",{class:"hot-tag-item",key:$.id},[s(ee,{class:"hash-link",to:{name:"home",query:{q:$.tag,t:"tag"}}},{default:a(()=>[U(" #"+A($.tag),1)]),_:2},1032,["to"]),y("div",vt,A(F($.quote_num)),1)]))),128))]),_:1},8,["show"])]),_:1}),s(j,{class:"copyright-wrap",embedded:"",bordered:!1,size:"small"},{default:a(()=>[y("div",wt,"© "+A(f(u)),1),y("div",null,[s(ke,null,{default:a(()=>[y("a",{href:f(h),target:"_blank",class:"hash-link"},A(f(I)),9,yt),y("a",{href:f(C),target:"_blank",class:"hash-link"},A(f(R)),9,bt)]),_:1})])]),_:1}),f(n).state.userInfo.is_admin?(w(),E("div",{key:1,class:"site-info",ref_key:"userInfoElement",ref:_},[y("span",kt,A(d.value)+" 注册用户,"+A(S.value)+" 人在线,最高在线 "+A(v.value)+" 人,站点上线于 "+A(f(_t)(b.value)),1)],512)):M("",!0)]))}}});const Ot=we(Pt,[["__scopeId","data-v-0a6cd0b6"]]),Lt="/assets/logo-52afee68.png",Tt={class:"sidebar-wrap"},At={class:"logo-wrap"},Et={key:0,class:"user-wrap"},It={class:"user-info"},Rt={class:"nickname"},Ct={class:"nickname-txt"},$t={class:"username"},Mt={class:"user-mini-wrap"},St={key:1,class:"user-wrap"},Ut={key:0,class:"login-only-wrap"},Dt={key:1,class:"login-wrap"},xt=Y({__name:"sidebar",setup(e){const t=B(),r=Ee(),c=pe(),i=k(!1),n=k(r.name||""),m=k(),d="true".toLowerCase()==="true",S="false".toLowerCase()==="true",v="false".toLocaleLowerCase()==="true",b=k("true".toLowerCase()==="true"),_=+"5000";Q(r,()=>{n.value=r.name}),Q(t.state,()=>{t.state.userInfo.id>0?m.value||(de().then(l=>{i.value=l.count>0}).catch(l=>{console.log(l)}),m.value=setInterval(()=>{de().then(l=>{i.value=l.count>0}).catch(l=>{console.log(l)})},_)):m.value&&clearInterval(m.value)}),Z(()=>{window.onresize=()=>{t.commit("triggerCollapsedLeft",document.body.clientWidth<=821),t.commit("triggerCollapsedRight",document.body.clientWidth<=821)}});const u=J(()=>{const l=[{label:"广场",key:"home",icon:()=>P(ae),href:"/"},{label:"话题",key:"topic",icon:()=>P(le),href:"/topic"}];return S&&l.push({label:"公告",key:"anouncement",icon:()=>P(Qe),href:"/anouncement"}),l.push({label:"主页",key:"profile",icon:()=>P(Ze),href:"/profile"}),l.push({label:"消息",key:"messages",icon:()=>P(Je),href:"/messages"}),l.push({label:"收藏",key:"collection",icon:()=>P(Xe),href:"/collection"}),d&&l.push({label:"好友",key:"contacts",icon:()=>P(et),href:"/contacts"}),v&&l.push({label:"钱包",key:"wallet",icon:()=>P(tt),href:"/wallet"}),l.push({label:"设置",key:"setting",icon:()=>P(ot),href:"/setting"}),t.state.userInfo.id>0?l:[{label:"广场",key:"home",icon:()=>P(ae),href:"/"},{label:"话题",key:"topic",icon:()=>P(le),href:"/topic"}]}),I=l=>"href"in l?P("div",{},l.label):l.label,h=l=>l.key==="messages"?P(Ke,{dot:!0,show:i.value,processing:!0},{default:()=>P(W,{color:l.key===n.value?"var(--n-item-icon-color-active)":"var(--n-item-icon-color)"},{default:l.icon})}):P(W,null,{default:l.icon}),R=(l,L={})=>{n.value=l,c.push({name:l,query:{t:new Date().getTime()}})},C=()=>{r.path==="/"&&t.commit("refresh"),R("home")},O=l=>{t.commit("triggerAuth",!0),t.commit("triggerAuthKey",l)},x=()=>{t.commit("userLogout"),t.commit("refresh"),C()};return window.$store=t,window.$message=Ne(),(l,L)=>{const F=Fe,H=Ve,V=ze,p=ge;return w(),E("div",Tt,[y("div",At,[s(F,{class:"logo-img",width:"36",src:f(Lt),"preview-disabled":!0,onClick:C},null,8,["src"])]),s(H,{accordion:!0,"icon-size":24,options:u.value,"render-label":I,"render-icon":h,value:n.value,"onUpdate:value":R},null,8,["options","value"]),f(t).state.userInfo.id>0?(w(),E("div",Et,[s(V,{class:"user-avatar",round:"",size:34,src:f(t).state.userInfo.avatar},null,8,["src"]),y("div",It,[y("div",Rt,[y("span",Ct,A(f(t).state.userInfo.nickname),1),s(p,{class:"logout",quaternary:"",circle:"",size:"tiny",onClick:x},{icon:a(()=>[s(f(W),null,{default:a(()=>[s(f(ue))]),_:1})]),_:1})]),y("div",$t,"@"+A(f(t).state.userInfo.username),1)]),y("div",Mt,[s(p,{class:"logout",quaternary:"",circle:"",onClick:x},{icon:a(()=>[s(f(W),{size:24},{default:a(()=>[s(f(ue))]),_:1})]),_:1})])])):(w(),E("div",St,[b.value?M("",!0):(w(),E("div",Ut,[s(p,{strong:"",secondary:"",round:"",type:"primary",onClick:L[0]||(L[0]=g=>O("signin"))},{default:a(()=>[U(" 登录 ")]),_:1})])),b.value?(w(),E("div",Dt,[s(p,{strong:"",secondary:"",round:"",type:"primary",onClick:L[1]||(L[1]=g=>O("signin"))},{default:a(()=>[U(" 登录 ")]),_:1}),s(p,{strong:"",secondary:"",round:"",type:"info",onClick:L[2]||(L[2]=g=>O("signup"))},{default:a(()=>[U(" 注册 ")]),_:1})])):M("",!0)]))])}}});const qt={"has-sider":"",class:"main-wrap",position:"static"},Nt={key:0},Kt={class:"content-wrap"},Ft=Y({__name:"App",setup(e){const t=B(),r=J(()=>t.state.theme==="dark"?We:null);return(c,i)=>{const n=xt,m=me("router-view"),d=Ot,S=dt,v=Ye,b=Be,_=je,u=He;return w(),K(u,{theme:r.value},{default:a(()=>[s(b,null,{default:a(()=>[s(v,null,{default:a(()=>{var I;return[y("div",{class:Oe(["app-container",{dark:((I=r.value)==null?void 0:I.name)==="dark",mobile:!f(t).state.desktopModelShow}])},[y("div",qt,[f(t).state.desktopModelShow?(w(),E("div",Nt,[s(n)])):M("",!0),y("div",Kt,[s(m,{class:"app-wrap"},{default:a(({Component:h})=>[(w(),K(Pe,null,[c.$route.meta.keepAlive?(w(),K(re(h),{key:0})):M("",!0)],1024)),c.$route.meta.keepAlive?M("",!0):(w(),K(re(h),{key:0}))]),_:1})]),s(d)]),s(S)],2)]}),_:1})]),_:1}),s(_)]),_:1},8,["theme"])}}});Le(Ft).use(ve).use(at).mount("#app");export{ns as $,$o as A,So as B,Mo as C,mt as D,_t as E,ms as F,qo as G,es as H,Wo as I,Fo as J,Ko as K,is as L,No as M,Ho as N,Jo as O,Zo as P,Xo as Q,ds as R,ls as S,us as T,Vo as U,zo as V,xo as W,G as X,os as Y,ss as Z,we as _,as as a,Uo as a0,Qo as a1,jo as a2,Yo as a3,Bo as a4,Go as a5,Do as a6,xt as a7,fo as b,vo as c,io as d,ts as e,cs as f,rs as g,Ao as h,Co as i,Oo as j,Lo as k,Ro as l,Io as m,Eo as n,mo as o,_o as p,wo as q,yo as r,bo as s,To as t,ko as u,Po as v,po as w,ho as x,co as y,go as z};
diff --git a/web/dist/assets/index-daff1b26.js b/web/dist/assets/index-daff1b26.js
new file mode 100644
index 00000000..8e700611
--- /dev/null
+++ b/web/dist/assets/index-daff1b26.js
@@ -0,0 +1 @@
+import{d as Y,H as k,R as oe,b as Z,e as w,q as K,w as a,j as y,k as s,f as E,A as U,Z as q,y as N,Y as M,bf as f,c as J,E as Q,r as me,F as se,u as ne,x as A,h as P,a5 as Pe,s as re,l as Oe,ag as Le}from"./@vue-a481fc63.js";import{c as Te,a as Ae,u as pe,b as Ee}from"./vue-router-e5a2430e.js";import{c as Ie,u as B}from"./vuex-44de225f.js";import{a as Re}from"./axios-4a70c6fc.js";import{_ as Ce,N as $e,a as _e,b as he,c as Me,d as Se,e as ge,f as Ue,g as De,h as fe,i as xe,j as W,k as qe,u as Ne,l as Ke,m as Fe,n as Ve,o as ze,p as He,q as We,r as Ye,s as Be,t as je}from"./naive-ui-defd0b2d.js";import{h as D}from"./moment-2ab8298d.js";import{S as Ge,M as Qe,L as Ze,C as Je,B as Xe,P as et,W as tt,a as ot,H as ae,b as le,c as ue}from"./@vicons-c265fba6.js";/* empty css */import"./seemly-76b7b838.js";import"./vueuc-39372edb.js";import"./evtd-b614532e.js";import"./@css-render-7124a1a5.js";import"./vooks-6d99783e.js";import"./vdirs-b0483831.js";import"./@juggle-41516555.js";import"./css-render-6a5c5852.js";import"./@emotion-8a8e73f6.js";import"./lodash-es-8412e618.js";import"./treemate-25c27bff.js";import"./async-validator-dee29e8b.js";import"./date-fns-975a2d8f.js";(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const 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 r(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=r(i);fetch(i.href,n)}})();const st="modulepreload",nt=function(e){return"/"+e},ie={},T=function(t,r,c){if(!r||r.length===0)return t();const i=document.getElementsByTagName("link");return Promise.all(r.map(n=>{if(n=nt(n),n in ie)return;ie[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 v=document.createElement("link");if(v.rel=m?"stylesheet":st,m||(v.as="script",v.crossOrigin=""),v.href=n,document.head.appendChild(v),m)return new Promise((b,_)=>{v.addEventListener("load",b),v.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})},rt=[{path:"/",name:"home",meta:{title:"广场",keepAlive:!0},component:()=>T(()=>import("./Home-f64ca6df.js"),["assets/Home-f64ca6df.js","assets/whisper-add-friend-7ede77e9.js","assets/naive-ui-defd0b2d.js","assets/seemly-76b7b838.js","assets/@vue-a481fc63.js","assets/vueuc-39372edb.js","assets/evtd-b614532e.js","assets/@css-render-7124a1a5.js","assets/vooks-6d99783e.js","assets/vdirs-b0483831.js","assets/@juggle-41516555.js","assets/css-render-6a5c5852.js","assets/@emotion-8a8e73f6.js","assets/lodash-es-8412e618.js","assets/treemate-25c27bff.js","assets/async-validator-dee29e8b.js","assets/date-fns-975a2d8f.js","assets/whisper-add-friend-01aea97d.css","assets/whisper-9b4eeceb.js","assets/whisper-61451957.css","assets/post-item.vue_vue_type_style_index_0_lang-c2092e3d.js","assets/content-64a02a2f.js","assets/@vicons-c265fba6.js","assets/paopao-video-player-2fe58954.js","assets/content-2fda112b.css","assets/vuex-44de225f.js","assets/vue-router-e5a2430e.js","assets/copy-to-clipboard-4ef7d3eb.js","assets/@babel-725317a4.js","assets/toggle-selection-93f4ad84.js","assets/post-item-d81938d1.css","assets/post-skeleton-8434d30b.js","assets/post-skeleton-f1900002.css","assets/lodash-e0b37ac3.js","assets/IEnum-5453a777.js","assets/main-nav.vue_vue_type_style_index_0_lang-93352cc4.js","assets/main-nav-569a7b0c.css","assets/v3-infinite-loading-2c58ec2f.js","assets/v3-infinite-loading-1ff9ffe7.css","assets/@opentiny-d73a2d67.js","assets/vue-1e3b54ec.js","assets/xss-a5544f63.js","assets/cssfilter-af71ba68.js","assets/@opentiny-0f942bd4.css","assets/axios-4a70c6fc.js","assets/moment-2ab8298d.js","assets/Home-a97c2703.css","assets/vfonts-7afd136d.css"])},{path:"/post",name:"post",meta:{title:"泡泡详情"},component:()=>T(()=>import("./Post-b0df23cb.js"),["assets/Post-b0df23cb.js","assets/@vue-a481fc63.js","assets/vuex-44de225f.js","assets/IEnum-5453a777.js","assets/@vicons-c265fba6.js","assets/naive-ui-defd0b2d.js","assets/seemly-76b7b838.js","assets/vueuc-39372edb.js","assets/evtd-b614532e.js","assets/@css-render-7124a1a5.js","assets/vooks-6d99783e.js","assets/vdirs-b0483831.js","assets/@juggle-41516555.js","assets/css-render-6a5c5852.js","assets/@emotion-8a8e73f6.js","assets/lodash-es-8412e618.js","assets/treemate-25c27bff.js","assets/async-validator-dee29e8b.js","assets/date-fns-975a2d8f.js","assets/content-64a02a2f.js","assets/paopao-video-player-2fe58954.js","assets/content-2fda112b.css","assets/vue-router-e5a2430e.js","assets/post-skeleton-8434d30b.js","assets/post-skeleton-f1900002.css","assets/lodash-e0b37ac3.js","assets/@babel-725317a4.js","assets/whisper-9b4eeceb.js","assets/whisper-61451957.css","assets/copy-to-clipboard-4ef7d3eb.js","assets/toggle-selection-93f4ad84.js","assets/main-nav.vue_vue_type_style_index_0_lang-93352cc4.js","assets/main-nav-569a7b0c.css","assets/v3-infinite-loading-2c58ec2f.js","assets/v3-infinite-loading-1ff9ffe7.css","assets/axios-4a70c6fc.js","assets/moment-2ab8298d.js","assets/Post-cb9db946.css","assets/vfonts-7afd136d.css"])},{path:"/topic",name:"topic",meta:{title:"话题"},component:()=>T(()=>import("./Topic-9f150caf.js"),["assets/Topic-9f150caf.js","assets/@vicons-c265fba6.js","assets/@vue-a481fc63.js","assets/naive-ui-defd0b2d.js","assets/seemly-76b7b838.js","assets/vueuc-39372edb.js","assets/evtd-b614532e.js","assets/@css-render-7124a1a5.js","assets/vooks-6d99783e.js","assets/vdirs-b0483831.js","assets/@juggle-41516555.js","assets/css-render-6a5c5852.js","assets/@emotion-8a8e73f6.js","assets/lodash-es-8412e618.js","assets/treemate-25c27bff.js","assets/async-validator-dee29e8b.js","assets/date-fns-975a2d8f.js","assets/main-nav.vue_vue_type_style_index_0_lang-93352cc4.js","assets/vuex-44de225f.js","assets/vue-router-e5a2430e.js","assets/main-nav-569a7b0c.css","assets/axios-4a70c6fc.js","assets/moment-2ab8298d.js","assets/Topic-384e019e.css","assets/vfonts-7afd136d.css"])},{path:"/anouncement",name:"anouncement",meta:{title:"公告"},component:()=>T(()=>import("./Anouncement-dfa91637.js"),["assets/Anouncement-dfa91637.js","assets/post-skeleton-8434d30b.js","assets/naive-ui-defd0b2d.js","assets/seemly-76b7b838.js","assets/@vue-a481fc63.js","assets/vueuc-39372edb.js","assets/evtd-b614532e.js","assets/@css-render-7124a1a5.js","assets/vooks-6d99783e.js","assets/vdirs-b0483831.js","assets/@juggle-41516555.js","assets/css-render-6a5c5852.js","assets/@emotion-8a8e73f6.js","assets/lodash-es-8412e618.js","assets/treemate-25c27bff.js","assets/async-validator-dee29e8b.js","assets/date-fns-975a2d8f.js","assets/post-skeleton-f1900002.css","assets/main-nav.vue_vue_type_style_index_0_lang-93352cc4.js","assets/vuex-44de225f.js","assets/vue-router-e5a2430e.js","assets/@vicons-c265fba6.js","assets/main-nav-569a7b0c.css","assets/axios-4a70c6fc.js","assets/moment-2ab8298d.js","assets/Anouncement-662e2d95.css","assets/vfonts-7afd136d.css"])},{path:"/profile",name:"profile",meta:{title:"主页"},component:()=>T(()=>import("./Profile-4778c0d5.js"),["assets/Profile-4778c0d5.js","assets/whisper-9b4eeceb.js","assets/@vue-a481fc63.js","assets/naive-ui-defd0b2d.js","assets/seemly-76b7b838.js","assets/vueuc-39372edb.js","assets/evtd-b614532e.js","assets/@css-render-7124a1a5.js","assets/vooks-6d99783e.js","assets/vdirs-b0483831.js","assets/@juggle-41516555.js","assets/css-render-6a5c5852.js","assets/@emotion-8a8e73f6.js","assets/lodash-es-8412e618.js","assets/treemate-25c27bff.js","assets/async-validator-dee29e8b.js","assets/date-fns-975a2d8f.js","assets/whisper-61451957.css","assets/post-item.vue_vue_type_style_index_0_lang-c2092e3d.js","assets/content-64a02a2f.js","assets/@vicons-c265fba6.js","assets/paopao-video-player-2fe58954.js","assets/content-2fda112b.css","assets/vuex-44de225f.js","assets/vue-router-e5a2430e.js","assets/copy-to-clipboard-4ef7d3eb.js","assets/@babel-725317a4.js","assets/toggle-selection-93f4ad84.js","assets/post-item-d81938d1.css","assets/post-skeleton-8434d30b.js","assets/post-skeleton-f1900002.css","assets/main-nav.vue_vue_type_style_index_0_lang-93352cc4.js","assets/main-nav-569a7b0c.css","assets/v3-infinite-loading-2c58ec2f.js","assets/v3-infinite-loading-1ff9ffe7.css","assets/axios-4a70c6fc.js","assets/moment-2ab8298d.js","assets/Profile-5fc46d20.css","assets/vfonts-7afd136d.css"])},{path:"/u",name:"user",meta:{title:"用户详情"},component:()=>T(()=>import("./User-5ca51361.js"),["assets/User-5ca51361.js","assets/post-item.vue_vue_type_style_index_0_lang-c2092e3d.js","assets/content-64a02a2f.js","assets/@vue-a481fc63.js","assets/@vicons-c265fba6.js","assets/naive-ui-defd0b2d.js","assets/seemly-76b7b838.js","assets/vueuc-39372edb.js","assets/evtd-b614532e.js","assets/@css-render-7124a1a5.js","assets/vooks-6d99783e.js","assets/vdirs-b0483831.js","assets/@juggle-41516555.js","assets/css-render-6a5c5852.js","assets/@emotion-8a8e73f6.js","assets/lodash-es-8412e618.js","assets/treemate-25c27bff.js","assets/async-validator-dee29e8b.js","assets/date-fns-975a2d8f.js","assets/paopao-video-player-2fe58954.js","assets/content-2fda112b.css","assets/vuex-44de225f.js","assets/vue-router-e5a2430e.js","assets/copy-to-clipboard-4ef7d3eb.js","assets/@babel-725317a4.js","assets/toggle-selection-93f4ad84.js","assets/post-item-d81938d1.css","assets/post-skeleton-8434d30b.js","assets/post-skeleton-f1900002.css","assets/whisper-9b4eeceb.js","assets/whisper-61451957.css","assets/main-nav.vue_vue_type_style_index_0_lang-93352cc4.js","assets/main-nav-569a7b0c.css","assets/whisper-add-friend-7ede77e9.js","assets/whisper-add-friend-01aea97d.css","assets/v3-infinite-loading-2c58ec2f.js","assets/v3-infinite-loading-1ff9ffe7.css","assets/axios-4a70c6fc.js","assets/moment-2ab8298d.js","assets/User-4853e1bd.css","assets/vfonts-7afd136d.css"])},{path:"/messages",name:"messages",meta:{title:"消息"},component:()=>T(()=>import("./Messages-fb6513c1.js"),["assets/Messages-fb6513c1.js","assets/@vue-a481fc63.js","assets/vuex-44de225f.js","assets/vue-router-e5a2430e.js","assets/@vicons-c265fba6.js","assets/naive-ui-defd0b2d.js","assets/seemly-76b7b838.js","assets/vueuc-39372edb.js","assets/evtd-b614532e.js","assets/@css-render-7124a1a5.js","assets/vooks-6d99783e.js","assets/vdirs-b0483831.js","assets/@juggle-41516555.js","assets/css-render-6a5c5852.js","assets/@emotion-8a8e73f6.js","assets/lodash-es-8412e618.js","assets/treemate-25c27bff.js","assets/async-validator-dee29e8b.js","assets/date-fns-975a2d8f.js","assets/whisper-9b4eeceb.js","assets/whisper-61451957.css","assets/main-nav.vue_vue_type_style_index_0_lang-93352cc4.js","assets/main-nav-569a7b0c.css","assets/axios-4a70c6fc.js","assets/moment-2ab8298d.js","assets/Messages-d1e2fa97.css","assets/vfonts-7afd136d.css"])},{path:"/collection",name:"collection",meta:{title:"收藏"},component:()=>T(()=>import("./Collection-25bed151.js"),["assets/Collection-25bed151.js","assets/whisper-9b4eeceb.js","assets/@vue-a481fc63.js","assets/naive-ui-defd0b2d.js","assets/seemly-76b7b838.js","assets/vueuc-39372edb.js","assets/evtd-b614532e.js","assets/@css-render-7124a1a5.js","assets/vooks-6d99783e.js","assets/vdirs-b0483831.js","assets/@juggle-41516555.js","assets/css-render-6a5c5852.js","assets/@emotion-8a8e73f6.js","assets/lodash-es-8412e618.js","assets/treemate-25c27bff.js","assets/async-validator-dee29e8b.js","assets/date-fns-975a2d8f.js","assets/whisper-61451957.css","assets/post-item.vue_vue_type_style_index_0_lang-c2092e3d.js","assets/content-64a02a2f.js","assets/@vicons-c265fba6.js","assets/paopao-video-player-2fe58954.js","assets/content-2fda112b.css","assets/vuex-44de225f.js","assets/vue-router-e5a2430e.js","assets/copy-to-clipboard-4ef7d3eb.js","assets/@babel-725317a4.js","assets/toggle-selection-93f4ad84.js","assets/post-item-d81938d1.css","assets/post-skeleton-8434d30b.js","assets/post-skeleton-f1900002.css","assets/main-nav.vue_vue_type_style_index_0_lang-93352cc4.js","assets/main-nav-569a7b0c.css","assets/axios-4a70c6fc.js","assets/moment-2ab8298d.js","assets/Collection-501380ec.css","assets/vfonts-7afd136d.css"])},{path:"/contacts",name:"contacts",meta:{title:"好友"},component:()=>T(()=>import("./Contacts-6bba6585.js"),["assets/Contacts-6bba6585.js","assets/whisper-9b4eeceb.js","assets/@vue-a481fc63.js","assets/naive-ui-defd0b2d.js","assets/seemly-76b7b838.js","assets/vueuc-39372edb.js","assets/evtd-b614532e.js","assets/@css-render-7124a1a5.js","assets/vooks-6d99783e.js","assets/vdirs-b0483831.js","assets/@juggle-41516555.js","assets/css-render-6a5c5852.js","assets/@emotion-8a8e73f6.js","assets/lodash-es-8412e618.js","assets/treemate-25c27bff.js","assets/async-validator-dee29e8b.js","assets/date-fns-975a2d8f.js","assets/whisper-61451957.css","assets/@vicons-c265fba6.js","assets/post-skeleton-8434d30b.js","assets/post-skeleton-f1900002.css","assets/main-nav.vue_vue_type_style_index_0_lang-93352cc4.js","assets/vuex-44de225f.js","assets/vue-router-e5a2430e.js","assets/main-nav-569a7b0c.css","assets/axios-4a70c6fc.js","assets/moment-2ab8298d.js","assets/Contacts-7fa3e0d6.css","assets/vfonts-7afd136d.css"])},{path:"/following",name:"following",meta:{title:"关注"},component:()=>T(()=>import("./Following-c2d05a32.js"),["assets/Following-c2d05a32.js","assets/whisper-9b4eeceb.js","assets/@vue-a481fc63.js","assets/naive-ui-defd0b2d.js","assets/seemly-76b7b838.js","assets/vueuc-39372edb.js","assets/evtd-b614532e.js","assets/@css-render-7124a1a5.js","assets/vooks-6d99783e.js","assets/vdirs-b0483831.js","assets/@juggle-41516555.js","assets/css-render-6a5c5852.js","assets/@emotion-8a8e73f6.js","assets/lodash-es-8412e618.js","assets/treemate-25c27bff.js","assets/async-validator-dee29e8b.js","assets/date-fns-975a2d8f.js","assets/whisper-61451957.css","assets/vue-router-e5a2430e.js","assets/@vicons-c265fba6.js","assets/post-skeleton-8434d30b.js","assets/post-skeleton-f1900002.css","assets/main-nav.vue_vue_type_style_index_0_lang-93352cc4.js","assets/vuex-44de225f.js","assets/main-nav-569a7b0c.css","assets/axios-4a70c6fc.js","assets/moment-2ab8298d.js","assets/Following-6aa7d36c.css","assets/vfonts-7afd136d.css"])},{path:"/wallet",name:"wallet",meta:{title:"钱包"},component:()=>T(()=>import("./Wallet-90a1802e.js"),["assets/Wallet-90a1802e.js","assets/post-skeleton-8434d30b.js","assets/naive-ui-defd0b2d.js","assets/seemly-76b7b838.js","assets/@vue-a481fc63.js","assets/vueuc-39372edb.js","assets/evtd-b614532e.js","assets/@css-render-7124a1a5.js","assets/vooks-6d99783e.js","assets/vdirs-b0483831.js","assets/@juggle-41516555.js","assets/css-render-6a5c5852.js","assets/@emotion-8a8e73f6.js","assets/lodash-es-8412e618.js","assets/treemate-25c27bff.js","assets/async-validator-dee29e8b.js","assets/date-fns-975a2d8f.js","assets/post-skeleton-f1900002.css","assets/main-nav.vue_vue_type_style_index_0_lang-93352cc4.js","assets/vuex-44de225f.js","assets/vue-router-e5a2430e.js","assets/@vicons-c265fba6.js","assets/main-nav-569a7b0c.css","assets/qrcode-9719fc56.js","assets/encode-utf8-f813de00.js","assets/dijkstrajs-f906a09e.js","assets/axios-4a70c6fc.js","assets/moment-2ab8298d.js","assets/Wallet-77044929.css","assets/vfonts-7afd136d.css"])},{path:"/setting",name:"setting",meta:{title:"设置"},component:()=>T(()=>import("./Setting-439150e0.js"),["assets/Setting-439150e0.js","assets/main-nav.vue_vue_type_style_index_0_lang-93352cc4.js","assets/vuex-44de225f.js","assets/@vue-a481fc63.js","assets/vue-router-e5a2430e.js","assets/vooks-6d99783e.js","assets/evtd-b614532e.js","assets/@vicons-c265fba6.js","assets/naive-ui-defd0b2d.js","assets/seemly-76b7b838.js","assets/vueuc-39372edb.js","assets/@css-render-7124a1a5.js","assets/vdirs-b0483831.js","assets/@juggle-41516555.js","assets/css-render-6a5c5852.js","assets/@emotion-8a8e73f6.js","assets/lodash-es-8412e618.js","assets/treemate-25c27bff.js","assets/async-validator-dee29e8b.js","assets/date-fns-975a2d8f.js","assets/main-nav-569a7b0c.css","assets/axios-4a70c6fc.js","assets/moment-2ab8298d.js","assets/Setting-bfd24152.css","assets/vfonts-7afd136d.css"])},{path:"/404",name:"404",meta:{title:"404"},component:()=>T(()=>import("./404-a87dcc10.js"),["assets/404-a87dcc10.js","assets/main-nav.vue_vue_type_style_index_0_lang-93352cc4.js","assets/vuex-44de225f.js","assets/@vue-a481fc63.js","assets/vue-router-e5a2430e.js","assets/vooks-6d99783e.js","assets/evtd-b614532e.js","assets/@vicons-c265fba6.js","assets/naive-ui-defd0b2d.js","assets/seemly-76b7b838.js","assets/vueuc-39372edb.js","assets/@css-render-7124a1a5.js","assets/vdirs-b0483831.js","assets/@juggle-41516555.js","assets/css-render-6a5c5852.js","assets/@emotion-8a8e73f6.js","assets/lodash-es-8412e618.js","assets/treemate-25c27bff.js","assets/async-validator-dee29e8b.js","assets/date-fns-975a2d8f.js","assets/main-nav-569a7b0c.css","assets/axios-4a70c6fc.js","assets/moment-2ab8298d.js","assets/404-020b2afd.css","assets/vfonts-7afd136d.css"])},{path:"/:pathMatch(.*)",redirect:"/404"}],ve=Te({history:Ae(),routes:rt});ve.beforeEach((e,t,r)=>{document.title=`${e.meta.title} | 泡泡 - 一个清新文艺的微社区`,r()});const at=Ie({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,is_admin:!1}},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,is_admin:!1},e.userLogined=!1}},actions:{},modules:{}}),X=Re.create({baseURL:"",timeout:3e4});X.interceptors.request.use(e=>(localStorage.getItem("PAOPAO_TOKEN")&&(e.headers.Authorization="Bearer "+localStorage.getItem("PAOPAO_TOKEN")),e),e=>Promise.reject(e));X.interceptors.response.use(e=>{const{data:t={},code:r=0}=(e==null?void 0:e.data)||{};if(+r==0)return t||{};Promise.reject((e==null?void 0:e.data)||{})},(e={})=>{var r;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(((r=t==null?void 0:t.data)==null?void 0:r.msg)||"请求失败"),Promise.reject((t==null?void 0:t.data)||{})});function o(e){return X(e)}const ce=e=>o({method:"post",url:"/v1/auth/login",data:e}),lt=e=>o({method:"post",url:"/v1/auth/register",data:e}),G=(e="")=>o({method:"get",url:"/v1/user/info",headers:{Authorization:`Bearer ${e}`}}),ut={class:"auth-wrap"},it={key:0},ct=Y({__name:"auth",setup(e){const t=k("true".toLowerCase()==="true"),r=B(),c=k(!1),i=k(),n=oe({username:"",password:""}),m=k(),d=oe({username:"",password:"",repassword:""}),S={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"}]},v=_=>{var u;_.preventDefault(),_.stopPropagation(),(u=i.value)==null||u.validate(I=>{I||(c.value=!0,ce({username:n.username,password:n.password}).then(h=>{const R=(h==null?void 0:h.token)||"";return localStorage.setItem("PAOPAO_TOKEN",R),G(R)}).then(h=>{window.$message.success("登录成功"),c.value=!1,r.commit("updateUserinfo",h),r.commit("triggerAuth",!1),r.commit("refresh"),n.username="",n.password=""}).catch(h=>{c.value=!1}))})},b=_=>{var u;_.preventDefault(),_.stopPropagation(),(u=m.value)==null||u.validate(I=>{I||(c.value=!0,lt({username:d.username,password:d.password}).then(h=>ce({username:d.username,password:d.password})).then(h=>{const R=(h==null?void 0:h.token)||"";return localStorage.setItem("PAOPAO_TOKEN",R),G(R)}).then(h=>{window.$message.success("注册成功"),c.value=!1,r.commit("updateUserinfo",h),r.commit("triggerAuth",!1),d.username="",d.password="",d.repassword=""}).catch(h=>{c.value=!1}))})};return Z(()=>{const _=localStorage.getItem("PAOPAO_TOKEN")||"";_?G(_).then(u=>{r.commit("updateUserinfo",u),r.commit("triggerAuth",!1)}).catch(u=>{r.commit("userLogout")}):r.commit("userLogout")}),(_,u)=>{const I=Ce,h=$e,R=_e,C=he,O=Me,x=Se,l=ge,L=Ue,F=De,H=fe,V=xe;return w(),K(V,{show:f(r).state.authModalShow,"onUpdate:show":u[7]||(u[7]=p=>f(r).state.authModalShow=p),class:"auth-card",preset:"card",size:"small","mask-closable":!1,bordered:!1,style:{width:"360px"}},{default:a(()=>[y("div",ut,[s(H,{bordered:!1},{default:a(()=>[t.value?M("",!0):(w(),E("div",it,[s(R,{justify:"center"},{default:a(()=>[s(h,null,{default:a(()=>[s(I,{type:"success"},{default:a(()=>[U("账号登录")]),_:1})]),_:1})]),_:1}),s(x,{ref_key:"loginRef",ref:i,model:n,rules:{username:{required:!0,message:"请输入账户名"},password:{required:!0,message:"请输入密码"}}},{default:a(()=>[s(O,{label:"账户",path:"username"},{default:a(()=>[s(C,{value:n.username,"onUpdate:value":u[0]||(u[0]=p=>n.username=p),placeholder:"请输入用户名",onKeyup:q(N(v,["prevent"]),["enter"])},null,8,["value","onKeyup"])]),_:1}),s(O,{label:"密码",path:"password"},{default:a(()=>[s(C,{type:"password","show-password-on":"mousedown",value:n.password,"onUpdate:value":u[1]||(u[1]=p=>n.password=p),placeholder:"请输入账户密码",onKeyup:q(N(v,["prevent"]),["enter"])},null,8,["value","onKeyup"])]),_:1})]),_:1},8,["model"]),s(l,{type:"primary",block:"",secondary:"",strong:"",loading:c.value,onClick:v},{default:a(()=>[U(" 登录 ")]),_:1},8,["loading"])])),t.value?(w(),K(F,{key:1,"default-value":f(r).state.authModelTab,size:"large","justify-content":"space-evenly"},{default:a(()=>[s(L,{name:"signin",tab:"登录"},{default:a(()=>[s(x,{ref_key:"loginRef",ref:i,model:n,rules:{username:{required:!0,message:"请输入账户名"},password:{required:!0,message:"请输入密码"}}},{default:a(()=>[s(O,{label:"账户",path:"username"},{default:a(()=>[s(C,{value:n.username,"onUpdate:value":u[2]||(u[2]=p=>n.username=p),placeholder:"请输入用户名",onKeyup:q(N(v,["prevent"]),["enter"])},null,8,["value","onKeyup"])]),_:1}),s(O,{label:"密码",path:"password"},{default:a(()=>[s(C,{type:"password","show-password-on":"mousedown",value:n.password,"onUpdate:value":u[3]||(u[3]=p=>n.password=p),placeholder:"请输入账户密码",onKeyup:q(N(v,["prevent"]),["enter"])},null,8,["value","onKeyup"])]),_:1})]),_:1},8,["model"]),s(l,{type:"primary",block:"",secondary:"",strong:"",loading:c.value,onClick:v},{default:a(()=>[U(" 登录 ")]),_:1},8,["loading"])]),_:1}),s(L,{name:"signup",tab:"注册"},{default:a(()=>[s(x,{ref_key:"registerRef",ref:m,model:d,rules:S},{default:a(()=>[s(O,{label:"用户名",path:"username"},{default:a(()=>[s(C,{value:d.username,"onUpdate:value":u[4]||(u[4]=p=>d.username=p),placeholder:"用户名注册后无法修改"},null,8,["value"])]),_:1}),s(O,{label:"密码",path:"password"},{default:a(()=>[s(C,{type:"password","show-password-on":"mousedown",placeholder:"密码不少于6位",value:d.password,"onUpdate:value":u[5]||(u[5]=p=>d.password=p),onKeyup:q(N(b,["prevent"]),["enter"])},null,8,["value","onKeyup"])]),_:1}),s(O,{label:"重复密码",path:"repassword"},{default:a(()=>[s(C,{type:"password","show-password-on":"mousedown",placeholder:"请再次输入密码",value:d.repassword,"onUpdate:value":u[6]||(u[6]=p=>d.repassword=p),onKeyup:q(N(b,["prevent"]),["enter"])},null,8,["value","onKeyup"])]),_:1})]),_:1},8,["model"]),s(l,{type:"primary",block:"",secondary:"",strong:"",loading:c.value,onClick:b},{default:a(()=>[U(" 注册 ")]),_:1},8,["loading"])]),_:1})]),_:1},8,["default-value"])):M("",!0)]),_:1})])]),_:1},8,["show"])}}});const we=(e,t)=>{const r=e.__vccOpts||e;for(const[c,i]of t)r[c]=i;return r},dt=we(ct,[["__scopeId","data-v-053dfa44"]]),io=e=>o({method:"get",url:"/v1/posts",params:e}),mt=e=>o({method:"get",url:"/v1/tags",params:e}),co=e=>o({method:"get",url:"/v1/post",params:e}),mo=e=>o({method:"get",url:"/v1/post/star",params:e}),po=e=>o({method:"post",url:"/v1/post/star",data:e}),_o=e=>o({method:"get",url:"/v1/post/collection",params:e}),ho=e=>o({method:"post",url:"/v1/post/collection",data:e}),go=e=>o({method:"get",url:"/v1/post/comments",params:e}),fo=e=>o({method:"get",url:"/v1/user/contacts",params:e}),vo=e=>o({method:"post",url:"/v1/post",data:e}),wo=e=>o({method:"delete",url:"/v1/post",data:e}),yo=e=>o({method:"post",url:"/v1/post/lock",data:e}),bo=e=>o({method:"post",url:"/v1/post/stick",data:e}),ko=e=>o({method:"post",url:"/v1/post/highlight",data:e}),Po=e=>o({method:"post",url:"/v1/post/visibility",data:e}),Oo=e=>o({method:"post",url:"/v1/tweet/comment/thumbsup",data:e}),Lo=e=>o({method:"post",url:"/v1/tweet/comment/thumbsdown",data:e}),To=e=>o({method:"post",url:"/v1/tweet/reply/thumbsup",data:e}),Ao=e=>o({method:"post",url:"/v1/tweet/reply/thumbsdown",data:e}),Eo=e=>o({method:"post",url:"/v1/post/comment",data:e}),Io=e=>o({method:"delete",url:"/v1/post/comment",data:e}),Ro=e=>o({method:"post",url:"/v1/post/comment/highlight",data:e}),Co=e=>o({method:"post",url:"/v1/post/comment/reply",data:e}),$o=e=>o({method:"delete",url:"/v1/post/comment/reply",data:e}),Mo=e=>o({method:"post",url:"/v1/topic/stick",data:e}),So=e=>o({method:"post",url:"/v1/topic/follow",data:e}),Uo=e=>o({method:"post",url:"/v1/topic/unfollow",data:e}),Do=(e={})=>o({method:"get",url:"/v1/captcha",params:e}),xo=e=>o({method:"post",url:"/v1/captcha",data:e}),qo=e=>o({method:"post",url:"/v1/user/whisper",data:e}),No=e=>o({method:"post",url:"/v1/friend/requesting",data:e}),Ko=e=>o({method:"post",url:"/v1/friend/add",data:e}),Fo=e=>o({method:"post",url:"/v1/user/follow",data:e}),Vo=e=>o({method:"post",url:"/v1/user/unfollow",data:e}),zo=e=>o({method:"get",url:"/v1/user/follows",params:e}),Ho=e=>o({method:"get",url:"/v1/user/followings",params:e}),Wo=e=>o({method:"post",url:"/v1/friend/reject",data:e}),Yo=e=>o({method:"post",url:"/v1/friend/delete",data:e}),Bo=e=>o({method:"post",url:"/v1/user/phone",data:e}),jo=e=>o({method:"post",url:"/v1/user/activate",data:e}),Go=e=>o({method:"post",url:"/v1/user/password",data:e}),Qo=e=>o({method:"post",url:"/v1/user/nickname",data:e}),Zo=e=>o({method:"post",url:"/v1/user/avatar",data:e}),de=(e={})=>o({method:"get",url:"/v1/user/msgcount/unread",params:e}),Jo=e=>o({method:"get",url:"/v1/user/messages",params:e}),Xo=e=>o({method:"post",url:"/v1/user/message/read",data:e}),es=e=>o({method:"get",url:"/v1/user/collections",params:e}),ts=e=>o({method:"get",url:"/v1/user/profile",params:e}),os=e=>o({method:"get",url:"/v1/user/posts",params:e}),ss=e=>o({method:"get",url:"/v1/user/wallet/bills",params:e}),ns=e=>o({method:"post",url:"/v1/user/recharge",data:e}),rs=e=>o({method:"get",url:"/v1/user/recharge",params:e}),as=e=>o({method:"get",url:"/v1/suggest/users",params:e}),ls=e=>o({method:"get",url:"/v1/suggest/tags",params:e}),us=e=>o({method:"get",url:"/v1/attachment/precheck",params:e}),is=e=>o({method:"get",url:"/v1/attachment",params:e}),cs=e=>o({method:"post",url:"/v1/admin/user/status",data:e}),pt=()=>o({method:"get",url:"/v1/admin/site/status"});D.locale("zh-cn");const _t=e=>D.unix(e).fromNow(),ds=e=>{let t=D.unix(e),r=D();return t.year()!=r.year()?t.utc(!0).format("YYYY-MM-DD HH:mm"):D().diff(t,"month")>3?t.utc(!0).format("MM-DD HH:mm"):t.fromNow()},ms=e=>{let t=D.unix(e),r=D();return t.year()!=r.year()?t.utc(!0).format("YYYY-MM-DD"):D().diff(t,"month")>3?t.utc(!0).format("MM-DD"):t.fromNow()},ps=e=>D.unix(e).utc(!0).format("YYYY年MM月"),ht={key:0,class:"rightbar-wrap"},gt={class:"search-wrap"},ft={class:"post-num"},vt={class:"post-num"},wt={class:"copyright"},yt=["href"],bt=["href"],kt={class:"site-info-item"},Pt=Y({__name:"rightbar",setup(e){const t=k([]),r=k([]),c=k(!1),i=k(""),n=B(),m=pe(),d=k(0),S=k(0),v=k(0),b=k(0),_=k(null),u="2023 paopao.info",I="Roc's Me",h="",R="泡泡(PaoPao)开源社区",C="https://www.paopao.info",O=+"6",x=+"12",l=()=>{pt().then(g=>{d.value=g.register_user_count,S.value=g.online_user_count,v.value=g.history_max_online,b.value=g.server_up_time}).catch(g=>{}),p.disconnect()},L=()=>{c.value=!0,mt({type:"hot_extral",num:x,extral_num:O}).then(g=>{t.value=g.topics,r.value=g.extral_topics??[],V.value=!0,c.value=!1}).catch(g=>{c.value=!1})},F=g=>g>=1e3?(g/1e3).toFixed(1)+"k":g,H=()=>{m.push({name:"home",query:{q:i.value}})},V=J({get:()=>n.state.userLogined&&r.value.length!==0,set:g=>{}});Q(()=>({refreshTopicFollow:n.state.refreshTopicFollow,userLogined:n.state.userLogined}),(g,z)=>{(g.refreshTopicFollow!==z.refreshTopicFollow||g.userLogined)&&L(),n.state.userInfo.is_admin&&l()});const p=new IntersectionObserver(g=>{g.forEach(z=>{z.isIntersecting&&l()})},{root:null,rootMargin:"0px",threshold:1});return Z(()=>{_.value&&p.observe(_.value),L()}),(g,z)=>{const ye=W,be=he,ee=me("router-link"),te=qe,j=fe,ke=_e;return f(n).state.collapsedRight?M("",!0):(w(),E("div",ht,[y("div",gt,[s(be,{round:"",clearable:"",placeholder:"搜一搜...",value:i.value,"onUpdate:value":z[0]||(z[0]=$=>i.value=$),onKeyup:q(N(H,["prevent"]),["enter"])},{prefix:a(()=>[s(ye,{component:f(Ge)},null,8,["component"])]),_:1},8,["value","onKeyup"])]),V.value?(w(),K(j,{key:0,class:"hottopic-wrap",title:"关注话题",embedded:"",bordered:!1,size:"small"},{default:a(()=>[s(te,{show:c.value},{default:a(()=>[(w(!0),E(se,null,ne(r.value,$=>(w(),E("div",{class:"hot-tag-item",key:$.id},[s(ee,{class:"hash-link",to:{name:"home",query:{q:$.tag,t:"tag"}}},{default:a(()=>[U(" #"+A($.tag),1)]),_:2},1032,["to"]),y("div",ft,A(F($.quote_num)),1)]))),128))]),_:1},8,["show"])]),_:1})):M("",!0),s(j,{class:"hottopic-wrap",title:"热门话题",embedded:"",bordered:!1,size:"small"},{default:a(()=>[s(te,{show:c.value},{default:a(()=>[(w(!0),E(se,null,ne(t.value,$=>(w(),E("div",{class:"hot-tag-item",key:$.id},[s(ee,{class:"hash-link",to:{name:"home",query:{q:$.tag,t:"tag"}}},{default:a(()=>[U(" #"+A($.tag),1)]),_:2},1032,["to"]),y("div",vt,A(F($.quote_num)),1)]))),128))]),_:1},8,["show"])]),_:1}),s(j,{class:"copyright-wrap",embedded:"",bordered:!1,size:"small"},{default:a(()=>[y("div",wt,"© "+A(f(u)),1),y("div",null,[s(ke,null,{default:a(()=>[y("a",{href:f(h),target:"_blank",class:"hash-link"},A(f(I)),9,yt),y("a",{href:f(C),target:"_blank",class:"hash-link"},A(f(R)),9,bt)]),_:1})])]),_:1}),f(n).state.userInfo.is_admin?(w(),E("div",{key:1,class:"site-info",ref_key:"userInfoElement",ref:_},[y("span",kt,A(d.value)+" 注册用户,"+A(S.value)+" 人在线,最高在线 "+A(v.value)+" 人,站点上线于 "+A(f(_t)(b.value)),1)],512)):M("",!0)]))}}});const Ot=we(Pt,[["__scopeId","data-v-0a6cd0b6"]]),Lt="/assets/logo-52afee68.png",Tt={class:"sidebar-wrap"},At={class:"logo-wrap"},Et={key:0,class:"user-wrap"},It={class:"user-info"},Rt={class:"nickname"},Ct={class:"nickname-txt"},$t={class:"username"},Mt={class:"user-mini-wrap"},St={key:1,class:"user-wrap"},Ut={key:0,class:"login-only-wrap"},Dt={key:1,class:"login-wrap"},xt=Y({__name:"sidebar",setup(e){const t=B(),r=Ee(),c=pe(),i=k(!1),n=k(r.name||""),m=k(),d="true".toLowerCase()==="true",S="false".toLowerCase()==="true",v="false".toLocaleLowerCase()==="true",b=k("true".toLowerCase()==="true"),_=+"5000";Q(r,()=>{n.value=r.name}),Q(t.state,()=>{t.state.userInfo.id>0?m.value||(de().then(l=>{i.value=l.count>0}).catch(l=>{console.log(l)}),m.value=setInterval(()=>{de().then(l=>{i.value=l.count>0}).catch(l=>{console.log(l)})},_)):m.value&&clearInterval(m.value)}),Z(()=>{window.onresize=()=>{t.commit("triggerCollapsedLeft",document.body.clientWidth<=821),t.commit("triggerCollapsedRight",document.body.clientWidth<=821)}});const u=J(()=>{const l=[{label:"广场",key:"home",icon:()=>P(ae),href:"/"},{label:"话题",key:"topic",icon:()=>P(le),href:"/topic"}];return S&&l.push({label:"公告",key:"anouncement",icon:()=>P(Qe),href:"/anouncement"}),l.push({label:"主页",key:"profile",icon:()=>P(Ze),href:"/profile"}),l.push({label:"消息",key:"messages",icon:()=>P(Je),href:"/messages"}),l.push({label:"收藏",key:"collection",icon:()=>P(Xe),href:"/collection"}),d&&l.push({label:"好友",key:"contacts",icon:()=>P(et),href:"/contacts"}),v&&l.push({label:"钱包",key:"wallet",icon:()=>P(tt),href:"/wallet"}),l.push({label:"设置",key:"setting",icon:()=>P(ot),href:"/setting"}),t.state.userInfo.id>0?l:[{label:"广场",key:"home",icon:()=>P(ae),href:"/"},{label:"话题",key:"topic",icon:()=>P(le),href:"/topic"}]}),I=l=>"href"in l?P("div",{},l.label):l.label,h=l=>l.key==="messages"?P(Ke,{dot:!0,show:i.value,processing:!0},{default:()=>P(W,{color:l.key===n.value?"var(--n-item-icon-color-active)":"var(--n-item-icon-color)"},{default:l.icon})}):P(W,null,{default:l.icon}),R=(l,L={})=>{n.value=l,c.push({name:l,query:{t:new Date().getTime()}})},C=()=>{r.path==="/"&&t.commit("refresh"),R("home")},O=l=>{t.commit("triggerAuth",!0),t.commit("triggerAuthKey",l)},x=()=>{t.commit("userLogout"),t.commit("refresh"),C()};return window.$store=t,window.$message=Ne(),(l,L)=>{const F=Fe,H=Ve,V=ze,p=ge;return w(),E("div",Tt,[y("div",At,[s(F,{class:"logo-img",width:"36",src:f(Lt),"preview-disabled":!0,onClick:C},null,8,["src"])]),s(H,{accordion:!0,"icon-size":24,options:u.value,"render-label":I,"render-icon":h,value:n.value,"onUpdate:value":R},null,8,["options","value"]),f(t).state.userInfo.id>0?(w(),E("div",Et,[s(V,{class:"user-avatar",round:"",size:34,src:f(t).state.userInfo.avatar},null,8,["src"]),y("div",It,[y("div",Rt,[y("span",Ct,A(f(t).state.userInfo.nickname),1),s(p,{class:"logout",quaternary:"",circle:"",size:"tiny",onClick:x},{icon:a(()=>[s(f(W),null,{default:a(()=>[s(f(ue))]),_:1})]),_:1})]),y("div",$t,"@"+A(f(t).state.userInfo.username),1)]),y("div",Mt,[s(p,{class:"logout",quaternary:"",circle:"",onClick:x},{icon:a(()=>[s(f(W),{size:24},{default:a(()=>[s(f(ue))]),_:1})]),_:1})])])):(w(),E("div",St,[b.value?M("",!0):(w(),E("div",Ut,[s(p,{strong:"",secondary:"",round:"",type:"primary",onClick:L[0]||(L[0]=g=>O("signin"))},{default:a(()=>[U(" 登录 ")]),_:1})])),b.value?(w(),E("div",Dt,[s(p,{strong:"",secondary:"",round:"",type:"primary",onClick:L[1]||(L[1]=g=>O("signin"))},{default:a(()=>[U(" 登录 ")]),_:1}),s(p,{strong:"",secondary:"",round:"",type:"info",onClick:L[2]||(L[2]=g=>O("signup"))},{default:a(()=>[U(" 注册 ")]),_:1})])):M("",!0)]))])}}});const qt={"has-sider":"",class:"main-wrap",position:"static"},Nt={key:0},Kt={class:"content-wrap"},Ft=Y({__name:"App",setup(e){const t=B(),r=J(()=>t.state.theme==="dark"?We:null);return(c,i)=>{const n=xt,m=me("router-view"),d=Ot,S=dt,v=Ye,b=Be,_=je,u=He;return w(),K(u,{theme:r.value},{default:a(()=>[s(b,null,{default:a(()=>[s(v,null,{default:a(()=>{var I;return[y("div",{class:Oe(["app-container",{dark:((I=r.value)==null?void 0:I.name)==="dark",mobile:!f(t).state.desktopModelShow}])},[y("div",qt,[f(t).state.desktopModelShow?(w(),E("div",Nt,[s(n)])):M("",!0),y("div",Kt,[s(m,{class:"app-wrap"},{default:a(({Component:h})=>[(w(),K(Pe,null,[c.$route.meta.keepAlive?(w(),K(re(h),{key:0})):M("",!0)],1024)),c.$route.meta.keepAlive?M("",!0):(w(),K(re(h),{key:0}))]),_:1})]),s(d)]),s(S)],2)]}),_:1})]),_:1}),s(_)]),_:1},8,["theme"])}}});Le(Ft).use(ve).use(at).mount("#app");export{ns as $,po as A,ho as B,co as C,go as D,Mo as E,Uo as F,So as G,mt as H,_t as I,ps as J,ts as K,cs as L,No as M,Ko as N,Wo as O,Xo as P,Jo as Q,es as R,ms as S,us as T,is as U,zo as V,Ho as W,qo as X,G as Y,ss as Z,we as _,ls as a,rs as a0,Do as a1,Zo as a2,Go as a3,Bo as a4,jo as a5,Qo as a6,xo as a7,xt as a8,fo as b,vo as c,io as d,os as e,Fo as f,as as g,Yo as h,ds as i,Ao as j,$o as k,Oo as l,Lo as m,Co as n,Io as o,Ro as p,Eo as q,mo as r,_o as s,To as t,Vo as u,wo as v,yo as w,bo as x,ko as y,Po as z};
diff --git a/web/dist/assets/main-nav.vue_vue_type_style_index_0_lang-2982e04a.js b/web/dist/assets/main-nav.vue_vue_type_style_index_0_lang-2982e04a.js
deleted file mode 100644
index 28c342e4..00000000
--- a/web/dist/assets/main-nav.vue_vue_type_style_index_0_lang-2982e04a.js
+++ /dev/null
@@ -1 +0,0 @@
-import{a7 as A}from"./index-4a465428.js";import{u as B}from"./vuex-44de225f.js";import{u as E}from"./vue-router-e5a2430e.js";import{j as z}from"./vooks-6d99783e.js";import{Z as C,_ as N,$ as P,a0 as D}from"./@vicons-7a4ef312.js";import{u as R,a3 as $,a4 as x,j as H,e as I,a5 as V,h as j}from"./naive-ui-d8de3dda.js";import{d as q,H as h,b as F,e as n,f,bf as a,k as e,w as t,Y as c,j as L,q as _,A as U,x as Y,F as Z}from"./@vue-a481fc63.js";const G={key:0},J={class:"navbar"},ae=q({__name:"main-nav",props:{title:{default:""},back:{type:Boolean,default:!1},theme:{type:Boolean,default:!0}},setup(w){const i=w,o=B(),m=E(),l=h(!1),g=h("left"),u=s=>{s?(localStorage.setItem("PAOPAO_THEME","dark"),o.commit("triggerTheme","dark")):(localStorage.setItem("PAOPAO_THEME","light"),o.commit("triggerTheme","light"))},k=()=>{window.history.length<=1?m.push({path:"/"}):m.go(-1)},v=()=>{l.value=!0};return F(()=>{localStorage.getItem("PAOPAO_THEME")||u(z()==="dark"),o.state.desktopModelShow||(window.$store=o,window.$message=R())}),(s,d)=>{const b=A,y=$,M=x,r=H,p=I,O=V,S=j;return n(),f(Z,null,[a(o).state.drawerModelShow?(n(),f("div",G,[e(M,{show:l.value,"onUpdate:show":d[0]||(d[0]=T=>l.value=T),width:212,placement:g.value,resizable:""},{default:t(()=>[e(y,null,{default:t(()=>[e(b)]),_:1})]),_:1},8,["show","placement"])])):c("",!0),e(S,{size:"small",bordered:!0,class:"nav-title-card"},{header:t(()=>[L("div",J,[a(o).state.drawerModelShow&&!s.back?(n(),_(p,{key:0,class:"drawer-btn",onClick:v,quaternary:"",circle:"",size:"medium"},{icon:t(()=>[e(r,null,{default:t(()=>[e(a(C))]),_:1})]),_:1})):c("",!0),s.back?(n(),_(p,{key:1,class:"back-btn",onClick:k,quaternary:"",circle:"",size:"small"},{icon:t(()=>[e(r,null,{default:t(()=>[e(a(N))]),_:1})]),_:1})):c("",!0),U(" "+Y(i.title)+" ",1),i.theme?(n(),_(O,{key:2,value:a(o).state.theme==="dark","onUpdate:value":u,size:"small",class:"theme-switch-wrap"},{"checked-icon":t(()=>[e(r,{component:a(P)},null,8,["component"])]),"unchecked-icon":t(()=>[e(r,{component:a(D)},null,8,["component"])]),_:1},8,["value"])):c("",!0)])]),_:1})],64)}}});export{ae as _};
diff --git a/web/dist/assets/main-nav.vue_vue_type_style_index_0_lang-93352cc4.js b/web/dist/assets/main-nav.vue_vue_type_style_index_0_lang-93352cc4.js
new file mode 100644
index 00000000..d66f7372
--- /dev/null
+++ b/web/dist/assets/main-nav.vue_vue_type_style_index_0_lang-93352cc4.js
@@ -0,0 +1 @@
+import{a8 as A}from"./index-daff1b26.js";import{u as B}from"./vuex-44de225f.js";import{u as E}from"./vue-router-e5a2430e.js";import{j as z}from"./vooks-6d99783e.js";import{$ as C,a0 as N,a1 as P,a2 as D}from"./@vicons-c265fba6.js";import{u as R,a3 as $,a4 as x,j as H,e as I,a5 as V,h as j}from"./naive-ui-defd0b2d.js";import{d as q,H as h,b as F,e as n,f,bf as a,k as e,w as t,Y as c,j as L,q as _,A as U,x as Y,F as G}from"./@vue-a481fc63.js";const J={key:0},K={class:"navbar"},ae=q({__name:"main-nav",props:{title:{default:""},back:{type:Boolean,default:!1},theme:{type:Boolean,default:!0}},setup(w){const i=w,o=B(),m=E(),l=h(!1),g=h("left"),u=s=>{s?(localStorage.setItem("PAOPAO_THEME","dark"),o.commit("triggerTheme","dark")):(localStorage.setItem("PAOPAO_THEME","light"),o.commit("triggerTheme","light"))},k=()=>{window.history.length<=1?m.push({path:"/"}):m.go(-1)},v=()=>{l.value=!0};return F(()=>{localStorage.getItem("PAOPAO_THEME")||u(z()==="dark"),o.state.desktopModelShow||(window.$store=o,window.$message=R())}),(s,d)=>{const b=A,y=$,M=x,r=H,p=I,O=V,S=j;return n(),f(G,null,[a(o).state.drawerModelShow?(n(),f("div",J,[e(M,{show:l.value,"onUpdate:show":d[0]||(d[0]=T=>l.value=T),width:212,placement:g.value,resizable:""},{default:t(()=>[e(y,null,{default:t(()=>[e(b)]),_:1})]),_:1},8,["show","placement"])])):c("",!0),e(S,{size:"small",bordered:!0,class:"nav-title-card"},{header:t(()=>[L("div",K,[a(o).state.drawerModelShow&&!s.back?(n(),_(p,{key:0,class:"drawer-btn",onClick:v,quaternary:"",circle:"",size:"medium"},{icon:t(()=>[e(r,null,{default:t(()=>[e(a(C))]),_:1})]),_:1})):c("",!0),s.back?(n(),_(p,{key:1,class:"back-btn",onClick:k,quaternary:"",circle:"",size:"small"},{icon:t(()=>[e(r,null,{default:t(()=>[e(a(N))]),_:1})]),_:1})):c("",!0),U(" "+Y(i.title)+" ",1),i.theme?(n(),_(O,{key:2,value:a(o).state.theme==="dark","onUpdate:value":u,size:"small",class:"theme-switch-wrap"},{"checked-icon":t(()=>[e(r,{component:a(P)},null,8,["component"])]),"unchecked-icon":t(()=>[e(r,{component:a(D)},null,8,["component"])]),_:1},8,["value"])):c("",!0)])]),_:1})],64)}}});export{ae as _};
diff --git a/web/dist/assets/naive-ui-d8de3dda.js b/web/dist/assets/naive-ui-defd0b2d.js
similarity index 99%
rename from web/dist/assets/naive-ui-d8de3dda.js
rename to web/dist/assets/naive-ui-defd0b2d.js
index 3e6279fa..94b35415 100644
--- a/web/dist/assets/naive-ui-d8de3dda.js
+++ b/web/dist/assets/naive-ui-defd0b2d.js
@@ -3671,4 +3671,4 @@ import{r as ir,s as Je,c as $e,g as Qt,d as Mo,a as Ko,h as pt,b as J,e as it,f
width: 0;
height: 0;
opacity: 0;
- `)]);var Hi=globalThis&&globalThis.__awaiter||function(e,o,t,r){function n(l){return l instanceof t?l:new t(function(a){a(l)})}return new(t||(t=Promise))(function(l,a){function s(u){try{c(r.next(u))}catch(f){a(f)}}function d(u){try{c(r.throw(u))}catch(f){a(f)}}function c(u){u.done?l(u.value):n(u.value).then(s,d)}c((r=r.apply(e,o||[])).next())})};function W0(e,o,t){const{doChange:r,xhrMap:n}=e;let l=0;function a(d){var c;let u=Object.assign({},o,{status:"error",percentage:l});n.delete(o.id),u=nr(((c=e.onError)===null||c===void 0?void 0:c.call(e,{file:u,event:d}))||u),r(u,d)}function s(d){var c;if(e.isErrorState){if(e.isErrorState(t)){a(d);return}}else if(t.status<200||t.status>=300){a(d);return}let u=Object.assign({},o,{status:"finished",percentage:l});n.delete(o.id),u=nr(((c=e.onFinish)===null||c===void 0?void 0:c.call(e,{file:u,event:d}))||u),r(u,d)}return{handleXHRLoad:s,handleXHRError:a,handleXHRAbort(d){const c=Object.assign({},o,{status:"removed",file:null,percentage:l});n.delete(o.id),r(c,d)},handleXHRProgress(d){const c=Object.assign({},o,{status:"uploading"});if(d.lengthComputable){const u=Math.ceil(d.loaded/d.total*100);c.percentage=u,l=u}r(c,d)}}}function N0(e){const{inst:o,file:t,data:r,headers:n,withCredentials:l,action:a,customRequest:s}=e,{doChange:d}=e.inst;let c=0;s({file:t,data:r,headers:n,withCredentials:l,action:a,onProgress(u){const f=Object.assign({},t,{status:"uploading"}),p=u.percent;f.percentage=p,c=p,d(f)},onFinish(){var u;let f=Object.assign({},t,{status:"finished",percentage:c});f=nr(((u=o.onFinish)===null||u===void 0?void 0:u.call(o,{file:f}))||f),d(f)},onError(){var u;let f=Object.assign({},t,{status:"error",percentage:c});f=nr(((u=o.onError)===null||u===void 0?void 0:u.call(o,{file:f}))||f),d(f)}})}function V0(e,o,t){const r=W0(e,o,t);t.onabort=r.handleXHRAbort,t.onerror=r.handleXHRError,t.onload=r.handleXHRLoad,t.upload&&(t.upload.onprogress=r.handleXHRProgress)}function gs(e,o){return typeof e=="function"?e({file:o}):e||{}}function U0(e,o,t){const r=gs(o,t);r&&Object.keys(r).forEach(n=>{e.setRequestHeader(n,r[n])})}function K0(e,o,t){const r=gs(o,t);r&&Object.keys(r).forEach(n=>{e.append(n,r[n])})}function G0(e,o,t,{method:r,action:n,withCredentials:l,responseType:a,headers:s,data:d}){const c=new XMLHttpRequest;c.responseType=a,e.xhrMap.set(t.id,c),c.withCredentials=l;const u=new FormData;if(K0(u,d,t),u.append(o,t.file),V0(e,t,c),n!==void 0){c.open(r.toUpperCase(),n),U0(c,s,t),c.send(u);const f=Object.assign({},t,{status:"uploading"});e.doChange(f)}}const q0=Object.assign(Object.assign({},ne.props),{name:{type:String,default:"file"},accept:String,action:String,customRequest:Function,directory:Boolean,directoryDnd:{type:Boolean,default:void 0},method:{type:String,default:"POST"},multiple:Boolean,showFileList:{type:Boolean,default:!0},data:[Object,Function],headers:[Object,Function],withCredentials:Boolean,responseType:{type:String,default:""},disabled:{type:Boolean,default:void 0},onChange:Function,onRemove:Function,onFinish:Function,onError:Function,onBeforeUpload:Function,isErrorState:Function,onDownload:Function,defaultUpload:{type:Boolean,default:!0},fileList:Array,"onUpdate:fileList":[Function,Array],onUpdateFileList:[Function,Array],fileListStyle:[String,Object],defaultFileList:{type:Array,default:()=>[]},showCancelButton:{type:Boolean,default:!0},showRemoveButton:{type:Boolean,default:!0},showDownloadButton:Boolean,showRetryButton:{type:Boolean,default:!0},showPreviewButton:{type:Boolean,default:!0},listType:{type:String,default:"text"},onPreview:Function,shouldUseThumbnailUrl:{type:Function,default:e=>I0?ps(e):!1},createThumbnailUrl:Function,abstract:Boolean,max:Number,showTrigger:{type:Boolean,default:!0},imageGroupProps:Object,inputProps:Object,triggerStyle:[String,Object],renderIcon:Object}),J1=q({name:"Upload",props:q0,setup(e){e.abstract&&e.listType==="image-card"&&Eo("upload","when the list-type is image-card, abstract is not supported.");const{mergedClsPrefixRef:o,inlineThemeDisabled:t}=ke(e),r=ne("Upload","-upload",j0,Zm,e,o),n=rt(e),l=R(()=>{const{max:k}=e;return k!==void 0?v.value.length>=k:!1}),a=D(e.defaultFileList),s=le(e,"fileList"),d=D(null),c={value:!1},u=D(!1),f=new Map,p=so(s,a),v=R(()=>p.value.map(nr));function h(){var k;(k=d.value)===null||k===void 0||k.click()}function m(k){const $=k.target;S($.files?Array.from($.files).map(L=>({file:L,entry:null,source:"input"})):null,k),$.value=""}function b(k){const{"onUpdate:fileList":$,onUpdateFileList:L}=e;$&&ae($,k),L&&ae(L,k),a.value=k}const x=R(()=>e.multiple||e.directory);function S(k,$){if(!k||k.length===0)return;const{onBeforeUpload:L}=e;k=x.value?k:[k[0]];const{max:M,accept:j}=e;k=k.filter(({file:U,source:_})=>_==="dnd"&&(j!=null&&j.trim())?O0(U.name,U.type,j):!0),M&&(k=k.slice(0,M-v.value.length));const E=it();Promise.all(k.map(({file:U,entry:_})=>Hi(this,void 0,void 0,function*(){var V;const te={id:it(),batchId:E,name:U.name,status:"pending",percentage:0,file:U,url:null,type:U.type,thumbnailUrl:null,fullPath:(V=_==null?void 0:_.fullPath)!==null&&V!==void 0?V:`/${U.webkitRelativePath||U.name}`};return!L||(yield L({file:te,fileList:v.value}))!==!1?te:null}))).then(U=>Hi(this,void 0,void 0,function*(){let _=Promise.resolve();U.forEach(V=>{_=_.then(io).then(()=>{V&&T(V,$,{append:!0})})}),yield _})).then(()=>{e.defaultUpload&&B()})}function B(k){const{method:$,action:L,withCredentials:M,headers:j,data:E,name:U}=e,_=k!==void 0?v.value.filter(te=>te.id===k):v.value,V=k!==void 0;_.forEach(te=>{const{status:N}=te;(N==="pending"||N==="error"&&V)&&(e.customRequest?N0({inst:{doChange:T,xhrMap:f,onFinish:e.onFinish,onError:e.onError},file:te,action:L,withCredentials:M,headers:j,data:E,customRequest:e.customRequest}):G0({doChange:T,xhrMap:f,onFinish:e.onFinish,onError:e.onError,isErrorState:e.isErrorState},U,te,{method:$,action:L,withCredentials:M,responseType:e.responseType,headers:j,data:E}))})}const T=(k,$,L={append:!1,remove:!1})=>{const{append:M,remove:j}=L,E=Array.from(v.value),U=E.findIndex(_=>_.id===k.id);if(M||j||~U){M?E.push(k):j?E.splice(U,1):E.splice(U,1,k);const{onChange:_}=e;_&&_({file:k,fileList:E,event:$}),b(E)}};function z(k){var $;if(k.thumbnailUrl)return k.thumbnailUrl;const{createThumbnailUrl:L}=e;return L?($=L(k.file,k))!==null&&$!==void 0?$:k.url||"":k.url?k.url:k.file?k0(k.file):""}const I=R(()=>{const{common:{cubicBezierEaseInOut:k},self:{draggerColor:$,draggerBorder:L,draggerBorderHover:M,itemColorHover:j,itemColorHoverError:E,itemTextColorError:U,itemTextColorSuccess:_,itemTextColor:V,itemIconColor:te,itemDisabledOpacity:N,lineHeight:G,borderRadius:Ce,fontSize:X,itemBorderImageCardError:ve,itemBorderImageCard:he}}=r.value;return{"--n-bezier":k,"--n-border-radius":Ce,"--n-dragger-border":L,"--n-dragger-border-hover":M,"--n-dragger-color":$,"--n-font-size":X,"--n-item-color-hover":j,"--n-item-color-hover-error":E,"--n-item-disabled-opacity":N,"--n-item-icon-color":te,"--n-item-text-color":V,"--n-item-text-color-error":U,"--n-item-text-color-success":_,"--n-line-height":G,"--n-item-border-image-card-error":ve,"--n-item-border-image-card":he}}),w=t?Ae("upload",void 0,I,e):void 0;Oe(Ut,{mergedClsPrefixRef:o,mergedThemeRef:r,showCancelButtonRef:le(e,"showCancelButton"),showDownloadButtonRef:le(e,"showDownloadButton"),showRemoveButtonRef:le(e,"showRemoveButton"),showRetryButtonRef:le(e,"showRetryButton"),onRemoveRef:le(e,"onRemove"),onDownloadRef:le(e,"onDownload"),mergedFileListRef:v,triggerStyleRef:le(e,"triggerStyle"),shouldUseThumbnailUrlRef:le(e,"shouldUseThumbnailUrl"),renderIconRef:le(e,"renderIcon"),xhrMap:f,submit:B,doChange:T,showPreviewButtonRef:le(e,"showPreviewButton"),onPreviewRef:le(e,"onPreview"),getFileThumbnailUrlResolver:z,listTypeRef:le(e,"listType"),dragOverRef:u,openOpenFileDialog:h,draggerInsideRef:c,handleFileAddition:S,mergedDisabledRef:n.mergedDisabledRef,maxReachedRef:l,fileListStyleRef:le(e,"fileListStyle"),abstractRef:le(e,"abstract"),acceptRef:le(e,"accept"),cssVarsRef:t?void 0:I,themeClassRef:w==null?void 0:w.themeClass,onRender:w==null?void 0:w.onRender,showTriggerRef:le(e,"showTrigger"),imageGroupPropsRef:le(e,"imageGroupProps"),mergedDirectoryDndRef:R(()=>{var k;return(k=e.directoryDnd)!==null&&k!==void 0?k:e.directory})});const O={clear:()=>{a.value=[]},submit:B,openOpenFileDialog:h};return Object.assign({mergedClsPrefix:o,draggerInsideRef:c,inputElRef:d,mergedTheme:r,dragOver:u,mergedMultiple:x,cssVars:t?void 0:I,themeClass:w==null?void 0:w.themeClass,onRender:w==null?void 0:w.onRender,handleFileInputChange:m},O)},render(){var e,o;const{draggerInsideRef:t,mergedClsPrefix:r,$slots:n,directory:l,onRender:a}=this;if(n.default&&!this.abstract){const d=n.default()[0];!((e=d==null?void 0:d.type)===null||e===void 0)&&e[us]&&(t.value=!0)}const s=i("input",Object.assign({},this.inputProps,{ref:"inputElRef",type:"file",class:`${r}-upload-file-input`,accept:this.accept,multiple:this.mergedMultiple,onChange:this.handleFileInputChange,webkitdirectory:l||void 0,directory:l||void 0}));return this.abstract?i(ao,null,(o=n.default)===null||o===void 0?void 0:o.call(n),i(Ni,{to:"body"},s)):(a==null||a(),i("div",{class:[`${r}-upload`,t.value&&`${r}-upload--dragger-inside`,this.dragOver&&`${r}-upload--drag-over`,this.themeClass],style:this.cssVars},s,this.showTrigger&&this.listType!=="image-card"&&i(vs,null,n),this.showFileList&&i(E0,null,n)))}}),Y0=()=>({}),X0={name:"Equation",common:fe,self:Y0},Z0=X0,ex={name:"dark",common:fe,Alert:lu,Anchor:mu,AutoComplete:Ou,Avatar:Ll,AvatarGroup:Nu,BackTop:Ku,Badge:qu,Breadcrumb:rf,Button:$o,ButtonGroup:pg,Calendar:gf,Card:Vl,Carousel:If,Cascader:_f,Checkbox:Nt,Code:Ul,Collapse:Af,CollapseTransition:Wf,ColorPicker:xf,DataTable:Ph,DatePicker:lp,Descriptions:cp,Dialog:va,Divider:Fp,Drawer:Hp,Dropdown:Rn,DynamicInput:tv,DynamicTags:mv,Element:xv,Empty:zt,Ellipsis:ea,Equation:Z0,Form:Sv,GradientText:Uv,Icon:Eh,IconWrapper:og,Image:nb,Input:Ho,InputNumber:gg,LegacyTransfer:Cb,Layout:yg,List:$g,LoadingBar:Pg,Log:Ig,Menu:Ag,Mention:Tg,Message:fg,Modal:Cp,Notification:ag,PageHeader:Wg,Pagination:Ql,Popconfirm:Gg,Popover:$t,Popselect:Kl,Progress:Ea,Radio:ta,Rate:Zg,Result:tm,Row:rb,Scrollbar:zo,Select:Xl,Skeleton:l0,Slider:im,Space:$a,Spin:dm,Statistic:hm,Steps:mm,Switch:xm,Table:Rm,Tabs:Tm,Tag:Sl,Thing:_m,TimePicker:fa,Timeline:Hm,Tooltip:Dr,Transfer:jm,Tree:Ga,TreeSelect:Um,Typography:Ym,Upload:Jm,Watermark:ob};export{Ov as $,_1 as A,J1 as B,C1 as C,y1 as D,P1 as E,D1 as F,L1 as G,x1 as H,Sc as I,W1 as J,h1 as K,X1 as L,qr as M,Z1 as N,Jh as O,z1 as P,b1 as Q,O1 as R,f1 as S,S1 as T,V1 as U,B1 as V,M1 as W,cb as X,m1 as Y,K1 as Z,Q1 as _,k1 as a,Ev as a0,Hv as a1,N1 as a2,R1 as a3,$1 as a4,G1 as a5,xt as b,T1 as c,I1 as d,Po as e,q1 as f,Y1 as g,Rf as h,$p as i,Nh as j,U1 as k,v1 as l,fb as m,H1 as n,p1 as o,g1 as p,ex as q,w1 as r,E1 as s,F1 as t,j1 as u,A1 as v,vs as w,Qb as x,Pn as y,E0 as z};
+ `)]);var Hi=globalThis&&globalThis.__awaiter||function(e,o,t,r){function n(l){return l instanceof t?l:new t(function(a){a(l)})}return new(t||(t=Promise))(function(l,a){function s(u){try{c(r.next(u))}catch(f){a(f)}}function d(u){try{c(r.throw(u))}catch(f){a(f)}}function c(u){u.done?l(u.value):n(u.value).then(s,d)}c((r=r.apply(e,o||[])).next())})};function W0(e,o,t){const{doChange:r,xhrMap:n}=e;let l=0;function a(d){var c;let u=Object.assign({},o,{status:"error",percentage:l});n.delete(o.id),u=nr(((c=e.onError)===null||c===void 0?void 0:c.call(e,{file:u,event:d}))||u),r(u,d)}function s(d){var c;if(e.isErrorState){if(e.isErrorState(t)){a(d);return}}else if(t.status<200||t.status>=300){a(d);return}let u=Object.assign({},o,{status:"finished",percentage:l});n.delete(o.id),u=nr(((c=e.onFinish)===null||c===void 0?void 0:c.call(e,{file:u,event:d}))||u),r(u,d)}return{handleXHRLoad:s,handleXHRError:a,handleXHRAbort(d){const c=Object.assign({},o,{status:"removed",file:null,percentage:l});n.delete(o.id),r(c,d)},handleXHRProgress(d){const c=Object.assign({},o,{status:"uploading"});if(d.lengthComputable){const u=Math.ceil(d.loaded/d.total*100);c.percentage=u,l=u}r(c,d)}}}function N0(e){const{inst:o,file:t,data:r,headers:n,withCredentials:l,action:a,customRequest:s}=e,{doChange:d}=e.inst;let c=0;s({file:t,data:r,headers:n,withCredentials:l,action:a,onProgress(u){const f=Object.assign({},t,{status:"uploading"}),p=u.percent;f.percentage=p,c=p,d(f)},onFinish(){var u;let f=Object.assign({},t,{status:"finished",percentage:c});f=nr(((u=o.onFinish)===null||u===void 0?void 0:u.call(o,{file:f}))||f),d(f)},onError(){var u;let f=Object.assign({},t,{status:"error",percentage:c});f=nr(((u=o.onError)===null||u===void 0?void 0:u.call(o,{file:f}))||f),d(f)}})}function V0(e,o,t){const r=W0(e,o,t);t.onabort=r.handleXHRAbort,t.onerror=r.handleXHRError,t.onload=r.handleXHRLoad,t.upload&&(t.upload.onprogress=r.handleXHRProgress)}function gs(e,o){return typeof e=="function"?e({file:o}):e||{}}function U0(e,o,t){const r=gs(o,t);r&&Object.keys(r).forEach(n=>{e.setRequestHeader(n,r[n])})}function K0(e,o,t){const r=gs(o,t);r&&Object.keys(r).forEach(n=>{e.append(n,r[n])})}function G0(e,o,t,{method:r,action:n,withCredentials:l,responseType:a,headers:s,data:d}){const c=new XMLHttpRequest;c.responseType=a,e.xhrMap.set(t.id,c),c.withCredentials=l;const u=new FormData;if(K0(u,d,t),u.append(o,t.file),V0(e,t,c),n!==void 0){c.open(r.toUpperCase(),n),U0(c,s,t),c.send(u);const f=Object.assign({},t,{status:"uploading"});e.doChange(f)}}const q0=Object.assign(Object.assign({},ne.props),{name:{type:String,default:"file"},accept:String,action:String,customRequest:Function,directory:Boolean,directoryDnd:{type:Boolean,default:void 0},method:{type:String,default:"POST"},multiple:Boolean,showFileList:{type:Boolean,default:!0},data:[Object,Function],headers:[Object,Function],withCredentials:Boolean,responseType:{type:String,default:""},disabled:{type:Boolean,default:void 0},onChange:Function,onRemove:Function,onFinish:Function,onError:Function,onBeforeUpload:Function,isErrorState:Function,onDownload:Function,defaultUpload:{type:Boolean,default:!0},fileList:Array,"onUpdate:fileList":[Function,Array],onUpdateFileList:[Function,Array],fileListStyle:[String,Object],defaultFileList:{type:Array,default:()=>[]},showCancelButton:{type:Boolean,default:!0},showRemoveButton:{type:Boolean,default:!0},showDownloadButton:Boolean,showRetryButton:{type:Boolean,default:!0},showPreviewButton:{type:Boolean,default:!0},listType:{type:String,default:"text"},onPreview:Function,shouldUseThumbnailUrl:{type:Function,default:e=>I0?ps(e):!1},createThumbnailUrl:Function,abstract:Boolean,max:Number,showTrigger:{type:Boolean,default:!0},imageGroupProps:Object,inputProps:Object,triggerStyle:[String,Object],renderIcon:Object}),J1=q({name:"Upload",props:q0,setup(e){e.abstract&&e.listType==="image-card"&&Eo("upload","when the list-type is image-card, abstract is not supported.");const{mergedClsPrefixRef:o,inlineThemeDisabled:t}=ke(e),r=ne("Upload","-upload",j0,Zm,e,o),n=rt(e),l=R(()=>{const{max:k}=e;return k!==void 0?v.value.length>=k:!1}),a=D(e.defaultFileList),s=le(e,"fileList"),d=D(null),c={value:!1},u=D(!1),f=new Map,p=so(s,a),v=R(()=>p.value.map(nr));function h(){var k;(k=d.value)===null||k===void 0||k.click()}function m(k){const $=k.target;S($.files?Array.from($.files).map(L=>({file:L,entry:null,source:"input"})):null,k),$.value=""}function b(k){const{"onUpdate:fileList":$,onUpdateFileList:L}=e;$&&ae($,k),L&&ae(L,k),a.value=k}const x=R(()=>e.multiple||e.directory);function S(k,$){if(!k||k.length===0)return;const{onBeforeUpload:L}=e;k=x.value?k:[k[0]];const{max:M,accept:j}=e;k=k.filter(({file:U,source:_})=>_==="dnd"&&(j!=null&&j.trim())?O0(U.name,U.type,j):!0),M&&(k=k.slice(0,M-v.value.length));const E=it();Promise.all(k.map(({file:U,entry:_})=>Hi(this,void 0,void 0,function*(){var V;const te={id:it(),batchId:E,name:U.name,status:"pending",percentage:0,file:U,url:null,type:U.type,thumbnailUrl:null,fullPath:(V=_==null?void 0:_.fullPath)!==null&&V!==void 0?V:`/${U.webkitRelativePath||U.name}`};return!L||(yield L({file:te,fileList:v.value}))!==!1?te:null}))).then(U=>Hi(this,void 0,void 0,function*(){let _=Promise.resolve();U.forEach(V=>{_=_.then(io).then(()=>{V&&T(V,$,{append:!0})})}),yield _})).then(()=>{e.defaultUpload&&B()})}function B(k){const{method:$,action:L,withCredentials:M,headers:j,data:E,name:U}=e,_=k!==void 0?v.value.filter(te=>te.id===k):v.value,V=k!==void 0;_.forEach(te=>{const{status:N}=te;(N==="pending"||N==="error"&&V)&&(e.customRequest?N0({inst:{doChange:T,xhrMap:f,onFinish:e.onFinish,onError:e.onError},file:te,action:L,withCredentials:M,headers:j,data:E,customRequest:e.customRequest}):G0({doChange:T,xhrMap:f,onFinish:e.onFinish,onError:e.onError,isErrorState:e.isErrorState},U,te,{method:$,action:L,withCredentials:M,responseType:e.responseType,headers:j,data:E}))})}const T=(k,$,L={append:!1,remove:!1})=>{const{append:M,remove:j}=L,E=Array.from(v.value),U=E.findIndex(_=>_.id===k.id);if(M||j||~U){M?E.push(k):j?E.splice(U,1):E.splice(U,1,k);const{onChange:_}=e;_&&_({file:k,fileList:E,event:$}),b(E)}};function z(k){var $;if(k.thumbnailUrl)return k.thumbnailUrl;const{createThumbnailUrl:L}=e;return L?($=L(k.file,k))!==null&&$!==void 0?$:k.url||"":k.url?k.url:k.file?k0(k.file):""}const I=R(()=>{const{common:{cubicBezierEaseInOut:k},self:{draggerColor:$,draggerBorder:L,draggerBorderHover:M,itemColorHover:j,itemColorHoverError:E,itemTextColorError:U,itemTextColorSuccess:_,itemTextColor:V,itemIconColor:te,itemDisabledOpacity:N,lineHeight:G,borderRadius:Ce,fontSize:X,itemBorderImageCardError:ve,itemBorderImageCard:he}}=r.value;return{"--n-bezier":k,"--n-border-radius":Ce,"--n-dragger-border":L,"--n-dragger-border-hover":M,"--n-dragger-color":$,"--n-font-size":X,"--n-item-color-hover":j,"--n-item-color-hover-error":E,"--n-item-disabled-opacity":N,"--n-item-icon-color":te,"--n-item-text-color":V,"--n-item-text-color-error":U,"--n-item-text-color-success":_,"--n-line-height":G,"--n-item-border-image-card-error":ve,"--n-item-border-image-card":he}}),w=t?Ae("upload",void 0,I,e):void 0;Oe(Ut,{mergedClsPrefixRef:o,mergedThemeRef:r,showCancelButtonRef:le(e,"showCancelButton"),showDownloadButtonRef:le(e,"showDownloadButton"),showRemoveButtonRef:le(e,"showRemoveButton"),showRetryButtonRef:le(e,"showRetryButton"),onRemoveRef:le(e,"onRemove"),onDownloadRef:le(e,"onDownload"),mergedFileListRef:v,triggerStyleRef:le(e,"triggerStyle"),shouldUseThumbnailUrlRef:le(e,"shouldUseThumbnailUrl"),renderIconRef:le(e,"renderIcon"),xhrMap:f,submit:B,doChange:T,showPreviewButtonRef:le(e,"showPreviewButton"),onPreviewRef:le(e,"onPreview"),getFileThumbnailUrlResolver:z,listTypeRef:le(e,"listType"),dragOverRef:u,openOpenFileDialog:h,draggerInsideRef:c,handleFileAddition:S,mergedDisabledRef:n.mergedDisabledRef,maxReachedRef:l,fileListStyleRef:le(e,"fileListStyle"),abstractRef:le(e,"abstract"),acceptRef:le(e,"accept"),cssVarsRef:t?void 0:I,themeClassRef:w==null?void 0:w.themeClass,onRender:w==null?void 0:w.onRender,showTriggerRef:le(e,"showTrigger"),imageGroupPropsRef:le(e,"imageGroupProps"),mergedDirectoryDndRef:R(()=>{var k;return(k=e.directoryDnd)!==null&&k!==void 0?k:e.directory})});const O={clear:()=>{a.value=[]},submit:B,openOpenFileDialog:h};return Object.assign({mergedClsPrefix:o,draggerInsideRef:c,inputElRef:d,mergedTheme:r,dragOver:u,mergedMultiple:x,cssVars:t?void 0:I,themeClass:w==null?void 0:w.themeClass,onRender:w==null?void 0:w.onRender,handleFileInputChange:m},O)},render(){var e,o;const{draggerInsideRef:t,mergedClsPrefix:r,$slots:n,directory:l,onRender:a}=this;if(n.default&&!this.abstract){const d=n.default()[0];!((e=d==null?void 0:d.type)===null||e===void 0)&&e[us]&&(t.value=!0)}const s=i("input",Object.assign({},this.inputProps,{ref:"inputElRef",type:"file",class:`${r}-upload-file-input`,accept:this.accept,multiple:this.mergedMultiple,onChange:this.handleFileInputChange,webkitdirectory:l||void 0,directory:l||void 0}));return this.abstract?i(ao,null,(o=n.default)===null||o===void 0?void 0:o.call(n),i(Ni,{to:"body"},s)):(a==null||a(),i("div",{class:[`${r}-upload`,t.value&&`${r}-upload--dragger-inside`,this.dragOver&&`${r}-upload--drag-over`,this.themeClass],style:this.cssVars},s,this.showTrigger&&this.listType!=="image-card"&&i(vs,null,n),this.showFileList&&i(E0,null,n)))}}),Y0=()=>({}),X0={name:"Equation",common:fe,self:Y0},Z0=X0,ex={name:"dark",common:fe,Alert:lu,Anchor:mu,AutoComplete:Ou,Avatar:Ll,AvatarGroup:Nu,BackTop:Ku,Badge:qu,Breadcrumb:rf,Button:$o,ButtonGroup:pg,Calendar:gf,Card:Vl,Carousel:If,Cascader:_f,Checkbox:Nt,Code:Ul,Collapse:Af,CollapseTransition:Wf,ColorPicker:xf,DataTable:Ph,DatePicker:lp,Descriptions:cp,Dialog:va,Divider:Fp,Drawer:Hp,Dropdown:Rn,DynamicInput:tv,DynamicTags:mv,Element:xv,Empty:zt,Ellipsis:ea,Equation:Z0,Form:Sv,GradientText:Uv,Icon:Eh,IconWrapper:og,Image:nb,Input:Ho,InputNumber:gg,LegacyTransfer:Cb,Layout:yg,List:$g,LoadingBar:Pg,Log:Ig,Menu:Ag,Mention:Tg,Message:fg,Modal:Cp,Notification:ag,PageHeader:Wg,Pagination:Ql,Popconfirm:Gg,Popover:$t,Popselect:Kl,Progress:Ea,Radio:ta,Rate:Zg,Result:tm,Row:rb,Scrollbar:zo,Select:Xl,Skeleton:l0,Slider:im,Space:$a,Spin:dm,Statistic:hm,Steps:mm,Switch:xm,Table:Rm,Tabs:Tm,Tag:Sl,Thing:_m,TimePicker:fa,Timeline:Hm,Tooltip:Dr,Transfer:jm,Tree:Ga,TreeSelect:Um,Typography:Ym,Upload:Jm,Watermark:ob};export{Ov as $,_1 as A,J1 as B,C1 as C,y1 as D,P1 as E,S1 as F,D1 as G,L1 as H,x1 as I,Sc as J,W1 as K,h1 as L,qr as M,Z1 as N,X1 as O,Jh as P,z1 as Q,b1 as R,O1 as S,f1 as T,V1 as U,B1 as V,M1 as W,cb as X,m1 as Y,K1 as Z,Q1 as _,k1 as a,Ev as a0,Hv as a1,N1 as a2,R1 as a3,$1 as a4,G1 as a5,xt as b,T1 as c,I1 as d,Po as e,q1 as f,Y1 as g,Rf as h,$p as i,Nh as j,U1 as k,v1 as l,fb as m,H1 as n,p1 as o,g1 as p,ex as q,w1 as r,E1 as s,F1 as t,j1 as u,A1 as v,vs as w,Qb as x,Pn as y,E0 as z};
diff --git a/web/dist/assets/post-item.vue_vue_type_style_index_0_lang-a5e9cab2.js b/web/dist/assets/post-item.vue_vue_type_style_index_0_lang-a5e9cab2.js
deleted file mode 100644
index 4b9e5948..00000000
--- a/web/dist/assets/post-item.vue_vue_type_style_index_0_lang-a5e9cab2.js
+++ /dev/null
@@ -1 +0,0 @@
-import{p as R,a as V,_ as E,b as Y,c as G}from"./content-0e30acaf.js";import{d as J,c as x,r as K,e as a,f,k as n,al as Q,w as o,j as i,F as U,u as W,y as m,bf as l,A as r,x as p,q as u,Y as c,h as C}from"./@vue-a481fc63.js";import{u as X}from"./vuex-44de225f.js";import{u as Z}from"./vue-router-e5a2430e.js";import{R as ee,w as te,x as se}from"./index-4a465428.js";import{c as oe}from"./copy-to-clipboard-4ef7d3eb.js";import{i as ne,j as ae,l as le,m as ie,p as ue,o as ce}from"./@vicons-7a4ef312.js";import{j as v,o as re,M as pe,e as _e,O as me,a as ve,L as de}from"./naive-ui-d8de3dda.js";const he={class:"post-item"},ge={class:"nickname-wrap"},ke={class:"username-wrap"},ye={class:"timestamp-mobile"},fe={class:"item-header-extra"},we=["innerHTML"],be=["onClick"],xe=["onClick"],Ne=J({__name:"mobile-post-item",props:{post:{}},emits:["send-whisper"],setup($,{emit:z}){const d=$,g=Z(),T=X(),w=t=>()=>C(v,null,{default:()=>C(t)}),q=x(()=>{let t=[];return t.push({label:"私信",key:"whisper",icon:w(ue)}),t.push({label:"复制链接",key:"copyTweetLink",icon:w(ce)}),t}),P=async t=>{switch(t){case"copyTweetLink":oe(`${window.location.origin}/#/post?id=${e.value.id}&share=copy_link&t=${new Date().getTime()}`),window.$message.success("链接已复制到剪贴板");break;case"whisper":z("send-whisper",d.post.user);break}},e=x({get:()=>{let t=Object.assign({texts:[],imgs:[],videos:[],links:[],attachments:[],charge_attachments:[]},d.post);return t.contents.map(s=>{(+s.type==1||+s.type==2)&&t.texts.push(s),+s.type==3&&t.imgs.push(s),+s.type==4&&t.videos.push(s),+s.type==6&&t.links.push(s),+s.type==7&&t.attachments.push(s),+s.type==8&&t.charge_attachments.push(s)}),t},set:t=>{d.post.upvote_count=t.upvote_count,d.post.collection_count=t.collection_count}}),L=()=>{te({id:e.value.id}).then(t=>{t.status?e.value={...e.value,upvote_count:e.value.upvote_count+1}:e.value={...e.value,upvote_count:e.value.upvote_count>0?e.value.upvote_count-1:0}}).catch(t=>{console.log(t)})},O=()=>{se({id:e.value.id}).then(t=>{t.status?e.value={...e.value,collection_count:e.value.collection_count+1}:e.value={...e.value,collection_count:e.value.collection_count>0?e.value.collection_count-1:0}}).catch(t=>{console.log(t)})},k=t=>{g.push({name:"post",query:{id:t}})},S=(t,s)=>{if(t.target.dataset.detail){const _=t.target.dataset.detail.split(":");if(_.length===2){T.commit("refresh"),_[0]==="tag"?g.push({name:"home",query:{q:_[1],t:"tag"}}):g.push({name:"user",query:{s:_[1]}});return}}k(s)};return(t,s)=>{const _=re,j=K("router-link"),y=pe,M=_e,D=me,b=V,H=E,B=Y,I=G,N=ve,A=de;return a(),f("div",he,[n(A,{"content-indented":""},Q({avatar:o(()=>[n(_,{round:"",size:30,src:e.value.user.avatar},null,8,["src"])]),header:o(()=>[i("span",ge,[n(j,{onClick:s[0]||(s[0]=m(()=>{},["stop"])),class:"username-link",to:{name:"user",query:{s:e.value.user.username}}},{default:o(()=>[r(p(e.value.user.nickname),1)]),_:1},8,["to"])]),i("span",ke," @"+p(e.value.user.username),1),e.value.is_top?(a(),u(y,{key:0,class:"top-tag",type:"warning",size:"small",round:""},{default:o(()=>[r(" 置顶 ")]),_:1})):c("",!0),e.value.visibility==1?(a(),u(y,{key:1,class:"top-tag",type:"error",size:"small",round:""},{default:o(()=>[r(" 私密 ")]),_:1})):c("",!0),e.value.visibility==2?(a(),u(y,{key:2,class:"top-tag",type:"info",size:"small",round:""},{default:o(()=>[r(" 好友可见 ")]),_:1})):c("",!0),i("div",null,[i("span",ye,p(l(ee)(e.value.created_on))+" "+p(e.value.ip_loc),1)])]),"header-extra":o(()=>[i("div",fe,[n(D,{placement:"bottom-end",trigger:"click",size:"small",options:q.value,onSelect:P},{default:o(()=>[n(M,{quaternary:"",circle:""},{icon:o(()=>[n(l(v),null,{default:o(()=>[n(l(ne))]),_:1})]),_:1})]),_:1},8,["options"])])]),footer:o(()=>[e.value.attachments.length>0?(a(),u(b,{key:0,attachments:e.value.attachments},null,8,["attachments"])):c("",!0),e.value.charge_attachments.length>0?(a(),u(b,{key:1,attachments:e.value.charge_attachments,price:e.value.attachment_price},null,8,["attachments","price"])):c("",!0),e.value.imgs.length>0?(a(),u(H,{key:2,imgs:e.value.imgs},null,8,["imgs"])):c("",!0),e.value.videos.length>0?(a(),u(B,{key:3,videos:e.value.videos},null,8,["videos"])):c("",!0),e.value.links.length>0?(a(),u(I,{key:4,links:e.value.links},null,8,["links"])):c("",!0)]),action:o(()=>[n(N,{justify:"space-between"},{default:o(()=>[i("div",{class:"opt-item",onClick:m(L,["stop"])},[n(l(v),{size:"18",class:"opt-item-icon"},{default:o(()=>[n(l(ae))]),_:1}),r(" "+p(e.value.upvote_count),1)],8,be),i("div",{class:"opt-item",onClick:s[3]||(s[3]=m(h=>k(e.value.id),["stop"]))},[n(l(v),{size:"18",class:"opt-item-icon"},{default:o(()=>[n(l(le))]),_:1}),r(" "+p(e.value.comment_count),1)]),i("div",{class:"opt-item",onClick:m(O,["stop"])},[n(l(v),{size:"18",class:"opt-item-icon"},{default:o(()=>[n(l(ie))]),_:1}),r(" "+p(e.value.collection_count),1)],8,xe)]),_:1})]),_:2},[e.value.texts.length>0?{name:"description",fn:o(()=>[i("div",{onClick:s[2]||(s[2]=h=>k(e.value.id))},[(a(!0),f(U,null,W(e.value.texts,h=>(a(),f("span",{key:h.id,class:"post-text",onClick:s[1]||(s[1]=m(F=>S(F,e.value.id),["stop"])),innerHTML:l(R)(h.content).content},null,8,we))),128))])]),key:"0"}:void 0]),1024)])}}});const Ce={class:"nickname-wrap"},$e={class:"username-wrap"},ze={class:"item-header-extra"},Te={class:"timestamp"},qe=["innerHTML"],Pe=["onClick"],Le=["onClick"],Ae=J({__name:"post-item",props:{post:{}},emits:["send-whisper"],setup($,{emit:z}){const d=$,g=Z(),T=X(),w=t=>()=>C(v,null,{default:()=>C(t)}),q=x(()=>{let t=[];return t.push({label:"私信",key:"whisper",icon:w(ue)}),t.push({label:"复制链接",key:"copyTweetLink",icon:w(ce)}),t}),P=async t=>{switch(t){case"copyTweetLink":oe(`${window.location.origin}/#/post?id=${e.value.id}&share=copy_link&t=${new Date().getTime()}`),window.$message.success("链接已复制到剪贴板");break;case"whisper":z("send-whisper",d.post.user);break}},e=x({get:()=>{let t=Object.assign({texts:[],imgs:[],videos:[],links:[],attachments:[],charge_attachments:[]},d.post);return t.contents.map(s=>{(+s.type==1||+s.type==2)&&t.texts.push(s),+s.type==3&&t.imgs.push(s),+s.type==4&&t.videos.push(s),+s.type==6&&t.links.push(s),+s.type==7&&t.attachments.push(s),+s.type==8&&t.charge_attachments.push(s)}),t},set:t=>{d.post.upvote_count=t.upvote_count,d.post.collection_count=t.collection_count}}),L=()=>{te({id:e.value.id}).then(t=>{t.status?e.value={...e.value,upvote_count:e.value.upvote_count+1}:e.value={...e.value,upvote_count:e.value.upvote_count>0?e.value.upvote_count-1:0}}).catch(t=>{console.log(t)})},O=()=>{se({id:e.value.id}).then(t=>{t.status?e.value={...e.value,collection_count:e.value.collection_count+1}:e.value={...e.value,collection_count:e.value.collection_count>0?e.value.collection_count-1:0}}).catch(t=>{console.log(t)})},k=t=>{g.push({name:"post",query:{id:t}})},S=(t,s)=>{if(t.target.dataset.detail){const _=t.target.dataset.detail.split(":");if(_.length===2){T.commit("refresh"),_[0]==="tag"?g.push({name:"home",query:{q:_[1],t:"tag"}}):g.push({name:"user",query:{s:_[1]}});return}}k(s)};return(t,s)=>{const _=re,j=K("router-link"),y=pe,M=_e,D=me,b=V,H=E,B=Y,I=G,N=ve,A=de;return a(),f("div",{class:"post-item",onClick:s[3]||(s[3]=h=>k(e.value.id))},[n(A,{"content-indented":""},Q({avatar:o(()=>[n(_,{round:"",size:30,src:e.value.user.avatar},null,8,["src"])]),header:o(()=>[i("span",Ce,[n(j,{onClick:s[0]||(s[0]=m(()=>{},["stop"])),class:"username-link",to:{name:"user",query:{s:e.value.user.username}}},{default:o(()=>[r(p(e.value.user.nickname),1)]),_:1},8,["to"])]),i("span",$e," @"+p(e.value.user.username),1),e.value.is_top?(a(),u(y,{key:0,class:"top-tag",type:"warning",size:"small",round:""},{default:o(()=>[r(" 置顶 ")]),_:1})):c("",!0),e.value.visibility==1?(a(),u(y,{key:1,class:"top-tag",type:"error",size:"small",round:""},{default:o(()=>[r(" 私密 ")]),_:1})):c("",!0),e.value.visibility==2?(a(),u(y,{key:2,class:"top-tag",type:"info",size:"small",round:""},{default:o(()=>[r(" 好友可见 ")]),_:1})):c("",!0)]),"header-extra":o(()=>[i("div",ze,[i("span",Te,p(e.value.ip_loc?e.value.ip_loc+" · ":e.value.ip_loc)+" "+p(l(ee)(e.value.created_on)),1),n(D,{placement:"bottom-end",trigger:"hover",size:"small",options:q.value,onSelect:P},{default:o(()=>[n(M,{quaternary:"",circle:""},{icon:o(()=>[n(l(v),null,{default:o(()=>[n(l(ne))]),_:1})]),_:1})]),_:1},8,["options"])])]),footer:o(()=>[e.value.attachments.length>0?(a(),u(b,{key:0,attachments:e.value.attachments},null,8,["attachments"])):c("",!0),e.value.charge_attachments.length>0?(a(),u(b,{key:1,attachments:e.value.charge_attachments,price:e.value.attachment_price},null,8,["attachments","price"])):c("",!0),e.value.imgs.length>0?(a(),u(H,{key:2,imgs:e.value.imgs},null,8,["imgs"])):c("",!0),e.value.videos.length>0?(a(),u(B,{key:3,videos:e.value.videos},null,8,["videos"])):c("",!0),e.value.links.length>0?(a(),u(I,{key:4,links:e.value.links},null,8,["links"])):c("",!0)]),action:o(()=>[n(N,{justify:"space-between"},{default:o(()=>[i("div",{class:"opt-item hover",onClick:m(L,["stop"])},[n(l(v),{size:"18",class:"opt-item-icon"},{default:o(()=>[n(l(ae))]),_:1}),r(" "+p(e.value.upvote_count),1)],8,Pe),i("div",{class:"opt-item hover",onClick:s[2]||(s[2]=m(h=>k(e.value.id),["stop"]))},[n(l(v),{size:"18",class:"opt-item-icon"},{default:o(()=>[n(l(le))]),_:1}),r(" "+p(e.value.comment_count),1)]),i("div",{class:"opt-item hover",onClick:m(O,["stop"])},[n(l(v),{size:"18",class:"opt-item-icon"},{default:o(()=>[n(l(ie))]),_:1}),r(" "+p(e.value.collection_count),1)],8,Le)]),_:1})]),_:2},[e.value.texts.length>0?{name:"description",fn:o(()=>[(a(!0),f(U,null,W(e.value.texts,h=>(a(),f("span",{key:h.id,class:"post-text hover",onClick:s[1]||(s[1]=m(F=>S(F,e.value.id),["stop"])),innerHTML:l(R)(h.content).content},null,8,qe))),128))]),key:"0"}:void 0]),1024)])}}});export{Ae as _,Ne as a};
diff --git a/web/dist/assets/post-item.vue_vue_type_style_index_0_lang-c2092e3d.js b/web/dist/assets/post-item.vue_vue_type_style_index_0_lang-c2092e3d.js
new file mode 100644
index 00000000..ec33cbe6
--- /dev/null
+++ b/web/dist/assets/post-item.vue_vue_type_style_index_0_lang-c2092e3d.js
@@ -0,0 +1 @@
+import{p as R,a as V,_ as E,b as J,c as K}from"./content-64a02a2f.js";import{d as W,c as x,r as Y,e as l,f as b,k as n,al as G,w as s,j as u,F as Q,u as U,y as v,bf as i,A as p,x as _,q as c,Y as r,h as $}from"./@vue-a481fc63.js";import{u as X}from"./vuex-44de225f.js";import{u as Z}from"./vue-router-e5a2430e.js";import{S as ee,A as te,B as oe}from"./index-daff1b26.js";import{c as se}from"./copy-to-clipboard-4ef7d3eb.js";import{k as ne,l as ae,n as le,o as ie,r as ue,s as ce,t as re,J as pe,K as _e,q as de}from"./@vicons-c265fba6.js";import{j as h,o as me,M as ve,e as he,P as fe,a as ke,O as ge}from"./naive-ui-defd0b2d.js";const ye={class:"post-item"},we={class:"nickname-wrap"},be={class:"username-wrap"},Ce={class:"timestamp-mobile"},xe={class:"item-header-extra"},$e=["innerHTML"],Oe=["onClick"],qe=["onClick"],Ve=W({__name:"mobile-post-item",props:{post:{},isOwner:{type:Boolean},addFriendAction:{type:Boolean},addFollowAction:{type:Boolean}},emits:["send-whisper","handle-follow-action","handle-friend-action"],setup(O,{emit:k}){const a=O,g=Z(),q=X(),d=t=>()=>$(h,null,{default:()=>$(t)}),z=x(()=>{let t=[];return a.isOwner||t.push({label:"私信",key:"whisper",icon:d(ue)}),!a.isOwner&&a.addFollowAction&&(a.post.user.is_following?t.push({label:"取消关注",key:"unfollow",icon:d(ce)}):t.push({label:"关注",key:"follow",icon:d(re)})),!a.isOwner&&a.addFriendAction&&(a.post.user.is_friend?t.push({label:"删除好友",key:"delete",icon:d(pe)}):t.push({label:"添加朋友",key:"requesting",icon:d(_e)})),t.push({label:"复制链接",key:"copyTweetLink",icon:d(de)}),t}),T=async t=>{switch(t){case"copyTweetLink":se(`${window.location.origin}/#/post?id=${e.value.id}&share=copy_link&t=${new Date().getTime()}`),window.$message.success("链接已复制到剪贴板");break;case"whisper":k("send-whisper",a.post.user);break;case"delete":case"requesting":k("handle-friend-action",a.post);break;case"follow":case"unfollow":k("handle-follow-action",a.post);break}},e=x({get:()=>{let t=Object.assign({texts:[],imgs:[],videos:[],links:[],attachments:[],charge_attachments:[]},a.post);return t.contents.map(o=>{(+o.type==1||+o.type==2)&&t.texts.push(o),+o.type==3&&t.imgs.push(o),+o.type==4&&t.videos.push(o),+o.type==6&&t.links.push(o),+o.type==7&&t.attachments.push(o),+o.type==8&&t.charge_attachments.push(o)}),t},set:t=>{a.post.upvote_count=t.upvote_count,a.post.collection_count=t.collection_count}}),P=()=>{te({id:e.value.id}).then(t=>{t.status?e.value={...e.value,upvote_count:e.value.upvote_count+1}:e.value={...e.value,upvote_count:e.value.upvote_count>0?e.value.upvote_count-1:0}}).catch(t=>{console.log(t)})},A=()=>{oe({id:e.value.id}).then(t=>{t.status?e.value={...e.value,collection_count:e.value.collection_count+1}:e.value={...e.value,collection_count:e.value.collection_count>0?e.value.collection_count-1:0}}).catch(t=>{console.log(t)})},y=t=>{g.push({name:"post",query:{id:t}})},B=(t,o)=>{if(t.target.dataset.detail){const m=t.target.dataset.detail.split(":");if(m.length===2){q.commit("refresh"),m[0]==="tag"?g.push({name:"home",query:{q:m[1],t:"tag"}}):g.push({name:"user",query:{s:m[1]}});return}}y(o)};return(t,o)=>{const m=me,F=Y("router-link"),w=ve,S=he,L=fe,C=V,M=E,j=J,D=K,H=ke,I=ge;return l(),b("div",ye,[n(I,{"content-indented":""},G({avatar:s(()=>[n(m,{round:"",size:30,src:e.value.user.avatar},null,8,["src"])]),header:s(()=>[u("span",we,[n(F,{onClick:o[0]||(o[0]=v(()=>{},["stop"])),class:"username-link",to:{name:"user",query:{s:e.value.user.username}}},{default:s(()=>[p(_(e.value.user.nickname),1)]),_:1},8,["to"])]),u("span",be," @"+_(e.value.user.username),1),e.value.is_top?(l(),c(w,{key:0,class:"top-tag",type:"warning",size:"small",round:""},{default:s(()=>[p(" 置顶 ")]),_:1})):r("",!0),e.value.visibility==1?(l(),c(w,{key:1,class:"top-tag",type:"error",size:"small",round:""},{default:s(()=>[p(" 私密 ")]),_:1})):r("",!0),e.value.visibility==2?(l(),c(w,{key:2,class:"top-tag",type:"info",size:"small",round:""},{default:s(()=>[p(" 好友可见 ")]),_:1})):r("",!0),u("div",null,[u("span",Ce,_(i(ee)(e.value.created_on))+" "+_(e.value.ip_loc),1)])]),"header-extra":s(()=>[u("div",xe,[n(L,{placement:"bottom-end",trigger:"click",size:"small",options:z.value,onSelect:T},{default:s(()=>[n(S,{quaternary:"",circle:""},{icon:s(()=>[n(i(h),null,{default:s(()=>[n(i(ne))]),_:1})]),_:1})]),_:1},8,["options"])])]),footer:s(()=>[e.value.attachments.length>0?(l(),c(C,{key:0,attachments:e.value.attachments},null,8,["attachments"])):r("",!0),e.value.charge_attachments.length>0?(l(),c(C,{key:1,attachments:e.value.charge_attachments,price:e.value.attachment_price},null,8,["attachments","price"])):r("",!0),e.value.imgs.length>0?(l(),c(M,{key:2,imgs:e.value.imgs},null,8,["imgs"])):r("",!0),e.value.videos.length>0?(l(),c(j,{key:3,videos:e.value.videos},null,8,["videos"])):r("",!0),e.value.links.length>0?(l(),c(D,{key:4,links:e.value.links},null,8,["links"])):r("",!0)]),action:s(()=>[n(H,{justify:"space-between"},{default:s(()=>[u("div",{class:"opt-item",onClick:v(P,["stop"])},[n(i(h),{size:"18",class:"opt-item-icon"},{default:s(()=>[n(i(ae))]),_:1}),p(" "+_(e.value.upvote_count),1)],8,Oe),u("div",{class:"opt-item",onClick:o[3]||(o[3]=v(f=>y(e.value.id),["stop"]))},[n(i(h),{size:"18",class:"opt-item-icon"},{default:s(()=>[n(i(le))]),_:1}),p(" "+_(e.value.comment_count),1)]),u("div",{class:"opt-item",onClick:v(A,["stop"])},[n(i(h),{size:"18",class:"opt-item-icon"},{default:s(()=>[n(i(ie))]),_:1}),p(" "+_(e.value.collection_count),1)],8,qe)]),_:1})]),_:2},[e.value.texts.length>0?{name:"description",fn:s(()=>[u("div",{onClick:o[2]||(o[2]=f=>y(e.value.id))},[(l(!0),b(Q,null,U(e.value.texts,f=>(l(),b("span",{key:f.id,class:"post-text",onClick:o[1]||(o[1]=v(N=>B(N,e.value.id),["stop"])),innerHTML:i(R)(f.content).content},null,8,$e))),128))])]),key:"0"}:void 0]),1024)])}}});const ze={class:"nickname-wrap"},Te={class:"username-wrap"},Pe={class:"item-header-extra"},Ae={class:"timestamp"},Be=["innerHTML"],Fe=["onClick"],Se=["onClick"],Ee=W({__name:"post-item",props:{post:{},isOwner:{type:Boolean},addFriendAction:{type:Boolean},addFollowAction:{type:Boolean}},emits:["send-whisper","handle-follow-action","handle-friend-action"],setup(O,{emit:k}){const a=O,g=Z(),q=X(),d=t=>()=>$(h,null,{default:()=>$(t)}),z=x(()=>{let t=[];return a.isOwner||t.push({label:"私信",key:"whisper",icon:d(ue)}),!a.isOwner&&a.addFollowAction&&(a.post.user.is_following?t.push({label:"取消关注",key:"unfollow",icon:d(ce)}):t.push({label:"关注",key:"follow",icon:d(re)})),!a.isOwner&&a.addFriendAction&&(a.post.user.is_friend?t.push({label:"删除好友",key:"delete",icon:d(pe)}):t.push({label:"添加朋友",key:"requesting",icon:d(_e)})),t.push({label:"复制链接",key:"copyTweetLink",icon:d(de)}),t}),T=async t=>{switch(t){case"copyTweetLink":se(`${window.location.origin}/#/post?id=${e.value.id}&share=copy_link&t=${new Date().getTime()}`),window.$message.success("链接已复制到剪贴板");break;case"whisper":k("send-whisper",a.post.user);break;case"delete":case"requesting":k("handle-friend-action",a.post);break;case"follow":case"unfollow":k("handle-follow-action",a.post);break}},e=x({get:()=>{let t=Object.assign({texts:[],imgs:[],videos:[],links:[],attachments:[],charge_attachments:[]},a.post);return t.contents.map(o=>{(+o.type==1||+o.type==2)&&t.texts.push(o),+o.type==3&&t.imgs.push(o),+o.type==4&&t.videos.push(o),+o.type==6&&t.links.push(o),+o.type==7&&t.attachments.push(o),+o.type==8&&t.charge_attachments.push(o)}),t},set:t=>{a.post.upvote_count=t.upvote_count,a.post.collection_count=t.collection_count}}),P=()=>{te({id:e.value.id}).then(t=>{t.status?e.value={...e.value,upvote_count:e.value.upvote_count+1}:e.value={...e.value,upvote_count:e.value.upvote_count>0?e.value.upvote_count-1:0}}).catch(t=>{console.log(t)})},A=()=>{oe({id:e.value.id}).then(t=>{t.status?e.value={...e.value,collection_count:e.value.collection_count+1}:e.value={...e.value,collection_count:e.value.collection_count>0?e.value.collection_count-1:0}}).catch(t=>{console.log(t)})},y=t=>{g.push({name:"post",query:{id:t}})},B=(t,o)=>{if(t.target.dataset.detail){const m=t.target.dataset.detail.split(":");if(m.length===2){q.commit("refresh"),m[0]==="tag"?g.push({name:"home",query:{q:m[1],t:"tag"}}):g.push({name:"user",query:{s:m[1]}});return}}y(o)};return(t,o)=>{const m=me,F=Y("router-link"),w=ve,S=he,L=fe,C=V,M=E,j=J,D=K,H=ke,I=ge;return l(),b("div",{class:"post-item",onClick:o[3]||(o[3]=f=>y(e.value.id))},[n(I,{"content-indented":""},G({avatar:s(()=>[n(m,{round:"",size:30,src:e.value.user.avatar},null,8,["src"])]),header:s(()=>[u("span",ze,[n(F,{onClick:o[0]||(o[0]=v(()=>{},["stop"])),class:"username-link",to:{name:"user",query:{s:e.value.user.username}}},{default:s(()=>[p(_(e.value.user.nickname),1)]),_:1},8,["to"])]),u("span",Te," @"+_(e.value.user.username),1),e.value.is_top?(l(),c(w,{key:0,class:"top-tag",type:"warning",size:"small",round:""},{default:s(()=>[p(" 置顶 ")]),_:1})):r("",!0),e.value.visibility==1?(l(),c(w,{key:1,class:"top-tag",type:"error",size:"small",round:""},{default:s(()=>[p(" 私密 ")]),_:1})):r("",!0),e.value.visibility==2?(l(),c(w,{key:2,class:"top-tag",type:"info",size:"small",round:""},{default:s(()=>[p(" 好友可见 ")]),_:1})):r("",!0)]),"header-extra":s(()=>[u("div",Pe,[u("span",Ae,_(e.value.ip_loc?e.value.ip_loc+" · ":e.value.ip_loc)+" "+_(i(ee)(e.value.created_on)),1),n(L,{placement:"bottom-end",trigger:"hover",size:"small",options:z.value,onSelect:T},{default:s(()=>[n(S,{quaternary:"",circle:""},{icon:s(()=>[n(i(h),null,{default:s(()=>[n(i(ne))]),_:1})]),_:1})]),_:1},8,["options"])])]),footer:s(()=>[e.value.attachments.length>0?(l(),c(C,{key:0,attachments:e.value.attachments},null,8,["attachments"])):r("",!0),e.value.charge_attachments.length>0?(l(),c(C,{key:1,attachments:e.value.charge_attachments,price:e.value.attachment_price},null,8,["attachments","price"])):r("",!0),e.value.imgs.length>0?(l(),c(M,{key:2,imgs:e.value.imgs},null,8,["imgs"])):r("",!0),e.value.videos.length>0?(l(),c(j,{key:3,videos:e.value.videos},null,8,["videos"])):r("",!0),e.value.links.length>0?(l(),c(D,{key:4,links:e.value.links},null,8,["links"])):r("",!0)]),action:s(()=>[n(H,{justify:"space-between"},{default:s(()=>[u("div",{class:"opt-item hover",onClick:v(P,["stop"])},[n(i(h),{size:"18",class:"opt-item-icon"},{default:s(()=>[n(i(ae))]),_:1}),p(" "+_(e.value.upvote_count),1)],8,Fe),u("div",{class:"opt-item hover",onClick:o[2]||(o[2]=v(f=>y(e.value.id),["stop"]))},[n(i(h),{size:"18",class:"opt-item-icon"},{default:s(()=>[n(i(le))]),_:1}),p(" "+_(e.value.comment_count),1)]),u("div",{class:"opt-item hover",onClick:v(A,["stop"])},[n(i(h),{size:"18",class:"opt-item-icon"},{default:s(()=>[n(i(ie))]),_:1}),p(" "+_(e.value.collection_count),1)],8,Se)]),_:1})]),_:2},[e.value.texts.length>0?{name:"description",fn:s(()=>[(l(!0),b(Q,null,U(e.value.texts,f=>(l(),b("span",{key:f.id,class:"post-text hover",onClick:o[1]||(o[1]=v(N=>B(N,e.value.id),["stop"])),innerHTML:i(R)(f.content).content},null,8,Be))),128))]),key:"0"}:void 0]),1024)])}}});export{Ee as _,Ve as a};
diff --git a/web/dist/assets/post-skeleton-4d2b103e.js b/web/dist/assets/post-skeleton-8434d30b.js
similarity index 77%
rename from web/dist/assets/post-skeleton-4d2b103e.js
rename to web/dist/assets/post-skeleton-8434d30b.js
index cadb4053..54cfd078 100644
--- a/web/dist/assets/post-skeleton-4d2b103e.js
+++ b/web/dist/assets/post-skeleton-8434d30b.js
@@ -1 +1 @@
-import{U as r}from"./naive-ui-d8de3dda.js";import{d as c,e as s,f as n,u as p,j as o,k as t,F as l}from"./@vue-a481fc63.js";import{_ as i}from"./index-4a465428.js";const m={class:"user"},u={class:"content"},d=c({__name:"post-skeleton",props:{num:{default:1}},setup(f){return(_,k)=>{const e=r;return s(!0),n(l,null,p(new Array(_.num),a=>(s(),n("div",{class:"skeleton-item",key:a},[o("div",m,[t(e,{circle:"",size:"small"})]),o("div",u,[t(e,{text:"",repeat:3}),t(e,{text:"",style:{width:"60%"}})])]))),128)}}});const b=i(d,[["__scopeId","data-v-ab0015b4"]]);export{b as _};
+import{U as r}from"./naive-ui-defd0b2d.js";import{d as c,e as s,f as n,u as p,j as o,k as t,F as l}from"./@vue-a481fc63.js";import{_ as i}from"./index-daff1b26.js";const m={class:"user"},u={class:"content"},d=c({__name:"post-skeleton",props:{num:{default:1}},setup(f){return(_,k)=>{const e=r;return s(!0),n(l,null,p(new Array(_.num),a=>(s(),n("div",{class:"skeleton-item",key:a},[o("div",m,[t(e,{circle:"",size:"small"})]),o("div",u,[t(e,{text:"",repeat:3}),t(e,{text:"",style:{width:"60%"}})])]))),128)}}});const b=i(d,[["__scopeId","data-v-ab0015b4"]]);export{b as _};
diff --git a/web/dist/assets/whisper-7dcedd50.js b/web/dist/assets/whisper-9b4eeceb.js
similarity index 57%
rename from web/dist/assets/whisper-7dcedd50.js
rename to web/dist/assets/whisper-9b4eeceb.js
index 4b07c8b6..652708ea 100644
--- a/web/dist/assets/whisper-7dcedd50.js
+++ b/web/dist/assets/whisper-9b4eeceb.js
@@ -1 +1 @@
-import{W as b,_ as k}from"./index-4a465428.js";import{R as B,H as C,S as N,b as R,e as U,i as V}from"./naive-ui-d8de3dda.js";import{d as W,H as p,e as $,q as z,w as s,j as a,k as n,A as _,x as i}from"./@vue-a481fc63.js";const H={class:"whisper-wrap"},S={class:"whisper-line"},j={class:"whisper-line send-wrap"},q=W({__name:"whisper",props:{show:{type:Boolean,default:!1},user:{}},emits:["success"],setup(r,{emit:u}){const d=r,o=p(""),t=p(!1),c=()=>{u("success")},m=()=>{t.value=!0,b({user_id:d.user.id,content:o.value}).then(e=>{window.$message.success("发送成功"),t.value=!1,o.value="",c()}).catch(e=>{t.value=!1})};return(e,l)=>{const h=B,w=C,f=N,v=R,g=U,y=V;return $(),z(y,{show:e.show,"onUpdate:show":c,class:"whisper-card",preset:"card",size:"small",title:"私信","mask-closable":!1,bordered:!1,style:{width:"360px"}},{default:s(()=>[a("div",H,[n(f,{"show-icon":!1},{default:s(()=>[_(" 即将发送私信给: "),n(w,{style:{"max-width":"100%"}},{default:s(()=>[n(h,{type:"success"},{default:s(()=>[_(i(e.user.nickname)+"@"+i(e.user.username),1)]),_:1})]),_:1})]),_:1}),a("div",S,[n(v,{type:"textarea",placeholder:"请输入私信内容(请勿发送不和谐内容,否则将会被封号)",autosize:{minRows:5,maxRows:10},value:o.value,"onUpdate:value":l[0]||(l[0]=x=>o.value=x),maxlength:"200","show-count":""},null,8,["value"])]),a("div",j,[n(g,{strong:"",secondary:"",type:"primary",loading:t.value,onClick:m},{default:s(()=>[_(" 发送 ")]),_:1},8,["loading"])])])]),_:1},8,["show"])}}});const M=k(q,[["__scopeId","data-v-0cbfe47c"]]);export{M as _};
+import{X as b,_ as k}from"./index-daff1b26.js";import{d as B,H as p,e as C,q as N,w as s,j as a,k as n,A as _,x as i}from"./@vue-a481fc63.js";import{S as U,I as V,T as z,b as I,e as R,i as S}from"./naive-ui-defd0b2d.js";const T={class:"whisper-wrap"},W={class:"whisper-line"},$={class:"whisper-line send-wrap"},j=B({__name:"whisper",props:{show:{type:Boolean,default:!1},user:{}},emits:["success"],setup(r,{emit:u}){const d=r,o=p(""),t=p(!1),c=()=>{u("success")},m=()=>{t.value=!0,b({user_id:d.user.id,content:o.value}).then(e=>{window.$message.success("发送成功"),t.value=!1,o.value="",c()}).catch(e=>{t.value=!1})};return(e,l)=>{const h=U,w=V,f=z,v=I,g=R,y=S;return C(),N(y,{show:e.show,"onUpdate:show":c,class:"whisper-card",preset:"card",size:"small",title:"私信","mask-closable":!1,bordered:!1,style:{width:"360px"}},{default:s(()=>[a("div",T,[n(f,{"show-icon":!1},{default:s(()=>[_(" 即将发送私信给: "),n(w,{style:{"max-width":"100%"}},{default:s(()=>[n(h,{type:"success"},{default:s(()=>[_(i(e.user.nickname)+"@"+i(e.user.username),1)]),_:1})]),_:1})]),_:1}),a("div",W,[n(v,{type:"textarea",placeholder:"请输入私信内容(请勿发送不和谐内容,否则将会被封号)",autosize:{minRows:5,maxRows:10},value:o.value,"onUpdate:value":l[0]||(l[0]=x=>o.value=x),maxlength:"200","show-count":""},null,8,["value"])]),a("div",$,[n(g,{strong:"",secondary:"",type:"primary",loading:t.value,onClick:m},{default:s(()=>[_(" 发送 ")]),_:1},8,["loading"])])])]),_:1},8,["show"])}}});const H=k(j,[["__scopeId","data-v-0cbfe47c"]]);export{H as _};
diff --git a/web/dist/assets/whisper-add-friend-01aea97d.css b/web/dist/assets/whisper-add-friend-01aea97d.css
new file mode 100644
index 00000000..1d423c25
--- /dev/null
+++ b/web/dist/assets/whisper-add-friend-01aea97d.css
@@ -0,0 +1 @@
+.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}
diff --git a/web/dist/assets/whisper-add-friend-7ede77e9.js b/web/dist/assets/whisper-add-friend-7ede77e9.js
new file mode 100644
index 00000000..73e1555a
--- /dev/null
+++ b/web/dist/assets/whisper-add-friend-7ede77e9.js
@@ -0,0 +1 @@
+import{M as b,_ as k}from"./index-daff1b26.js";import{S as B,I as A,T as C,b as F,e as N,i as V}from"./naive-ui-defd0b2d.js";import{d as W,H as i,e as q,q as z,w as s,j as a,k as n,A as _,x as r}from"./@vue-a481fc63.js";const I={class:"whisper-wrap"},M={class:"whisper-line"},R={class:"whisper-line send-wrap"},S=W({__name:"whisper-add-friend",props:{show:{type:Boolean,default:!1},user:{}},emits:["success"],setup(p,{emit:d}){const u=p,o=i(""),t=i(!1),l=()=>{d("success")},m=()=>{t.value=!0,b({user_id:u.user.id,greetings:o.value}).then(e=>{window.$message.success("发送成功"),t.value=!1,o.value="",l()}).catch(e=>{t.value=!1})};return(e,c)=>{const h=B,w=A,f=C,g=F,v=N,y=V;return q(),z(y,{show:e.show,"onUpdate:show":l,class:"whisper-card",preset:"card",size:"small",title:"申请添加朋友","mask-closable":!1,bordered:!1,style:{width:"360px"}},{default:s(()=>[a("div",I,[n(f,{"show-icon":!1},{default:s(()=>[_(" 发送添加朋友申请给: "),n(w,{style:{"max-width":"100%"}},{default:s(()=>[n(h,{type:"success"},{default:s(()=>[_(r(e.user.nickname)+"@"+r(e.user.username),1)]),_:1})]),_:1})]),_:1}),a("div",M,[n(g,{type:"textarea",placeholder:"请输入真挚的问候语",autosize:{minRows:5,maxRows:10},value:o.value,"onUpdate:value":c[0]||(c[0]=x=>o.value=x),maxlength:"120","show-count":""},null,8,["value"])]),a("div",R,[n(v,{strong:"",secondary:"",type:"primary",loading:t.value,onClick:m},{default:s(()=>[_(" 发送 ")]),_:1},8,["loading"])])])]),_:1},8,["show"])}}});const D=k(S,[["__scopeId","data-v-60be56a2"]]);export{D as W};
diff --git a/web/dist/index.html b/web/dist/index.html
index c69639b1..f24076ad 100644
--- a/web/dist/index.html
+++ b/web/dist/index.html
@@ -8,7 +8,7 @@
泡泡
-
+
@@ -26,9 +26,9 @@
-
+
-
+
diff --git a/web/src/api/post.ts b/web/src/api/post.ts
index c5d27840..919c7b42 100644
--- a/web/src/api/post.ts
+++ b/web/src/api/post.ts
@@ -231,6 +231,17 @@ export const deleteComment = (
});
};
+/** 精选评论 */
+export const highlightComment = (
+ data: NetParams.PostHighlightComment
+): Promise => {
+ return request({
+ method: "post",
+ url: "/v1/post/comment/highlight",
+ data,
+ });
+};
+
/** 发布评论回复 */
export const createCommentReply = (
data: NetParams.PostCreateCommentReply
diff --git a/web/src/components/comment-item.vue b/web/src/components/comment-item.vue
index c9254769..8292b903 100644
--- a/web/src/components/comment-item.vue
+++ b/web/src/components/comment-item.vue
@@ -20,13 +20,46 @@
@{{ comment.user.username }}
+
+ 精选
+
{{ comment.ip_loc}}
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ comment.is_essence == YesNoEnum.NO ? "是否精选这条评论" : "是否取消精选"}}
+
@@ -50,7 +83,7 @@
- 是否确认删除?
+ 是否删除这条评论?
@@ -98,8 +131,9 @@ import { ref, computed } from 'vue';
import { useStore } from 'vuex';
import { useRouter } from 'vue-router';
import { parsePostTag } from '@/utils/content';
-import { Trash } from '@vicons/tabler';
-import { deleteComment } from '@/api/post';
+import { Trash, ArrowBarToUp, ArrowBarDown } from '@vicons/tabler';
+import { deleteComment, highlightComment } from '@/api/post';
+import { YesNoEnum } from '@/utils/IEnum';
const store = useStore();
const router = useRouter();
@@ -111,7 +145,8 @@ const emit = defineEmits<{
(e: 'reload'): void
}>();
const props = withDefaults(defineProps<{
- comment: Item.CommentProps
+ comment: Item.CommentProps,
+ postUserId: number
}>(), {})
const comment = computed(() => {
@@ -170,14 +205,27 @@ const execDelAction = () => {
deleteComment({
id: comment.value.id,
})
- .then((res) => {
+ .then((_res) => {
window.$message.success('删除成功');
+ setTimeout(() => {
+ reload();
+ }, 50);
+ })
+ .catch((_err) => {});
+};
+const execHightlightAction = () => {
+ highlightComment({
+ id: comment.value.id,
+ })
+ .then((res) => {
+ comment.value.is_essence = res.highlight_status;
+ window.$message.success("操作成功");
setTimeout(() => {
reload();
}, 50);
})
- .catch((err) => {});
+ .catch((_err) => {});
};
@@ -194,7 +242,9 @@ const execDelAction = () => {
font-size: 14px;
opacity: 0.75;
}
-
+ .top-tag {
+ transform: scale(0.75);
+ }
.opt-wrap {
display: flex;
align-items: center;
@@ -202,11 +252,10 @@ const execDelAction = () => {
opacity: 0.75;
font-size: 12px;
}
- .del-btn {
+ .action-btn {
margin-left: 4px;
}
}
-
.comment-text {
display: block;
text-align: justify;
@@ -214,7 +263,6 @@ const execDelAction = () => {
white-space: pre-wrap;
word-break: break-all;
}
-
.opt-item {
display: flex;
align-items: center;
diff --git a/web/src/components/message-item.vue b/web/src/components/message-item.vue
index ddba8f72..6c35badb 100644
--- a/web/src/components/message-item.vue
+++ b/web/src/components/message-item.vue
@@ -157,20 +157,26 @@