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
1fc899ba
Commit
1fc899ba
authored
Jul 09, 2015
by
陈志良
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加分享后文章添加分享数
parent
daea34fe
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
2 deletions
+11
-2
httpService.js
app/service/httpService.js
+11
-2
No files found.
app/service/httpService.js
View file @
1fc899ba
...
@@ -19,7 +19,8 @@ var mongoose = require('mongoose'),
...
@@ -19,7 +19,8 @@ var mongoose = require('mongoose'),
var
ForumPVLog
=
mongoose
.
model
(
'ForumPVLog'
),
var
ForumPVLog
=
mongoose
.
model
(
'ForumPVLog'
),
ForumUVLog
=
mongoose
.
model
(
'ForumUVLog'
),
ForumUVLog
=
mongoose
.
model
(
'ForumUVLog'
),
ForumShareLog
=
mongoose
.
model
(
'ForumShareLog'
);
ForumShareLog
=
mongoose
.
model
(
'ForumShareLog'
),
ForumThread
=
mongoose
.
model
(
'ForumThread'
);
exports
.
sendRequest
=
function
(
ent_code
,
mid
,
action
,
messageid
,
integral
,
exp
)
{
exports
.
sendRequest
=
function
(
ent_code
,
mid
,
action
,
messageid
,
integral
,
exp
)
{
var
obj
=
{
var
obj
=
{
tag
:
'member'
,
tag
:
'member'
,
...
@@ -153,7 +154,15 @@ exports.createShareLog = function(req,share_type) {
...
@@ -153,7 +154,15 @@ exports.createShareLog = function(req,share_type) {
if
(
logObj
){
if
(
logObj
){
then
(
function
(
cont
){
then
(
function
(
cont
){
var
share_log_model
=
new
ForumShareLog
(
logObj
);
var
share_log_model
=
new
ForumShareLog
(
logObj
);
share_log_model
.
save
(
cont
);
share_log_model
.
save
(
function
(
err
){
cont
(
err
);
});
}).
then
(
function
(
cont
){
if
(
logObj
.
thread
){
ForumThread
.
update
({
_id
:
logObj
.
thread
},{
$inc
:{
share_count
:
1
}},
function
(
err
){
cont
(
err
);
});
}
}).
fail
(
function
(
cont
,
err
){
}).
fail
(
function
(
cont
,
err
){
console
.
error
(
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