Commit efbcc8e7 authored by 陈家荣's avatar 陈家荣

444

parent 08c764f6
...@@ -47,8 +47,9 @@ router.post('/limitActionRef/createOrUpdate', function(req, res, next) { ...@@ -47,8 +47,9 @@ router.post('/limitActionRef/createOrUpdate', function(req, res, next) {
console.error(err); console.error(err);
res.json(returnCode.BUSY); res.json(returnCode.BUSY);
} }
for (var i in selects) { if(selects && results){
for (var j in results) { for (var i = 0; i < selects.length; i+=1) {
for(var j = 0; j < results.length; j+=1){
if (selects[i] === results[j]._id.toString()) { if (selects[i] === results[j]._id.toString()) {
var begin_time = moment(new Date()).format('YYYY-MM-DD'); var begin_time = moment(new Date()).format('YYYY-MM-DD');
var end_time = moment(new Date()).add(results[j].limit_time, 'days').format('YYYY-MM-DD'); var end_time = moment(new Date()).add(results[j].limit_time, 'days').format('YYYY-MM-DD');
...@@ -63,7 +64,7 @@ router.post('/limitActionRef/createOrUpdate', function(req, res, next) { ...@@ -63,7 +64,7 @@ router.post('/limitActionRef/createOrUpdate', function(req, res, next) {
} }
} }
} }
}
var forumLimitActionRef = { var forumLimitActionRef = {
ent_code: ent_code, ent_code: ent_code,
mid: mid, mid: mid,
......
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