diff --git a/src/api/comment.js b/src/api/comment.js
index 568c3017..4d91a0e2 100644
--- a/src/api/comment.js
+++ b/src/api/comment.js
@@ -11,6 +11,16 @@ commentApi.listLatest = () => {
})
}
+commentApi.listLatestByStatus = (top) => {
+ return service({
+ url: `${baseUrl}/latest/AUDITING`,
+ params: {
+ top: top
+ },
+ method: 'get'
+ })
+}
+
commentApi.query = params => {
return service({
url: baseUrl,
@@ -59,4 +69,4 @@ commentApi.commentStatus = {
}
}
-export default commentApi
+export default commentApi
\ No newline at end of file
diff --git a/src/components/Tools/HeaderComment.vue b/src/components/Tools/HeaderComment.vue
index ab69ddd0..b513bf27 100644
--- a/src/components/Tools/HeaderComment.vue
+++ b/src/components/Tools/HeaderComment.vue
@@ -21,7 +21,7 @@
size="large"
/>
- {{ item.author }}:{{ item.content }}
+ {{ item.author }}:
{{ item.createTime | timeAgo }}
@@ -32,7 +32,10 @@
@@ -50,6 +53,9 @@ export default {
comments: []
}
},
+ created() {
+ this.getComment()
+ },
methods: {
fetchComment() {
if (!this.visible) {
@@ -61,7 +67,7 @@ export default {
this.visible = !this.visible
},
getComment() {
- commentApi.listLatest().then(response => {
+ commentApi.listLatestByStatus(5).then(response => {
this.comments = response.data.data
this.loadding = false
})
diff --git a/src/views/comment/CommentList.vue b/src/views/comment/CommentList.vue
index 0e48a25f..f65b17c1 100644
--- a/src/views/comment/CommentList.vue
+++ b/src/views/comment/CommentList.vue
@@ -53,7 +53,13 @@
- 回收站
+ 通过
+
+
+ 移到回收站
+
+
+ 永久删除
@@ -65,6 +71,10 @@