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
e0b6068c
Commit
e0b6068c
authored
Dec 07, 2015
by
strong
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'remould_1120_spreadchain'
# Conflicts: # app/controllers/mobile/forumThread.js
parents
0c1302b5
e323e698
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
5 deletions
+10
-5
forumThread.js
app/controllers/admin/forumThread.js
+8
-4
forumThread.js
app/controllers/mobile/forumThread.js
+2
-1
No files found.
app/controllers/admin/forumThread.js
View file @
e0b6068c
...
@@ -960,7 +960,8 @@ var getSubSpreadPaths = function(openIds, c, pvs, cb) {
...
@@ -960,7 +960,8 @@ var getSubSpreadPaths = function(openIds, c, pvs, cb) {
c
.
children
.
push
({
c
.
children
.
push
({
openId
:
pvs
[
i
].
open_id
,
openId
:
pvs
[
i
].
open_id
,
nickName
:
pvs
[
i
].
user
.
displayName
||
'未知'
,
nickName
:
pvs
[
i
].
user
.
displayName
||
'未知'
,
name
:
pvs
[
i
].
user
.
nickName
||
'未知'
name
:
pvs
[
i
].
user
.
nickName
||
'未知'
,
id
:
pvs
[
i
].
_id
});
});
openIds
.
push
(
pvs
[
i
].
open_id
);
openIds
.
push
(
pvs
[
i
].
open_id
);
}
}
...
@@ -1017,8 +1018,10 @@ router.get('/thread/:tid/spreadchain', function(req, res, next) {
...
@@ -1017,8 +1018,10 @@ router.get('/thread/:tid/spreadchain', function(req, res, next) {
var
data
=
{
var
data
=
{
openId
:
thread
.
from
.
uid
,
openId
:
thread
.
from
.
uid
,
name
:
thread
.
from
.
nickName
,
name
:
thread
.
from
.
nickName
,
nickName
:
thread
.
from
.
displayName
,
//nickName: thread.from.displayName,
children
:
[]
nickName
:
thread
.
from
.
nickName
,
children
:
[]
,
id
:
'ROOT'
}
}
//获取一级传播
//获取一级传播
for
(
var
i
=
0
;
i
<
pvs
.
length
;
i
+=
1
)
{
for
(
var
i
=
0
;
i
<
pvs
.
length
;
i
+=
1
)
{
...
@@ -1036,7 +1039,8 @@ router.get('/thread/:tid/spreadchain', function(req, res, next) {
...
@@ -1036,7 +1039,8 @@ router.get('/thread/:tid/spreadchain', function(req, res, next) {
data
.
children
.
push
({
data
.
children
.
push
({
openId
:
pv
.
open_id
,
openId
:
pv
.
open_id
,
nickName
:
pv
.
user
.
displayName
||
'未知'
,
nickName
:
pv
.
user
.
displayName
||
'未知'
,
name
:
pv
.
user
.
nickName
||
'未知'
name
:
pv
.
user
.
nickName
||
'未知'
,
id
:
pv
.
_id
});
});
openIds
.
push
(
pv
.
open_id
);
openIds
.
push
(
pv
.
open_id
);
}
}
...
...
app/controllers/mobile/forumThread.js
View file @
e0b6068c
...
@@ -164,6 +164,7 @@ var raiseOrcancelRaise = function(req, ent_code, tid, userId, callback) {
...
@@ -164,6 +164,7 @@ var raiseOrcancelRaise = function(req, ent_code, tid, userId, callback) {
],
function
(
err
,
results
)
{
],
function
(
err
,
results
)
{
if
(
err
)
{
if
(
err
)
{
console
.
error
(
err
);
console
.
error
(
err
);
// res.json(returnCode.BUSY);
callback
(
returnCode
.
BUSY
);
callback
(
returnCode
.
BUSY
);
}
else
{
}
else
{
//更新点赞redis
//更新点赞redis
...
@@ -176,6 +177,7 @@ var raiseOrcancelRaise = function(req, ent_code, tid, userId, callback) {
...
@@ -176,6 +177,7 @@ var raiseOrcancelRaise = function(req, ent_code, tid, userId, callback) {
forumThreadService
.
getThreadById
(
tid
,
function
(
err
,
doc
)
{
forumThreadService
.
getThreadById
(
tid
,
function
(
err
,
doc
)
{
if
(
err
)
{
if
(
err
)
{
console
.
error
(
err
);
console
.
error
(
err
);
// res.json(returnCode.BUSY);
callback
(
returnCode
.
BUSY
);
callback
(
returnCode
.
BUSY
);
}
else
{
}
else
{
var
rs
=
{};
var
rs
=
{};
...
@@ -1150,7 +1152,6 @@ router.post('/thread/:tid/praiseOrCancelPraise', function(req, res, next) {
...
@@ -1150,7 +1152,6 @@ router.post('/thread/:tid/praiseOrCancelPraise', function(req, res, next) {
}
}
});
});
//文章分享
//文章分享
router
.
post
(
'/thread/:tid/share'
,
function
(
req
,
res
,
next
)
{
router
.
post
(
'/thread/:tid/share'
,
function
(
req
,
res
,
next
)
{
var
tid
=
req
.
params
.
tid
||
null
;
var
tid
=
req
.
params
.
tid
||
null
;
...
...
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