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
e2c8aa70
Commit
e2c8aa70
authored
Oct 09, 2015
by
陈志良
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加点赞人openIds
parent
c6443107
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
9 deletions
+15
-9
forumThread.js
app/controllers/admin/forumThread.js
+15
-9
No files found.
app/controllers/admin/forumThread.js
View file @
e2c8aa70
...
...
@@ -1057,10 +1057,13 @@ router.get('/thread/:tid/exportComments', function(req, res, next) {
}
else
{
if
(
results
){
var
praiseNames
=
[];
var
praiseOpenIds
=
[];
_
.
forEach
(
results
,
function
(
e2
)
{
praiseNames
.
push
(
e2
.
user
.
nickName
||
'游客'
);
praiseOpenIds
.
push
(
e2
.
user
.
uid
);
});
e
.
praiseNames
=
praiseNames
;
e
.
praiseOpenIds
=
praiseOpenIds
;
e
.
praiseCount
=
results
.
length
;
}
cb
(
null
,
e
);
...
...
@@ -1081,6 +1084,7 @@ router.get('/thread/:tid/exportComments', function(req, res, next) {
{
caption
:
'内容'
,
type
:
'string'
},
{
caption
:
'点赞数'
,
type
:
'number'
},
{
caption
:
'点赞人'
,
type
:
'string'
},
{
caption
:
'点赞人openId'
,
type
:
'string'
}
];
//内容
...
...
@@ -1089,18 +1093,20 @@ router.get('/thread/:tid/exportComments', function(req, res, next) {
for
(
var
i
=
items
.
length
-
1
;
i
>=
0
;
i
--
)
{
var
comment
=
items
[
i
];
var
floor
=
comment
.
floor
;
var
time
=
date_format
(
comment
.
created
);
var
openId
=
comment
.
from
.
uid
||
''
;
var
nickName
=
comment
.
from
.
nickName
||
'游客'
;
var
content
=
comment
.
content
||
''
;
var
praiseCount
=
comment
.
praiseCount
||
0
;
var
praiseNames
=
''
;
var
floor
=
comment
.
floor
,
time
=
date_format
(
comment
.
created
),
openId
=
comment
.
from
.
uid
||
''
,
nickName
=
comment
.
from
.
nickName
||
'游客'
,
content
=
comment
.
content
||
''
,
praiseCount
=
comment
.
praiseCount
||
0
,
praiseNames
=
''
,
praiseOpenIds
=
''
;
if
(
comment
.
praiseNames
){
praiseNames
=
comment
.
praiseNames
.
toString
();
praiseOpenIds
=
comment
.
praiseOpenIds
.
toString
();
}
var
this_row
=
[
floor
+
''
,
time
,
openId
,
nickName
,
content
,
praiseCount
,
praiseNames
];
var
this_row
=
[
floor
+
''
,
time
,
openId
,
nickName
,
content
,
praiseCount
,
praiseNames
,
praiseOpenIds
];
rows
.
push
(
this_row
);
if
(
comment
.
comments
.
length
>
0
){
...
...
@@ -1112,7 +1118,7 @@ router.get('/thread/:tid/exportComments', function(req, res, next) {
var
nickName
=
sub_comment
.
from
.
nickName
||
'游客'
;
var
content
=
sub_comment
.
content
||
''
;
var
this_row
=
[
'回复'
,
time
,
openId
,
nickName
,
content
,
null
,
null
];
var
this_row
=
[
'回复'
,
time
,
openId
,
nickName
,
content
,
null
,
null
,
null
];
rows
.
push
(
this_row
);
};
}
...
...
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