From 9702477c23afa73afb7bfcf3cb33dededf02ce0e Mon Sep 17 00:00:00 2001 From: luyuan <1162963624@qq.com> Date: Thu, 12 Nov 2020 16:16:56 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E5=88=A0=E9=99=A4=E5=AE=8C=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/ReviewItem.vue | 1 + src/components/VideoReview.vue | 22 ++++++++++++++-------- 2 files changed, 15 insertions(+), 8 deletions(-) diff --git a/src/components/ReviewItem.vue b/src/components/ReviewItem.vue index 7e3f8f6..deb0de7 100644 --- a/src/components/ReviewItem.vue +++ b/src/components/ReviewItem.vue @@ -249,6 +249,7 @@ export default defineComponent({ if(res.code != 0){ message.error(res.msg) } + context.emit("reload") reload() } diff --git a/src/components/VideoReview.vue b/src/components/VideoReview.vue index 8e9365c..ca811dc 100644 --- a/src/components/VideoReview.vue +++ b/src/components/VideoReview.vue @@ -18,6 +18,7 @@ :replyid="i.commentid" @replying="reply" @findall="findreply" + @reload="getlist" :ref="el => {list[j] = el}" > @@ -126,16 +127,20 @@ export default defineComponent({ const videoid=ref(useRoute().query.id) const url = useRoute().path const list = ref([]) - onMounted(async () => { - let type = 1; - if(url == '/regime/livedetail'){ - type = 1; - }else{ - type = 2; - } + let type = 1; + if(url == '/regime/livedetail'){ + type = 1; + }else{ + type = 2; + } + async function getlist(){ reviewlist.value=await getcommentlist({type: type,id: videoid.value}) + } + onMounted(async () => { + getlist() }) + console.log(useRoute().query) console.log(store.state.userinfo.memberid,"userifno") interface SendData{ @@ -194,7 +199,8 @@ export default defineComponent({ reviewlist, refresh, lan, - list + list, + getlist } -- 2.39.5 From d51732f348b0cc2acfa10d20b45f40c3ab078b6c Mon Sep 17 00:00:00 2001 From: luyuan <1162963624@qq.com> Date: Thu, 12 Nov 2020 16:17:10 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E5=8F=96=E6=B6=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/ReviewItem.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/ReviewItem.vue b/src/components/ReviewItem.vue index deb0de7..fd3e17c 100644 --- a/src/components/ReviewItem.vue +++ b/src/components/ReviewItem.vue @@ -250,7 +250,7 @@ export default defineComponent({ message.error(res.msg) } context.emit("reload") - reload() + // reload() } -- 2.39.5