mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-10 11:26:43 +08:00
同步一下
This commit is contained in:
@@ -27,7 +27,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<!-- 回复框 -->
|
||||
<div class="replys-input" style="padding-left: 60px;margin:10px 0" v-if="item.isReplys">
|
||||
<div class="replys-input" style="padding-left: 60px;margin:10px 0" v-if="item.isReplys">
|
||||
<el-input type="textarea" :rows="2" placeholder="请输入内容" v-model="replysContent" maxlength="200" show-word-limit></el-input>
|
||||
<el-button class="lea-btn" type="primary" @click="addReplys()">回复</el-button>
|
||||
</div>
|
||||
@@ -45,7 +45,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
<div style="text-align: center; margin-top:57px;" v-show="count > 0">
|
||||
@@ -110,6 +110,14 @@
|
||||
this.$router.go(-1);
|
||||
},
|
||||
delReplySon(item,index) { //子级的删除手动删掉,调用保存接口
|
||||
//修改后,替换为下面的情况
|
||||
// apiGuestbook.del(item.id).then(res=>{
|
||||
// if(res.status==200){
|
||||
// item.replysList.splice(index,1);
|
||||
// }else{
|
||||
// this.$message.error('删除失败'+res.message);
|
||||
// }
|
||||
// });
|
||||
item.replysList.splice(index,1);
|
||||
let replysData = {
|
||||
id:item.id,
|
||||
@@ -134,7 +142,7 @@
|
||||
}
|
||||
})
|
||||
}).catch(() => {
|
||||
this.$message({type: 'info', message: '已取消删除'});
|
||||
this.$message({type: 'info', message: '已取消删除'});
|
||||
});
|
||||
},
|
||||
isReplys(item,idx) {
|
||||
@@ -168,12 +176,15 @@
|
||||
if(res.status == 200) {
|
||||
this.count = res.result.count;
|
||||
res.result.list.forEach(item=>{
|
||||
item.replysList = [];
|
||||
if(!item.replysList){
|
||||
item.replysList = [];
|
||||
}
|
||||
item.isReplys = false;
|
||||
item.authorInfo = { aid: "",name: "",orgInfo: "",avatar: "",sex: null,sign:'' }
|
||||
if(item.replys != '') {
|
||||
if(item.replys != '' && item.replys.length>10) {
|
||||
item.replysList = JSON.parse(item.replys);
|
||||
}
|
||||
}
|
||||
//if()
|
||||
})
|
||||
this.leavingList = res.result.list;
|
||||
this.getUserData(res.result.list);
|
||||
@@ -252,7 +263,7 @@
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.backbut{
|
||||
position: absolute;
|
||||
@@ -332,4 +343,3 @@
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user