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
05b086c4
Commit
05b086c4
authored
Jul 23, 2015
by
陈家荣
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
4
parent
249884f4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
12 deletions
+19
-12
forumIdentifyUser.js
app/controllers/admin/forumIdentifyUser.js
+19
-12
No files found.
app/controllers/admin/forumIdentifyUser.js
View file @
05b086c4
...
...
@@ -79,7 +79,6 @@ router.post('/user/identifyUser',function(req,res,next){
var
entity
=
req
.
body
;
req
.
session
.
mobileForumUser
=
null
;
if
(
!
req
.
session
.
mobileForumUser
){
console
.
log
(
'entity.uid:'
+
entity
.
uid
);
forumUserService
.
getUserByUid
(
entity
.
uid
,
function
(
err
,
doc
){
if
(
err
){
console
.
log
(
err
);
...
...
@@ -141,12 +140,12 @@ router.get('/user/from/share', function(req, res, next) {
//检查用户权限
router
.
post
(
'/user/checkLimitAction'
,
function
(
req
,
res
,
next
)
{
console
.
log
(
req
.
session
);
var
mid
=
req
.
session
.
mobileForumUser
.
userId
;
var
entity
=
req
.
body
;
var
mid
=
entity
.
mid
;
if
(
mid
){
var
array
=
[];
forumLimitActionRefService
.
getLimitActionRefByMid
(
mid
,
function
(
err
,
forumLimitActionRef
){
console
.
log
(
forumLimitActionRef
);
if
(
err
)
{
console
.
error
(
err
);
res
.
json
(
'success'
);
...
...
@@ -164,18 +163,26 @@ router.post('/user/checkLimitAction', function(req, res, next) {
}
array
.
push
(
obj
);
}
req
.
session
.
mobileForumUser
.
limit_actions
=
array
;
console
.
log
(
'------------'
);
console
.
log
(
req
.
session
.
mobileForumUser
);
console
.
log
(
'------------'
);
res
.
json
(
'success'
);
var
returnObject
=
{
errcode
:
'success'
,
data
:
array
}
res
.
json
(
returnObject
);
}
else
{
req
.
session
.
mobileForumUser
.
limit_actions
=
null
;
res
.
json
(
'success'
);
var
returnObject
=
{
errcode
:
'success'
,
data
:[]
}
res
.
json
(
returnObject
);
}
}
});
}
else
{
res
.
json
(
'success'
);
var
returnObject
=
{
errcode
:
'success'
,
data
:[]
}
res
.
json
(
returnObject
);
}
});
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