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 }