From 3de32945f200156539e65a32a7eff01db5c4f0dd Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=A9=99=E5=AD=90?= <454313500@qq.com>
Date: Sat, 11 Mar 2023 17:00:36 +0800
Subject: [PATCH] =?UTF-8?q?feat:=20=E6=B7=BB=E5=8A=A0=E6=96=87=E7=AB=A0?=
=?UTF-8?q?=E9=A1=B5=E9=9D=A2?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
Yi.BBS.Vue3/package-lock.json | 42 ++++++++++++-
Yi.BBS.Vue3/package.json | 5 +-
Yi.BBS.Vue3/src/App.vue | 7 +++
Yi.BBS.Vue3/src/apis/discussApi.js | 7 +--
.../src/components/ArticleContentInfo.vue | 43 ++++++++++++++
Yi.BBS.Vue3/src/components/AvatarInfo.vue | 1 +
Yi.BBS.Vue3/src/components/DisscussCard.vue | 8 +--
Yi.BBS.Vue3/src/main.js | 4 +-
Yi.BBS.Vue3/src/router/index.js | 2 +-
Yi.BBS.Vue3/src/views/Article.vue | 48 +++++++++++----
Yi.BBS.Vue3/src/views/Discuss.vue | 59 +++++++++++++++----
Yi.BBS.Vue3/src/views/Index.vue | 2 +-
.../ApplicationSwaggerDoc.xml | 5 +-
.../Dtos/Discuss/DiscussGetListInputVo.cs | 3 +
.../ApplicationSwaggerDoc.xml | 5 +-
.../Forum/DiscussService.cs | 12 ++--
16 files changed, 206 insertions(+), 47 deletions(-)
create mode 100644 Yi.BBS.Vue3/src/components/ArticleContentInfo.vue
diff --git a/Yi.BBS.Vue3/package-lock.json b/Yi.BBS.Vue3/package-lock.json
index d879449b..1353b0d7 100644
--- a/Yi.BBS.Vue3/package-lock.json
+++ b/Yi.BBS.Vue3/package-lock.json
@@ -11,10 +11,13 @@
"@element-plus/icons-vue": "^2.1.0",
"axios": "^1.3.4",
"element-plus": "^2.2.32",
+ "highlight": "^0.2.4",
+ "marked": "^4.2.12",
"mavon-editor": "^3.0.0",
"pinia": "^2.0.32",
"vue": "^3.2.47",
- "vue-router": "^4.1.6"
+ "vue-router": "^4.1.6",
+ "yarm": "^0.4.0"
},
"devDependencies": {
"@vitejs/plugin-vue": "^4.0.0",
@@ -2289,6 +2292,12 @@
"integrity": "sha512-WdZTbAByD+pHfl/g9QSsBIIwy8IT+EsPiKDs0KNX+zSHhdDLFKdZu0BQHljvO+0QI/BasbMSUa8wYNCZTvhslg==",
"dev": true
},
+ "node_modules/highlight": {
+ "version": "0.2.4",
+ "resolved": "https://registry.npmmirror.com/highlight/-/highlight-0.2.4.tgz",
+ "integrity": "sha512-TEcWU6BolpDYIaVD91KmaYe/kRZwOmQlLWZGO8DK+Cs555+7mawk2KUnF/dBwcLnrvlCDk/xC+BXfz7Zva+Jfg==",
+ "deprecated": "Not maintained anymore"
+ },
"node_modules/highlight.js": {
"version": "9.18.5",
"resolved": "https://registry.npmmirror.com/highlight.js/-/highlight.js-9.18.5.tgz",
@@ -2581,6 +2590,17 @@
"sourcemap-codec": "^1.4.8"
}
},
+ "node_modules/marked": {
+ "version": "4.2.12",
+ "resolved": "https://registry.npmmirror.com/marked/-/marked-4.2.12.tgz",
+ "integrity": "sha512-yr8hSKa3Fv4D3jdZmtMMPghgVt6TWbk86WQaWhDloQjRSQhMMYCAro7jP7VDJrjjdV8pxVxMssXS8B8Y5DZ5aw==",
+ "bin": {
+ "marked": "bin/marked.js"
+ },
+ "engines": {
+ "node": ">= 12"
+ }
+ },
"node_modules/mavon-editor": {
"version": "3.0.0",
"resolved": "https://registry.npmmirror.com/mavon-editor/-/mavon-editor-3.0.0.tgz",
@@ -3775,6 +3795,11 @@
"resolved": "https://registry.npmmirror.com/yallist/-/yallist-4.0.0.tgz",
"integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==",
"dev": true
+ },
+ "node_modules/yarm": {
+ "version": "0.4.0",
+ "resolved": "https://registry.npmmirror.com/yarm/-/yarm-0.4.0.tgz",
+ "integrity": "sha512-yCoX5QCA5Upb+VP7/UBuNGBz7MO5oWyc6degv5AifeGnakpaHeNwE/SNOPMefFKpQBionZyUeRdBo63Dl+awDQ=="
}
},
"dependencies": {
@@ -5517,6 +5542,11 @@
"integrity": "sha512-WdZTbAByD+pHfl/g9QSsBIIwy8IT+EsPiKDs0KNX+zSHhdDLFKdZu0BQHljvO+0QI/BasbMSUa8wYNCZTvhslg==",
"dev": true
},
+ "highlight": {
+ "version": "0.2.4",
+ "resolved": "https://registry.npmmirror.com/highlight/-/highlight-0.2.4.tgz",
+ "integrity": "sha512-TEcWU6BolpDYIaVD91KmaYe/kRZwOmQlLWZGO8DK+Cs555+7mawk2KUnF/dBwcLnrvlCDk/xC+BXfz7Zva+Jfg=="
+ },
"highlight.js": {
"version": "9.18.5",
"resolved": "https://registry.npmmirror.com/highlight.js/-/highlight.js-9.18.5.tgz",
@@ -5751,6 +5781,11 @@
"sourcemap-codec": "^1.4.8"
}
},
+ "marked": {
+ "version": "4.2.12",
+ "resolved": "https://registry.npmmirror.com/marked/-/marked-4.2.12.tgz",
+ "integrity": "sha512-yr8hSKa3Fv4D3jdZmtMMPghgVt6TWbk86WQaWhDloQjRSQhMMYCAro7jP7VDJrjjdV8pxVxMssXS8B8Y5DZ5aw=="
+ },
"mavon-editor": {
"version": "3.0.0",
"resolved": "https://registry.npmmirror.com/mavon-editor/-/mavon-editor-3.0.0.tgz",
@@ -6673,6 +6708,11 @@
"resolved": "https://registry.npmmirror.com/yallist/-/yallist-4.0.0.tgz",
"integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==",
"dev": true
+ },
+ "yarm": {
+ "version": "0.4.0",
+ "resolved": "https://registry.npmmirror.com/yarm/-/yarm-0.4.0.tgz",
+ "integrity": "sha512-yCoX5QCA5Upb+VP7/UBuNGBz7MO5oWyc6degv5AifeGnakpaHeNwE/SNOPMefFKpQBionZyUeRdBo63Dl+awDQ=="
}
}
}
diff --git a/Yi.BBS.Vue3/package.json b/Yi.BBS.Vue3/package.json
index 13cacc87..ea49b3b7 100644
--- a/Yi.BBS.Vue3/package.json
+++ b/Yi.BBS.Vue3/package.json
@@ -11,10 +11,13 @@
"@element-plus/icons-vue": "^2.1.0",
"axios": "^1.3.4",
"element-plus": "^2.2.32",
+ "highlight": "^0.2.4",
+ "marked": "^4.2.12",
"mavon-editor": "^3.0.0",
"pinia": "^2.0.32",
"vue": "^3.2.47",
- "vue-router": "^4.1.6"
+ "vue-router": "^4.1.6",
+ "yarm": "^0.4.0"
},
"devDependencies": {
"@vitejs/plugin-vue": "^4.0.0",
diff --git a/Yi.BBS.Vue3/src/App.vue b/Yi.BBS.Vue3/src/App.vue
index a3a2c4f2..cf631c70 100644
--- a/Yi.BBS.Vue3/src/App.vue
+++ b/Yi.BBS.Vue3/src/App.vue
@@ -2,9 +2,16 @@
+
+
+
diff --git a/Yi.BBS.Vue3/src/apis/discussApi.js b/Yi.BBS.Vue3/src/apis/discussApi.js
index 2972574b..9eed9949 100644
--- a/Yi.BBS.Vue3/src/apis/discussApi.js
+++ b/Yi.BBS.Vue3/src/apis/discussApi.js
@@ -6,10 +6,9 @@ export function getList(data){
params:data
})
};
-
-export function getListByPlateId(plateId){
+export function get(id){
return myaxios({
- url: `/discuss/plate-id/${plateId}`,
+ url: `/discuss/${id}`,
method: 'get'
})
-};
\ No newline at end of file
+};
diff --git a/Yi.BBS.Vue3/src/components/ArticleContentInfo.vue b/Yi.BBS.Vue3/src/components/ArticleContentInfo.vue
new file mode 100644
index 00000000..33a8c8f1
--- /dev/null
+++ b/Yi.BBS.Vue3/src/components/ArticleContentInfo.vue
@@ -0,0 +1,43 @@
+
+
+
+
+
diff --git a/Yi.BBS.Vue3/src/components/AvatarInfo.vue b/Yi.BBS.Vue3/src/components/AvatarInfo.vue
index ab7c3ec3..9bb90148 100644
--- a/Yi.BBS.Vue3/src/components/AvatarInfo.vue
+++ b/Yi.BBS.Vue3/src/components/AvatarInfo.vue
@@ -20,6 +20,7 @@