diff --git a/project/qujing/app/AppCurriculumManage/components/Comment.vue b/project/qujing/app/AppCurriculumManage/components/Comment.vue index b485cf82..4cd7fc73 100644 --- a/project/qujing/app/AppCurriculumManage/components/Comment.vue +++ b/project/qujing/app/AppCurriculumManage/components/Comment.vue @@ -18,10 +18,10 @@ :current.sync="search.current" :size.sync="search.size" @getList="getList"> - + @@ -36,7 +36,8 @@ props: { instance: Function, - dict: Object + dict: Object, + params: Object }, data () { @@ -49,23 +50,21 @@ }, total: 10, colConfigs: [ - { prop: 'title', label: '微信昵称', align: 'left' }, - { prop: 'createUserName', label: '评论', align: 'center' }, - { prop: 'beginTime', label: '状态', align: 'center' }, - { prop: 'endTime', label: '已学习人数', align: 'center' }, - { prop: 'createTime', label: '评论数', align: 'center' } + { prop: 'name', label: '微信昵称', align: 'left' }, + { prop: 'content', label: '评论', align: 'center' }, + { prop: 'commentTime', label: '评论时间', align: 'center' } ], tableData: [] } }, - created() { + created () { this.getList() }, methods: { getList() { - this.instance.post(`/app/appmarketingactivityinfo/list`, null, { + this.instance.post(`/app/appcoursecomment/list?courseId=${this.params.id}`, null, { params: { ...this.search } @@ -83,11 +82,11 @@ }) }, - remove (id) { - this.$confirm('确定删除该活动?').then(() => { - this.instance.post(`/app/appmarketingactivityinfo/delete?id=${id}`).then(res => { + show (id, isShow) { + this.$confirm(isShow === '1' ? '确定隐藏该留言?' : '确定隐藏该留言').then(() => { + this.instance.post(`/app/appcoursecomment/configCommentById?id=${id}&status=${isShow === '1' ? '0' : '1'}`).then(res => { if (res.code == 0) { - this.$message.success('删除成功!') + this.$message.success('操作成功') this.getList() } }) diff --git a/project/qujing/app/AppCurriculumManage/components/Detail.vue b/project/qujing/app/AppCurriculumManage/components/Detail.vue index a33fe453..d0a68ac3 100644 --- a/project/qujing/app/AppCurriculumManage/components/Detail.vue +++ b/project/qujing/app/AppCurriculumManage/components/Detail.vue @@ -13,7 +13,9 @@ - + + {{ info.msgCount }} + @@ -59,14 +61,12 @@ data () { return { - info: {}, - id: '' + info: {} } }, created () { if (this.params && this.params.id) { - this.id = this.params.id this.getInfo(this.params.id) } }, @@ -80,6 +80,15 @@ }) }, + toComment () { + this.$emit('change', { + type: 'Comment', + params: { + id: this.params.id + } + }) + }, + cancel (isRefresh) { this.$emit('change', { type: 'List', diff --git a/project/qujing/app/AppCurriculumManage/components/List.vue b/project/qujing/app/AppCurriculumManage/components/List.vue index 35b28aa8..2584f044 100644 --- a/project/qujing/app/AppCurriculumManage/components/List.vue +++ b/project/qujing/app/AppCurriculumManage/components/List.vue @@ -36,6 +36,13 @@ :current.sync="search.current" :size.sync="search.size" @getList="getList"> + + +