Commit e76aa5ae authored by 邓军's avatar 邓军

qq

parent 4b434c33
......@@ -120,13 +120,17 @@ router.get('/thread/:tid/get', function(req, res, next) {
//更新文章状态、如:屏蔽
router.post('/thread/:tid/update', function(req, res, next) {
var tid=req.params.tid;
var fatherTitle = req.body.father;
delete req.body.father;
req.body.ent_code=req.session.user.ent_code;
if(tid){
forumThreadService.updateThreadById(tid,req.body,function(err,thread){
if(err){
res.json(returnCode.BUSY);
}else{
res.json(returnCode.SUCCESS);
console.log(thread);
console.log(fatherTitle);
res.json({message:"success",data:thread,title:fatherTitle});
}
});
}else{
......@@ -196,6 +200,7 @@ router.get('/threads/list', function(req, res, next) {
var pageSize = req.query.pageSize || 10;
var infoId=req.query.infoId;
var tagId=req.query.tagId;
var pid=req.query.pid;
var conditions={
ent_code:req.session.user.ent_code,
level:1
......@@ -206,6 +211,13 @@ router.get('/threads/list', function(req, res, next) {
if(tagId){
conditions.tag={$in:[tagId]};
}
if(pid){
conditions.pid = pid;
conditions.level = 2;
}
console.log(conditions);
forumThreadService.getAllThreadByFid(conditions,pageNo,pageSize,null,function(err,results){
if(err){
console.error(err);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment