mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-10 19:36:43 +08:00
笔记 评论
This commit is contained in:
@@ -1,6 +1,15 @@
|
|||||||
/* 评论的相关处理*/
|
/* 评论的相关处理*/
|
||||||
import ajax from '@/utils/xajax.js'
|
import ajax from '@/utils/xajax.js'
|
||||||
|
|
||||||
|
/*
|
||||||
|
查询评论
|
||||||
|
objType
|
||||||
|
objId
|
||||||
|
*/
|
||||||
|
const listQuery=function(query){
|
||||||
|
return ajax.post('/xboe/m/comment/list',query);
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
查询评论
|
查询评论
|
||||||
get post请求都可以,
|
get post请求都可以,
|
||||||
@@ -101,6 +110,7 @@ export default{
|
|||||||
del,
|
del,
|
||||||
update,
|
update,
|
||||||
add,
|
add,
|
||||||
|
listQuery,
|
||||||
pagelist,
|
pagelist,
|
||||||
pageQuery,
|
pageQuery,
|
||||||
reply,
|
reply,
|
||||||
|
|||||||
@@ -368,20 +368,17 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
let query={
|
let query={
|
||||||
pageIndex:this.pageIndex,
|
objType:6,
|
||||||
pageSize:this.pageSize,
|
objId:item.id
|
||||||
type:6,
|
|
||||||
id:item.id,
|
|
||||||
// author: this.author,
|
|
||||||
}
|
}
|
||||||
//console.log(item,'item'); 去读取回复
|
//console.log(item,'item'); 去读取回复
|
||||||
//2022-11-2日与产品(润博)确认,笔记回复只显示一级,不显示二级: "value",
|
//2022-11-2日与产品(润博)确认,笔记回复只显示一级,不显示二级: "value",
|
||||||
//直接修改后台,查询全部
|
//直接修改后台,查询全部
|
||||||
apiComment.pageQuery(query).then(res=>{
|
apiComment.listQuery(query).then(res2=>{
|
||||||
if(res.status == 200 && res.result.list.length > 0) {
|
if(res2.status == 200 && res2.result.length > 0) {
|
||||||
let ids = [];
|
let ids = [];
|
||||||
let allList=[];
|
//let allList=[];
|
||||||
res.result.list.forEach(it=>{
|
res2.result.forEach(it=>{
|
||||||
ids.push(it.sysCreateAid);
|
ids.push(it.sysCreateAid);
|
||||||
it.answers=it.replys;
|
it.answers=it.replys;
|
||||||
it.replyList = [];
|
it.replyList = [];
|
||||||
@@ -389,15 +386,15 @@
|
|||||||
it.orgInfo='';
|
it.orgInfo='';
|
||||||
it.name='';
|
it.name='';
|
||||||
it.isAll=false;
|
it.isAll=false;
|
||||||
allList.push(it);
|
//allList.push(it);
|
||||||
//二级
|
//二级
|
||||||
|
|
||||||
});
|
});
|
||||||
//let ids = res.result.list.map(item=>item.sysCreateAid);
|
//let ids = res.result.list.map(item=>item.sysCreateAid);
|
||||||
const noReapetIds=[...new Set(ids)]
|
const noReapetIds=[...new Set(ids)]
|
||||||
this.loadAuthorInfo(res.result.list,noReapetIds);
|
this.loadAuthorInfo(res2.result,noReapetIds);
|
||||||
//加载回复内容
|
//加载回复内容
|
||||||
item.replyList.push(...res.result.list);
|
item.replyList.push(...res2.result);
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user