Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
pisns-forum-api
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
scrmGroup
pisns-forum-api
Commits
c0bc8fc2
Commit
c0bc8fc2
authored
Apr 16, 2015
by
陈志良
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
分享带回用户
parent
3d6d5a60
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
2 deletions
+12
-2
forumShare.js
app/controllers/mobile/forumShare.js
+8
-0
httpService.js
app/service/httpService.js
+4
-2
No files found.
app/controllers/mobile/forumShare.js
View file @
c0bc8fc2
...
...
@@ -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
();
});
app/service/httpService.js
View file @
c0bc8fc2
...
...
@@ -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
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment