Commit 047114f2 authored by strong's avatar strong

Merge commit '943e8539' into SANDBOX

parents f3d4da73 943e8539
...@@ -36,8 +36,6 @@ function create(req, callback) { ...@@ -36,8 +36,6 @@ function create(req, callback) {
entity.pid = null; entity.pid = null;
} }
var address = entity.address || null; var address = entity.address || null;
if (address) { if (address) {
entity.address = JSON.parse(address); entity.address = JSON.parse(address);
...@@ -72,7 +70,8 @@ function create(req, callback) { ...@@ -72,7 +70,8 @@ function create(req, callback) {
type: 3, type: 3,
level: '2', level: '2',
pid: entity.pid, pid: entity.pid,
from: entity.from from: entity.from,
status: {$ne:3}
}, function(err, doc) { }, function(err, doc) {
if (doc) { if (doc) {
var update = { var update = {
...@@ -533,10 +532,9 @@ router.get('/thread/:tid/get', function(req, res, next) { ...@@ -533,10 +532,9 @@ router.get('/thread/:tid/get', function(req, res, next) {
if (tid) { if (tid) {
async.waterfall([ async.waterfall([
function(callback) { function(callback) {
forumThreadService.getThreadById(tid, function(err, thread) { forumThreadService.getThreadById(tid, function(err, thread) {
//文章类型 1、文章 2、话题 3、照片墙 //文章类型 1、文章 2、话题 3、照片墙
if (err) { if (err || !thread) {
callback(err, null); callback(err, null);
} else { } else {
callback(null, thread); callback(null, thread);
...@@ -621,13 +619,14 @@ router.get('/thread/:tid/get', function(req, res, next) { ...@@ -621,13 +619,14 @@ router.get('/thread/:tid/get', function(req, res, next) {
//获取目标论坛文章 //获取目标论坛文章
router.get('/thread/photo/:pid/get', function(req, res, next) { router.get('/thread/photo/:pid/get', function(req, res, next) {
var pid = req.params.pid || null, var pid = req.params.pid || null,
userId = req.session.mobileForumUser.userId;; userId = user.getMobileUser(req);
if (pid) { if (pid) {
forumThreadService.getByConditions({ forumThreadService.getByConditions({
type: 3, type: 3,
level: '2', level: '2',
pid: pid, pid: pid,
from: userId from: userId,
status: {$ne:3}
}, function(err, thread) { }, function(err, thread) {
if (err) { if (err) {
console.error(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