From 56f17183b39f4c536cdd20316a45597f55b2ea20 Mon Sep 17 00:00:00 2001 From: ruibaby Date: Wed, 8 May 2019 23:06:21 +0800 Subject: [PATCH] Fixed some bugs. --- src/views/comment/CommentList.vue | 13 +++++++++++-- src/views/sheet/SheetList.vue | 24 +++++++++++++----------- 2 files changed, 24 insertions(+), 13 deletions(-) diff --git a/src/views/comment/CommentList.vue b/src/views/comment/CommentList.vue index 598f67208..e16e3f332 100644 --- a/src/views/comment/CommentList.vue +++ b/src/views/comment/CommentList.vue @@ -121,7 +121,7 @@ {{ post.title }} import { PageView } from '@/layouts' import commentApi from '@/api/comment' +import optionApi from '@/api/option' import marked from 'marked' const columns = [ @@ -302,7 +303,9 @@ export default { selectComment: {}, replyComment: {}, commentsLoading: false, - commentStatus: commentApi.commentStatus + commentStatus: commentApi.commentStatus, + options: [], + keys: ['blog_url'] } }, computed: { @@ -316,6 +319,7 @@ export default { }, created() { this.loadComments() + this.loadOptions() }, methods: { loadComments(isSearch) { @@ -333,6 +337,11 @@ export default { this.commentsLoading = false }) }, + loadOptions() { + optionApi.listAll(this.keys).then(response => { + this.options = response.data.data + }) + }, handleEditComment(id) { this.$message.success('编辑') }, diff --git a/src/views/sheet/SheetList.vue b/src/views/sheet/SheetList.vue index 859dc0d25..e15dda938 100644 --- a/src/views/sheet/SheetList.vue +++ b/src/views/sheet/SheetList.vue @@ -10,7 +10,7 @@ - @@ -27,14 +27,13 @@ 操作:{{ item.url }} - + --> 编辑 - 查看 + 查看 @@ -144,6 +140,7 @@