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
68658031
Commit
68658031
authored
Jan 28, 2016
by
陈家荣
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
调试分享
parent
bc2b4864
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
11 deletions
+8
-11
forumHonorTitle.js
app/controllers/mobile/forumHonorTitle.js
+2
-4
forumShare.js
app/controllers/mobile/forumShare.js
+4
-7
httpService.js
app/service/httpService.js
+2
-0
No files found.
app/controllers/mobile/forumHonorTitle.js
View file @
68658031
...
...
@@ -19,7 +19,7 @@ module.exports = function(app) {
//查询单个头衔信息人员信息
router
.
get
(
'/honorTitle/:hid/list'
,
function
(
req
,
res
,
next
)
{
var
pageNo
=
req
.
query
.
pageNo
||
1
;
var
pageSize
=
req
.
query
.
pageSize
||
4
;
var
pageSize
=
req
.
query
.
pageSize
||
999
;
var
ent_code
=
req
.
session
.
user
.
ent_code
;
var
honorTitleId
=
req
.
params
.
hid
;
...
...
@@ -73,9 +73,7 @@ router.get('/honorTitle/list', function(req, res, next) {
asyncTasks
.
push
(
function
(
cont
)
{
var
user_conditions
=
{
ent_code
:
ent_code
,
honor
:
{
$in
:
[
one
.
_id
]
}
honor
:
one
.
_id
};
forumUserHonorTimeLineService
.
getAll
(
pageNo
,
pageSize
,
user_conditions
,
fields
,
'-_id'
,
function
(
err
,
results
)
{
if
(
err
)
{
...
...
app/controllers/mobile/forumShare.js
View file @
68658031
...
...
@@ -308,7 +308,8 @@ router.get('/sharev2.js', function(req, res, next) {
var
key
=
ent_code
+
'forum_share_index_info'
;
console
.
log
(
'key: '
+
key
);
console
.
log
(
'----------- in ---------'
);
console
.
log
(
type
);
if
(
type
&&
type
===
'index'
){
var
expire
=
60
*
60
;
...
...
@@ -450,16 +451,12 @@ router.get('/sharev2.js', function(req, res, next) {
share_log
.
p_thread
=
thread
.
pid
;
share_log
.
info
=
thread
.
info
.
_id
||
thread
.
info
;
share_log
.
thread_type
=
thread
.
pid
?
4
:
thread
.
type
;
console
.
log
(
' old session -----------> '
);
console
.
log
(
req
.
session
);
//替换分享log内容
req
.
session
.
shareLog
=
share_log
;
console
.
log
(
' new session -----------> '
);
console
.
log
(
req
.
session
);
console
.
log
(
req
.
session
.
shareLog
);
//组装分享路径与判断分享类型
...
...
app/service/httpService.js
View file @
68658031
...
...
@@ -142,6 +142,7 @@ exports.createLog = function(req,source,info,type,thread_type,thread,p_thread) {
};
exports
.
createShareLog
=
function
(
req
,
share_type
)
{
console
.
log
(
'----------- in createShareLog ---------'
);
var
logObj
=
req
.
session
.
shareLog
||
{};
logObj
.
source
=
req
.
session
.
mobileForumUser
.
source
;
logObj
.
mid
=
req
.
session
.
openUser
.
mid
;
...
...
@@ -160,6 +161,7 @@ exports.createShareLog = function(req,share_type) {
}).
then
(
function
(
cont
){
if
(
logObj
.
thread
){
ForumThread
.
update
({
_id
:
logObj
.
thread
},{
$inc
:{
share_count
:
1
}},
function
(
err
){
console
.
log
(
'----------- update share_count success ---------'
);
cont
(
err
);
});
}
...
...
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