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
414434c8
Commit
414434c8
authored
Jan 28, 2016
by
陈家荣
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
更新荣誉列表
parent
68658031
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
11 deletions
+7
-11
forumShare.js
app/controllers/mobile/forumShare.js
+0
-8
forumThread.js
app/controllers/mobile/forumThread.js
+7
-1
httpService.js
app/service/httpService.js
+0
-2
No files found.
app/controllers/mobile/forumShare.js
View file @
414434c8
...
...
@@ -307,10 +307,6 @@ router.get('/sharev2.js', function(req, res, next) {
var
title
=
''
,
desc
=
''
,
imgUrl
=
''
;
var
key
=
ent_code
+
'forum_share_index_info'
;
console
.
log
(
'----------- in ---------'
);
console
.
log
(
type
);
if
(
type
&&
type
===
'index'
){
var
expire
=
60
*
60
;
redis
.
get
(
key
,
function
(
error
,
share
){
...
...
@@ -451,13 +447,9 @@ 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
;
//替换分享log内容
req
.
session
.
shareLog
=
share_log
;
console
.
log
(
' new session -----------> '
);
console
.
log
(
req
.
session
.
shareLog
);
//组装分享路径与判断分享类型
var
baseParamsUrl
=
'&infoId='
+
thread
.
info
.
_id
+
'&ent_code='
+
ent_code
+
'&tId='
+
thread
.
_id
+
'&uId='
+
uId
;
...
...
app/controllers/mobile/forumThread.js
View file @
414434c8
...
...
@@ -1953,7 +1953,13 @@ function handleThreadList(req, results, ent_code, callback){
//获取等级最高的荣誉
if
(
results
.
items
[
i
].
from
.
honorTitles
&&
results
.
items
[
i
].
from
.
honorTitles
.
length
>
0
){
var
temp_honorTitles
=
_
.
sortBy
(
results
.
items
[
i
].
from
.
honorTitles
,
'order_idx'
)
results
.
items
[
i
].
from
.
honorTitles
=
temp_honorTitles
[
temp_honorTitles
.
length
-
1
];
for
(
var
m
=
temp_honorTitles
.
length
-
1
;
m
>=
0
;
m
-=
1
){
var
honor
=
temp_honorTitles
[
m
]
if
(
honor
.
is_show
==
1
){
results
.
items
[
i
].
from
.
honorTitles
=
honor
;
break
;
}
}
}
results
.
items
[
i
].
isPraise
=
false
;
...
...
app/service/httpService.js
View file @
414434c8
...
...
@@ -142,7 +142,6 @@ 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
;
...
...
@@ -161,7 +160,6 @@ 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