diff --git a/src/api/comment.js b/src/api/comment.js
index cd583d625..64b1f9c93 100644
--- a/src/api/comment.js
+++ b/src/api/comment.js
@@ -20,6 +20,36 @@ function latestComment(target, top, status) {
})
}
+commentApi.queryComment = (target, params) => {
+ return service({
+ url: `${baseUrl}/${target}/comments`,
+ params: params,
+ method: 'get'
+ })
+}
+
+commentApi.updateStatus = (target, commentId, status) => {
+ return service({
+ url: `${baseUrl}/${target}/comments/${commentId}/status/${status}`,
+ method: 'put'
+ })
+}
+
+commentApi.delete = (target, commentId) => {
+ return service({
+ url: `${baseUrl}/${target}/comments/${commentId}`,
+ method: 'delete'
+ })
+}
+
+commentApi.create = (target, comment) => {
+ return service({
+ url: `${baseUrl}/${target}/comments`,
+ data: comment,
+ method: 'post'
+ })
+}
+
/**
* Creates a comment.
* @param {String} target
diff --git a/src/components/global.less b/src/components/global.less
index ddf64b074..b0418a8ed 100644
--- a/src/components/global.less
+++ b/src/components/global.less
@@ -527,7 +527,13 @@ body {
.ant-card-wider-padding {
.ant-card-body {
- padding: 24px !important;
+ padding: 16px !important;
+ }
+}
+
+.comment-tab-wrapper{
+ .ant-card-body {
+ padding: 0 !important;
}
}
diff --git a/src/views/comment/CommentList.vue b/src/views/comment/CommentList.vue
index d0ece8ed1..83e670ece 100644
--- a/src/views/comment/CommentList.vue
+++ b/src/views/comment/CommentList.vue
@@ -1,446 +1,35 @@
-
-
-
-
-
-
-
-
-
-
-
-
- {{ commentStatus[status].text }}
-
-
-
-
-
-
- 查询
- 重置
-
-
-
-
-
-
-
-
-
+
+
-
-
-
- {{ statusProperty.text }}
-
- {{ post.title }}
- {{ createTime | timeAgo }}
-
-
-
- 通过
-
-
- 通过
-
-
- 通过并回复
-
-
-
-
- 回复
-
-
- 还原
-
-
-
-
-
- 回收站
-
-
-
- 删除
-
-
-
-
-
-
-
-
-
-
-
-
+
+
- 回复
-
-
-
-
-
-
-
-
+
+
+
+
diff --git a/src/views/comment/CommentTab.vue b/src/views/comment/CommentTab.vue
new file mode 100644
index 000000000..585e0c639
--- /dev/null
+++ b/src/views/comment/CommentTab.vue
@@ -0,0 +1,450 @@
+
+
+
+
+
+ +