inleft
2022-08-11 859ec7a60a9a1f30c898dbf1ae05c50dccfc40e5
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
<template>
    <div>
         <div class="boxMain">
             <videoPlayBox></videoPlayBox>
         </div>
         <div class="articleComment">
             <comment ref="myComment" :articleId="articleId" :isAllowedComment="isAllowedComment" :foldReply="true"/>
         </div>
    </div>
 
</template>
 
<script>
    import {
        history
    } from '../../api/blogArticleComment.js'
    import videoPlayBox from "../mini/box15-videoPlayBox.vue"
    import comment from "../mini/box12-comment.vue"
 
    export default {
        components: {
            videoPlayBox,
            comment,
        },
        watch: {
            // '$route'(to, from) {
            //     if ("mdDetail" === to.name) {
            //         this.articleId = this.$route.query.id;
            //         this.articleFileType = this.$route.query.articleFileType;
            //     }
            // },
            articleId: function(newValue, oldValue) {
                if (newValue == undefined || newValue == null || newValue == "") {
                    this.showMsg = true;
                    this.errorMsg = "日志id参数缺失";
                } else {
                    this.$nextTick(function() {
                        this.$refs.myComment.updateCommentList(this.articleId);
                    })
                }
            },
        },
        data() {
            return {
                articleId: "",
                isAllowedComment: false
            }
        },
        methods: {
            showVideo(param) {
                this.articleId = param.id
            },
        },
    }
</script>
<style scoped>
    a {
        color: black;
    }
 
    .boxMain {
        display: flex;
        justify-content: center;
        padding: 20px;
    }
</style>