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
4404a066
Commit
4404a066
authored
Oct 09, 2015
by
陈志良
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'SANDBOX'
parents
d0cbc1e9
c2834ded
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
51 additions
and
44 deletions
+51
-44
forumThread.js
app/controllers/admin/forumThread.js
+5
-2
user.js
app/utils/user.js
+46
-42
No files found.
app/controllers/admin/forumThread.js
View file @
4404a066
...
@@ -1076,6 +1076,7 @@ router.get('/thread/:tid/exportComments', function(req, res, next) {
...
@@ -1076,6 +1076,7 @@ router.get('/thread/:tid/exportComments', function(req, res, next) {
conf
.
cols
=
[
conf
.
cols
=
[
{
caption
:
'楼层'
,
type
:
'string'
},
{
caption
:
'楼层'
,
type
:
'string'
},
{
caption
:
'发布时间'
,
type
:
'Date'
},
{
caption
:
'发布时间'
,
type
:
'Date'
},
{
caption
:
'openId'
,
type
:
'string'
},
{
caption
:
'会员名'
,
type
:
'string'
},
{
caption
:
'会员名'
,
type
:
'string'
},
{
caption
:
'内容'
,
type
:
'string'
},
{
caption
:
'内容'
,
type
:
'string'
},
{
caption
:
'点赞数'
,
type
:
'number'
},
{
caption
:
'点赞数'
,
type
:
'number'
},
...
@@ -1090,7 +1091,8 @@ router.get('/thread/:tid/exportComments', function(req, res, next) {
...
@@ -1090,7 +1091,8 @@ router.get('/thread/:tid/exportComments', function(req, res, next) {
var
floor
=
comment
.
floor
;
var
floor
=
comment
.
floor
;
var
time
=
date_format
(
comment
.
created
);
var
time
=
date_format
(
comment
.
created
);
var
nickName
=
comment
.
from
.
nickName
||
''
;
var
openId
=
comment
.
from
.
uid
||
''
;
var
nickName
=
comment
.
from
.
nickName
||
'游客'
;
var
content
=
comment
.
content
||
''
;
var
content
=
comment
.
content
||
''
;
var
praiseCount
=
comment
.
praiseCount
||
0
;
var
praiseCount
=
comment
.
praiseCount
||
0
;
var
praiseNames
=
''
;
var
praiseNames
=
''
;
...
@@ -1106,7 +1108,8 @@ router.get('/thread/:tid/exportComments', function(req, res, next) {
...
@@ -1106,7 +1108,8 @@ router.get('/thread/:tid/exportComments', function(req, res, next) {
var
sub_comment
=
comment
.
comments
[
k
];
var
sub_comment
=
comment
.
comments
[
k
];
var
time
=
date_format
(
sub_comment
.
created
);
var
time
=
date_format
(
sub_comment
.
created
);
var
nickName
=
sub_comment
.
from
.
nickName
||
''
;
var
openId
=
sub_comment
.
from
.
uid
||
''
;
var
nickName
=
sub_comment
.
from
.
nickName
||
'游客'
;
var
content
=
sub_comment
.
content
||
''
;
var
content
=
sub_comment
.
content
||
''
;
var
this_row
=
[
'子评论'
,
time
,
nickName
,
content
,
null
,
null
];
var
this_row
=
[
'子评论'
,
time
,
nickName
,
content
,
null
,
null
];
...
...
app/utils/user.js
View file @
4404a066
...
@@ -15,6 +15,7 @@ exports.identifyUser=function() {
...
@@ -15,6 +15,7 @@ exports.identifyUser=function() {
return
function
(
req
,
res
,
next
){
return
function
(
req
,
res
,
next
){
if
(
!
req
.
session
.
mobileForumUser
){
if
(
!
req
.
session
.
mobileForumUser
){
if
(
req
.
session
.
openUser
){
forumUserService
.
getUserByUid
(
req
.
session
.
openUser
.
openId
,
function
(
err
,
doc
){
forumUserService
.
getUserByUid
(
req
.
session
.
openUser
.
openId
,
function
(
err
,
doc
){
if
(
err
){
if
(
err
){
next
(
err
);
next
(
err
);
...
@@ -64,6 +65,9 @@ exports.identifyUser=function() {
...
@@ -64,6 +65,9 @@ exports.identifyUser=function() {
}
}
}
}
});
});
}
else
{
next
(
'no openUser in session'
);
}
}
else
{
}
else
{
if
(
req
.
session
.
source
){
if
(
req
.
session
.
source
){
if
(
req
.
session
.
source
!==
req
.
session
.
mobileForumUser
.
userId
){
if
(
req
.
session
.
source
!==
req
.
session
.
mobileForumUser
.
userId
){
...
...
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