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
575441b3
Commit
575441b3
authored
Oct 08, 2015
by
陈家荣
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
33
parent
df044b44
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
23 deletions
+3
-23
forumThread.js
app/controllers/admin/forumThread.js
+3
-23
No files found.
app/controllers/admin/forumThread.js
View file @
575441b3
...
...
@@ -1021,17 +1021,13 @@ router.get('/thread/:tid/spreadchain', function(req, res, next) {
// 导出文章评论内容
router
.
get
(
'/thread/:tid/exportComments'
,
function
(
req
,
res
,
next
)
{
var
tid
=
req
.
params
.
tid
||
null
;
// var ent_code = req.query.ent_code;
if
(
req
.
query
.
ent_code
){
var
ent_code
=
req
.
query
.
ent_code
;
}
else
{
var
ent_code
=
100056
;
}
if
(
tid
){
var
conditions
=
{
ent_code
:
ent_code
,
thread
:
tid
...
...
@@ -1081,7 +1077,7 @@ router.get('/thread/:tid/exportComments', function(req, res, next) {
//表头
var
conf
=
{};
conf
.
cols
=
[
{
caption
:
'楼层'
,
type
:
'
number
'
},
{
caption
:
'楼层'
,
type
:
'
string
'
},
{
caption
:
'发布时间'
,
type
:
'Date'
},
{
caption
:
'会员名'
,
type
:
'string'
},
{
caption
:
'内容'
,
type
:
'string'
},
...
...
@@ -1105,37 +1101,21 @@ router.get('/thread/:tid/exportComments', function(req, res, next) {
praiseNames
=
comment
.
praiseNames
.
toString
();
}
var
this_row
=
[
floor
,
time
,
nickName
,
content
,
praiseCount
,
praiseNames
];
var
this_row
=
[
floor
+
''
,
time
,
nickName
,
content
,
praiseCount
,
praiseNames
];
rows
.
push
(
this_row
);
if
(
comment
.
comments
.
length
>
0
){
for
(
var
i
=
comment
.
comments
.
length
-
1
;
i
>=
0
;
i
--
)
{
var
sub_comment
=
comment
.
comments
[
i
];
var
floor
=
sub_comment
.
floor
;
var
time
=
date_format
(
sub_comment
.
created
);
var
nickName
=
sub_comment
.
from
.
nickName
||
''
;
var
content
=
sub_comment
.
content
||
''
;
var
praiseCount
=
sub_comment
.
praiseCount
||
0
;
var
praiseNames
=
''
;
if
(
comment
.
praiseNames
){
praiseNames
=
comment
.
praiseNames
.
toString
();
}
var
this_row
=
[
null
,
time
,
nickName
,
content
,
praiseCount
,
praiseNames
];
var
this_row
=
[
'子评论'
,
time
,
nickName
,
content
,
null
,
null
];
rows
.
push
(
this_row
);
// console.log(time);
// console.log(nickName);
// console.log(content);
// console.log(praiseNames);
// console.log(praiseCount);
};
}
};
conf
.
rows
=
rows
;
...
...
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