mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-14 13:26:44 +08:00
Merge branch 'stat' of https://codeup.aliyun.com/6265f483e4166464dc2f9c14/boeu/portal into stat
This commit is contained in:
@@ -9,7 +9,10 @@
|
||||
<div class="flex-between" @click="jump(item)">
|
||||
<div class="uc-course-name ">
|
||||
<div class="uc-coures-name-left one-line-ellipsis">
|
||||
<span >{{ item.title }} <span class="bq-coures" v-if="isAll">#课程#</span> </span>
|
||||
<span >{{ item.title }}
|
||||
<span class="bq-coures" v-if="isAll">#课程# </span>
|
||||
<span class="score-info" v-if="toScore(item.score) > 0"> {{toScore(item.score)}}分</span>
|
||||
</span>
|
||||
</div>
|
||||
<div class="canfavo">
|
||||
<el-button v-if="remove" @click.stop="delItem(item)" type="text" icon="el-icon-star-on" style="color:#8590A6;font-size:14px;">
|
||||
@@ -33,6 +36,7 @@
|
||||
<script>
|
||||
// import interactBar from '@/components/Portal/interactBar.vue';
|
||||
import courseImage from '@/components/Course/courseImage.vue';
|
||||
import { toScore} from '@/utils/tools.js';
|
||||
export default {
|
||||
name: 'comStudyItem',
|
||||
props: {
|
||||
@@ -53,6 +57,7 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
isShow: false,
|
||||
toScore,
|
||||
oData: {
|
||||
comments: '100',
|
||||
favorites: '20',
|
||||
|
||||
@@ -75,13 +75,13 @@
|
||||
<el-input show-word-limit class="hideControl" type="textarea" v-model="replyInfo.content" maxlength="100" placeholder="回复内容..."></el-input>
|
||||
</div>
|
||||
<div style="width: 120px;display: flex;justify-content: flex-end;">
|
||||
<el-button @click="submitReply(com)" type="primary">发布回复</el-button>
|
||||
<el-button @click="submitReplyAdd(com)" type="primary">发布回复</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="!com.showAll && com.replyList.length>0" style="padding-left: 45px;padding-bottom: 10px;" @click="loadReplyMore(com)"><span style="color: #9e9e9e;cursor: pointer; border-radius: 5px;border:1px solid #cccccc;padding: 5px 10px;font-size: 14px;">加载更多>></span></div>
|
||||
<div v-if="!com.showAll && com.replyList.length>0" style="padding-left: 45px;padding-bottom: 10px;" @click="loadReplyMore(com)"><span style="color: #9e9e9e;cursor: pointer; border-radius: 5px;border:1px solid #cccccc;padding: 5px 10px;font-size: 14px;">加载更多22>></span></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -503,10 +503,12 @@
|
||||
if(this.replyInfo.content==''){
|
||||
return;
|
||||
}
|
||||
// this.replyInfo.commentId=comment.id;
|
||||
// this.replyInfo.commentId='1037320008252829696';
|
||||
// if(comment.replyList==''){
|
||||
// comment.replyList=[];
|
||||
// }
|
||||
this.replyInfo.parentId='-1';
|
||||
|
||||
apiComment.add(this.replyInfo).then(res=>{
|
||||
this.replyLoading = false;
|
||||
if(res.status==200){
|
||||
@@ -522,6 +524,51 @@
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
// 课程笔记评论的回复
|
||||
submitReplyAdd(comment){
|
||||
if(this.replyLoading) {
|
||||
return
|
||||
}
|
||||
this.replyLoading = true;
|
||||
this.replyInfo.content = this.replyInfo.content.trim();
|
||||
if(this.replyInfo.content==''){
|
||||
return;
|
||||
}
|
||||
this.replyInfo.content=this.replyInfo.content.replace(/^\s*|\s*$/g,"");
|
||||
if(this.replyInfo.content==''){
|
||||
return;
|
||||
}
|
||||
// this.replyInfo.commentId='1037320008252829696';
|
||||
// if(comment.replyList==''){
|
||||
// comment.replyList=[];
|
||||
// }
|
||||
|
||||
|
||||
if(comment.replyList=='' || comment.replyList==null){
|
||||
this.replyInfo.commentId='';
|
||||
}else{
|
||||
this.replyInfo.commentId=comment.replyList[0].id;
|
||||
this.replyInfo.clevel = 2;
|
||||
}
|
||||
|
||||
|
||||
apiComment.reply(this.replyInfo).then(res=>{
|
||||
this.replyLoading = false;
|
||||
if(res.status==200){
|
||||
res.result.sex = null;
|
||||
res.result.isAll=false;
|
||||
this.loadAuthorInfo([res.result],[res.result.sysCreateAid]);
|
||||
comment.replyList.push(res.result);
|
||||
this.replyInfo.parentId='';
|
||||
this.replyInfo.content='';
|
||||
this.$message.success("发布成功");
|
||||
}else{
|
||||
this.$message.error(res.message);
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
delCommnet(com,idx){
|
||||
if(com.replyList!='' && com.replyList.length>0){
|
||||
this.$message.error('有回复的评论不能删除');
|
||||
|
||||
Reference in New Issue
Block a user