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

调试分享

parent f75b832a
...@@ -307,6 +307,9 @@ router.get('/sharev2.js', function(req, res, next) { ...@@ -307,6 +307,9 @@ router.get('/sharev2.js', function(req, res, next) {
var title = '',desc = '',imgUrl = ''; var title = '',desc = '',imgUrl = '';
var key = ent_code + 'forum_share_index_info'; var key = ent_code + 'forum_share_index_info';
console.log('key: ' + key);
if(type && type === 'index'){ if(type && type === 'index'){
var expire = 60 * 60; var expire = 60 * 60;
redis.get(key, function(error, share){ redis.get(key, function(error, share){
...@@ -447,9 +450,17 @@ router.get('/sharev2.js', function(req, res, next) { ...@@ -447,9 +450,17 @@ router.get('/sharev2.js', function(req, res, next) {
share_log.p_thread = thread.pid; share_log.p_thread = thread.pid;
share_log.info = thread.info._id || thread.info; share_log.info = thread.info._id || thread.info;
share_log.thread_type = thread.pid?4:thread.type; share_log.thread_type = thread.pid?4:thread.type;
console.log(' old session -----------> ');
console.log(req.session);
//替换分享log内容 //替换分享log内容
req.session.shareLog = share_log; req.session.shareLog = share_log;
console.log(' new session -----------> ');
console.log(req.session);
//组装分享路径与判断分享类型 //组装分享路径与判断分享类型
var baseParamsUrl = '&infoId=' + thread.info._id + '&ent_code=' + ent_code + '&tId=' + thread._id +'&uId='+uId; var baseParamsUrl = '&infoId=' + thread.info._id + '&ent_code=' + ent_code + '&tId=' + thread._id +'&uId='+uId;
......
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