This commit is contained in:
zhaofang
2022-09-23 19:56:16 +08:00
parent c4bd52783d
commit ba5ed90fc6
4 changed files with 71 additions and 13 deletions

View File

@@ -85,7 +85,7 @@
</div>
<div class="comment-time portal-time">
<showTime :time="com.sysCreateTime"></showTime>
<interactBar :type="10" :shares="false" :data="com" @addAnswers="showReply(com)" :favorites="false" :views="false" :comments="false" :answers="true"></interactBar>
<interactBar :type="praisesType" :shares="false" :data="com" @addAnswers="showReply(com)" :favorites="false" :views="false" :comments="false" :answers="true"></interactBar>
</div>
<!-- <div class="comment-btns"> -->
@@ -131,7 +131,7 @@
</div>
<div class="comment-time portal-time">
<showTime :time="reply.sysCreateTime"></showTime>
<interactBar :type="10" :shares="false" :data="reply" @addAnswers="showReply(reply)" :favorites="false" :views="false" :comments="false" :answers="true"></interactBar>
<interactBar :type="praisesType" :shares="false" :data="reply" @addAnswers="showReply(reply)" :favorites="false" :views="false" :comments="false" :answers="true"></interactBar>
</div>
<!-- <div class="comment-btns"> -->
<!-- <a><svg-icon icon-class="like"></svg-icon><span>66</span></a> -->
@@ -277,6 +277,7 @@
},
data() {
return {
praisesType:0,//用于设定评论里点赞的type 课程评论点赞为10文章的为20案例的为30
radio:1,
value:false,
sex:null,
@@ -358,6 +359,15 @@
mounted() {
this.author = this.authorId;
this.loadData(false);
if(this.objType == 1) {
this.praisesType = 10;
}
if(this.objType == 2) {
this.praisesType = 20;
}
if(this.objType == 3) {
this.praisesType = 30;
}
//在中文输入法状态下输入光标不在文字最后,同时会被遮挡两个文字大小的长度
// let vm=document.querySelector('.hideControl input')
// vm.addEventListener('compositionstart',(e)=>{
@@ -549,7 +559,6 @@
item.isAll=!item.isAll;
},
showReply(item){
console.log("9999999999");
this.replyInfo.objType=this.objType;
this.replyInfo.objId=this.objId;
this.replyInfo.parentId=item.id;