Commit 05b086c4 authored by 陈家荣's avatar 陈家荣

4

parent 249884f4
......@@ -79,7 +79,6 @@ router.post('/user/identifyUser',function(req,res,next){
var entity=req.body;
req.session.mobileForumUser=null;
if(!req.session.mobileForumUser){
console.log('entity.uid:'+entity.uid);
forumUserService.getUserByUid(entity.uid,function(err,doc){
if(err){
console.log(err);
......@@ -141,12 +140,12 @@ router.get('/user/from/share', function(req, res, next) {
//检查用户权限
router.post('/user/checkLimitAction', function(req, res, next) {
console.log(req.session);
var mid = req.session.mobileForumUser.userId;
var entity=req.body;
var mid = entity.mid;
if(mid){
var array = [];
forumLimitActionRefService.getLimitActionRefByMid(mid,function(err,forumLimitActionRef){
console.log(forumLimitActionRef);
if (err) {
console.error(err);
res.json('success');
......@@ -164,18 +163,26 @@ router.post('/user/checkLimitAction', function(req, res, next) {
}
array.push(obj);
}
req.session.mobileForumUser.limit_actions = array;
console.log('------------');
console.log(req.session.mobileForumUser);
console.log('------------');
res.json('success');
var returnObject = {
errcode:'success',
data:array
}
res.json(returnObject);
}else{
req.session.mobileForumUser.limit_actions = null;
res.json('success');
var returnObject = {
errcode:'success',
data:[]
}
res.json(returnObject);
}
}
});
}else{
res.json('success');
var returnObject = {
errcode:'success',
data:[]
}
res.json(returnObject);
}
});
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