Commit 943e8539 authored by 陈家荣's avatar 陈家荣

更新照片墙显示

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