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
e323e698
Commit
e323e698
authored
Dec 03, 2015
by
car
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gephi方式生成传播链图表
parent
4d0265c7
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
4 deletions
+8
-4
forumThread.js
app/controllers/admin/forumThread.js
+8
-4
No files found.
app/controllers/admin/forumThread.js
View file @
e323e698
...
...
@@ -960,7 +960,8 @@ var getSubSpreadPaths = function(openIds, c, pvs, cb) {
c
.
children
.
push
({
openId
:
pvs
[
i
].
open_id
,
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
);
}
...
...
@@ -1017,8 +1018,10 @@ router.get('/thread/:tid/spreadchain', function(req, res, next) {
var
data
=
{
openId
:
thread
.
from
.
uid
,
name
:
thread
.
from
.
nickName
,
nickName
:
thread
.
from
.
displayName
,
children
:
[]
//nickName: thread.from.displayName,
nickName
:
thread
.
from
.
nickName
,
children
:
[]
,
id
:
'ROOT'
}
//获取一级传播
for
(
var
i
=
0
;
i
<
pvs
.
length
;
i
+=
1
)
{
...
...
@@ -1036,7 +1039,8 @@ router.get('/thread/:tid/spreadchain', function(req, res, next) {
data
.
children
.
push
({
openId
:
pv
.
open_id
,
nickName
:
pv
.
user
.
displayName
||
'未知'
,
name
:
pv
.
user
.
nickName
||
'未知'
name
:
pv
.
user
.
nickName
||
'未知'
,
id
:
pv
.
_id
});
openIds
.
push
(
pv
.
open_id
);
}
...
...
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