Commit c0bc8fc2 authored by 陈志良's avatar 陈志良

分享带回用户

parent 3d6d5a60
......@@ -213,3 +213,11 @@ router.get('/:ent_code/timeline', function(req, res, next) {
httpService.sendRequest(ent_code,mid,action);
res.status(200).end();
});
//微信分享接口
router.get('/:ent_code/user/from/share', function(req, res, next) {
var mid = req.params.mid,
action = req.params.action,
ent_code = req.session.user.ent_code;
httpService.sendRequest(ent_code,mid,action);
res.status(200).end();
});
......@@ -7,7 +7,10 @@ var ACTION_KEY = {
'share':'FORUM_THREAD_SHARE',
'share_timeline':'FORUM_THREAD_SHARE_TIMELINE',
'comment':'FORUM_THREAD_COMMENT',
'praise':'FORUM_THREAD_PRAISE '
'thread_praise':'FORUM_THREAD_PRAISE',
'comment_praise':'FORUM_COMMENT_PRAISE',
'reply':'FORUM_COMMENT_REPLY',
'user_from_share':'FORUM_USER_FROM_SHARE'
}
exports.sendRequest=function(ent_code,mid,action,messageid,integral,exp){
var obj = {
......@@ -20,7 +23,6 @@ exports.sendRequest=function(ent_code,mid,action,messageid,integral,exp){
integral:integral || 0,
exp:exp || 0
};
console.log(obj);
redis.lpush('adapter-redis-to-ons',JSON.stringify(obj), function(err,reply){
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