From e46c5c2b6f896a6d71bd9b310610d36f14d47df9 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E5=B0=8F=E8=8E=AB=E5=94=90=E5=B0=BC?= <1431128779@qq.com>
Date: Sat, 10 Dec 2022 14:24:36 +0800
Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=EF=BC=9A=E6=96=87=E7=AB=A0?=
=?UTF-8?q?=E7=89=88=E6=9D=83=E8=AF=B4=E6=98=8E=EF=BC=9B=20=E6=96=B0?=
=?UTF-8?q?=E5=A2=9E=EF=BC=9A=E6=96=87=E7=AB=A0=E8=AF=A6=E6=83=85=E7=82=B9?=
=?UTF-8?q?=E5=87=BB=E6=A0=87=E7=AD=BE=E8=B7=B3=E8=BD=AC=E6=9F=A5=E8=AF=A2?=
=?UTF-8?q?=E6=A0=87=E7=AD=BE=E4=B8=8B=E7=9A=84=E6=96=87=E7=AB=A0=E5=88=97?=
=?UTF-8?q?=E8=A1=A8=EF=BC=9B=20=E4=BC=98=E5=8C=96=EF=BC=9A=E8=B0=83?=
=?UTF-8?q?=E6=95=B4markdown=E6=96=87=E5=AD=97=E5=A4=A7=E5=B0=8F?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
api/index.js | 2 +
api/tag.js | 24 ++++
common/markdown/markdown.config.js | 14 +-
components/comment-item/comment-item.vue | 6 +-
components/comment-list/comment-list.vue | 28 +++-
config/halo.config.template.js | 8 ++
pages.json | 18 +++
pages/tabbar/links/links.vue | 2 +-
pagesA/article-detail/article-detail.vue | 90 ++++++++++---
pagesA/category-detail/category-detail.vue | 2 +-
pagesA/tag-detail/tag-detail.vue | 144 +++++++++++++++++++++
pagesA/tags/tags.vue | 14 ++
12 files changed, 319 insertions(+), 33 deletions(-)
create mode 100644 api/tag.js
create mode 100644 pagesA/tag-detail/tag-detail.vue
create mode 100644 pagesA/tags/tags.vue
diff --git a/api/index.js b/api/index.js
index c0d3939..d2ce3b1 100644
--- a/api/index.js
+++ b/api/index.js
@@ -16,6 +16,7 @@ import archive from './archive.js'
import article from './article.js'
import blogger from './blogger.js'
import category from './category.js'
+import tag from './tag.js'
import comment from './comment.js'
import journal from './journal.js'
import link from './link.js'
@@ -44,6 +45,7 @@ const ApiManager = {
...article,
...blogger,
...category,
+ ...tag,
...comment,
...journal,
...link,
diff --git a/api/tag.js b/api/tag.js
new file mode 100644
index 0000000..9576c40
--- /dev/null
+++ b/api/tag.js
@@ -0,0 +1,24 @@
+/**
+ * 标签接口
+ * @see https://api.halo.run/content-api.html#tag/tag-controller
+ */
+
+import HttpHandler from '@/common/http/request.js'
+export default {
+ /**
+ * 查询标签列表
+ * @param {Object} params 查询参数
+ */
+ getTagList: (params) => {
+ return HttpHandler.Get('/api/content/tags', params)
+ },
+
+ /**
+ * 查询标签下的文章
+ * @param {String} slug 别名
+ * @param {Object} params 查询参数
+ */
+ getTagPostsList: (slug, params) => {
+ return HttpHandler.Get(`/api/content/tags/${slug}/posts`, params)
+ },
+}
diff --git a/common/markdown/markdown.config.js b/common/markdown/markdown.config.js
index 00a7258..d0e07fc 100644
--- a/common/markdown/markdown.config.js
+++ b/common/markdown/markdown.config.js
@@ -44,47 +44,47 @@ export default {
color: var(--main);
line-height: 24px;
position: relative;
- font-size:1.25em;
+ font-size:1.2em;
`,
h2: `
color: var(--main);
line-height: 24px;
position: relative;
margin: 22px 0 16px;
- font-size: 1.2em;
+ font-size: 1.16em;
`,
h3: `
color: var(--main);
line-height: 24px;
position: relative;
margin: 26px 0 18px;
- font-size: 1.3em;
+ font-size: 1.14em;
`,
h4: `
color: var(--main);
line-height: 24px;
margin-bottom: 18px;
position: relative;
- font-size: 1.18em;
+ font-size: 1.2em;
`,
h5: `
color: var(--main);
line-height: 24px;
margin-bottom: 14px;
position: relative;
- font-size: 1em;
+ font-size: 16px;
`,
h6: `
color: #303133;
line-height: 24px;
margin-bottom: 14px;
position: relative;
- font-size: 1em;
+ font-size: 14px;
`,
p: `
line-height: 1.65;
margin-bottom: 14px;
- font-size: 15px;
+ font-size: 14px;
`,
'code': ` `,
strong: 'font-weight: 700;color: rgb(248, 57, 41);',
diff --git a/components/comment-item/comment-item.vue b/components/comment-item/comment-item.vue
index 762adc7..77335ba 100644
--- a/components/comment-item/comment-item.vue
+++ b/components/comment-item/comment-item.vue
@@ -33,7 +33,7 @@
- 回复
+ 回复
复制
@@ -59,6 +59,10 @@ export default {
type: Array,
default: () => []
},
+ disallowComment: {
+ type: Boolean,
+ default: false
+ },
useActions: {
type: Boolean,
default: true
diff --git a/components/comment-list/comment-list.vue b/components/comment-list/comment-list.vue
index 55093fe..744fe06 100644
--- a/components/comment-list/comment-list.vue
+++ b/components/comment-list/comment-list.vue
@@ -12,7 +12,6 @@
-
+
-
- 抢沙发
+
+ - 文章已开启禁止评论 -
+
+
+ 抢沙发
@@ -40,6 +52,7 @@
:isChild="false"
:comment="comment"
:postId="postId"
+ :disallowComment="disallowComment"
@on-copy="fnCopyContent"
@on-comment="fnToComment"
@on-todo="fnToDo"
@@ -54,6 +67,7 @@
:isChild="true"
:comment="childComment"
:postId="postId"
+ :disallowComment="disallowComment"
@on-copy="fnCopyContent"
@on-comment="fnToComment"
@on-todo="fnToDo"
@@ -74,9 +88,11 @@
+
+
diff --git a/pagesA/tags/tags.vue b/pagesA/tags/tags.vue
new file mode 100644
index 0000000..cf2572a
--- /dev/null
+++ b/pagesA/tags/tags.vue
@@ -0,0 +1,14 @@
+
+ 文章标签页面
+
+
+
+
+