Commit 2f893cc2 authored by 陈志良's avatar 陈志良

1

parent fd5b23c2
...@@ -48,13 +48,13 @@ var sendThreadLogRequest = function(open_id, user_agent, origin_ip, method, nick ...@@ -48,13 +48,13 @@ var sendThreadLogRequest = function(open_id, user_agent, origin_ip, method, nick
"nick_name":nick_name, //昵称,默认为会员名,如果没有则返回当前渠道的nick_name(如微信昵称) "nick_name":nick_name, //昵称,默认为会员名,如果没有则返回当前渠道的nick_name(如微信昵称)
"ent_code":ent_code, //企业号 "ent_code":ent_code, //企业号
"mid":mid, "mid":mid,
"business_type":business_type, //业务分类,用于标识不同的业务类型(如news,forum等) "business_type":business_id?business_type+'.'+business_id:business_type, //业务分类,用于标识不同的业务类型(如news,forum等)
"business_id":business_id, //业务记录的唯一标识,如news_id等 "business_id":business_id?business_id:null, //业务记录的唯一标识,如news_id等
"request_time":request_time || new Date(), //发起请求的时间 "request_time":request_time || new Date(), //发起请求的时间
"source_channel":source_channel, //分享入口渠道(0:官方直接分享;1:微信朋友圈;2:微信好友;3:QQ好友;4:腾讯微博;5:广告组;6:自媒体;) "source_channel":source_channel, //分享入口渠道(0:官方直接分享;1:微信朋友圈;2:微信好友;3:QQ好友;4:腾讯微博;5:广告组;6:自媒体;)
"source_open_id":source_open_id //分享人的open_id "source_open_id":source_open_id //分享人的open_id
}; };
redis.lpush('adapter-redis-to-ons', JSON.stringify(obj), function(err, reply) { redis.publish('__pi_front_access_log_old__', JSON.stringify(obj), function(err, reply) {
if (err) { if (err) {
console.error(err); console.error(err);
} }
...@@ -93,11 +93,11 @@ exports.createLog = function(req,source,info,type,thread_type,thread,p_thread) { ...@@ -93,11 +93,11 @@ exports.createLog = function(req,source,info,type,thread_type,thread,p_thread) {
}; };
//推送 //推送
sendThreadLogRequest( sendThreadLogRequest(
req.session.mobileForumUser.openId, req.session.openUser.openId,
req.headers['user-agent'], req.headers['user-agent'],
getClientIP(req), getClientIP(req),
null, null,
req.session.user.nick_name, req.session.openUser.nickName,
req.session.user.ent_code, req.session.user.ent_code,
req.session.openUser.mid, req.session.openUser.mid,
'forum.'+info, 'forum.'+info,
......
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