diff --git a/src/assets/css/home-style.css b/src/assets/css/home-style.css
index 61ac930..8e5a30c 100644
--- a/src/assets/css/home-style.css
+++ b/src/assets/css/home-style.css
@@ -944,7 +944,7 @@ body.light-mode .video-bg:before {
/*main-container结构下的标头矩形图案样式*/
.HeadSquare{
width:4px;
- height:25px;
+ height:30px;
margin-left:5px;
margin-top:3px;
background-color: #59a2a3;
diff --git a/src/components/detail/NavDetail.vue b/src/components/detail/NavDetail.vue
index 72abf43..1b97a42 100644
--- a/src/components/detail/NavDetail.vue
+++ b/src/components/detail/NavDetail.vue
@@ -8,7 +8,7 @@
-
+
@@ -177,9 +181,16 @@ export default {
// y轴阅读量:
YView: [],
imageCode: null,
+ // 所有评论:
+ allcomment:[],
+ // 根评论:
+ rootcomment:[],
+ // 根评论id :根评论下所有评论对象
+ rootId_AllComment:{1:[],2:[]},
}
},
mounted() {
+ this.GetAllComment();
if(this.UrlId && this.UrlObj.icon){
this.getQR(this.UrlId, this.UrlObj.icon);
}
@@ -196,6 +207,32 @@ export default {
},
computed: {},
methods: {
+ // 递归获取指定根目录下的所有评论:
+ func0(commentId){
+ var that = this;
+ that.allcomment.forEach(function(value){
+ if(value.root_comment_id == commentId){
+ that.rootId_AllComment[commentId].push(value);
+ this.func0(value.id);
+ }
+ })}
+ ,
+ // 所有评论
+ GetAllComment(){
+ let _this = this;
+ axios.get('/api/comment/view_comment', {
+ params: {
+ }
+ }).then(function (res) {
+ _this.allcomment = res.data;
+ }).catch((error) => {
+ Vue.prototype.$notify.error({
+ title: '错误',
+ message: error,
+ offset: 0
+ });
+ })
+ },
// 日访问:
ViewByTime(id) {
let _this = this;
@@ -366,10 +403,10 @@ export default {
},
// 向管理员反馈
WarnToAdmin() {
- // console.log(this.xTime);
+ this.GetAllComment();
+ console.log(this.allcomment);
}
}
-
}
\ No newline at end of file