Commit 704935cc authored by 陈志良's avatar 陈志良

论坛 - 分享

parent b2911383
......@@ -41,7 +41,8 @@ router.post('/info/create', function(req, res, next) {
router.get('/info/:fid/get', function(req, res, next) {
var fid = req.params.fid || null;
if (fid) {
httpService.createLog(req,fid,2);
var source = req.session.mobileForumUser.source;
httpService.createLog(req,source,fid,2);
async.waterfall([
function(callback) {
//更新浏览数
......
......@@ -175,15 +175,16 @@ router.get('/thread/:tid/get', function(req, res, next) {
forumThreadService.getThreadById(tid, function(err, thread) {
//文章类型 1、文章 2、话题 3、照片墙
var info_id = thread.info._id,
pid = thread.pid;
pid = thread.pid,
source = req.session.mobileForumUser.source;
if (thread.type == 1 && thread.level == 1) {
httpService.createLog(req, info_id, 3, 1, tid);
httpService.createLog(req,source,info_id, 3, 1, tid);
} else if (thread.type == 1 && thread.level == 2) {
httpService.createLog(req, info_id, 3, 4, tid, pid);
httpService.createLog(req,source,info_id, 3, 4, tid, pid);
} else if (thread.type == 2 && thread.level == 1) {
httpService.createLog(req, info_id, 3, 2, tid);
httpService.createLog(req,source,info_id, 3, 2, tid);
} else if (thread.type == 3 && thread.level == 1) {
httpService.createLog(req, info_id, 3, 3, tid);
httpService.createLog(req,source,info_id, 3, 3, tid);
}
......
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