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
064eadc3
Commit
064eadc3
authored
Sep 25, 2015
by
陈志良
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch '0922_forum_share' into SANDBOX
parents
af43ec62
da730ead
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
11 deletions
+6
-11
forumShare.js
app/controllers/mobile/forumShare.js
+6
-11
No files found.
app/controllers/mobile/forumShare.js
View file @
064eadc3
...
...
@@ -100,7 +100,7 @@ router.get('/:ent_code/share.js', function(req, res, next) {
res
.
json
(
_
.
assign
({
result
:
false
},
returnCode
.
BUSY
));
return
;
}
else
{
if
(
forumInfo
.
share_type
==
1
){
if
(
forumInfo
.
share_type
==
1
&&
forumInfo
.
share
){
var
shareInfo
=
forumInfo
.
share
||
{};
title
=
shareInfo
.
title
,
desc
=
shareInfo
.
description
,
imgUrl
=
shareInfo
.
icon
;
}
else
{
...
...
@@ -163,7 +163,7 @@ router.get('/:ent_code/share.js', function(req, res, next) {
desc
=
thread
.
content
?
thread
.
content
.
replace
(
/<
\/?
.+
?
>/g
,
""
).
replace
(
/ /g
,
""
):
''
;
imgUrl
=
thread
.
from
.
displayIcon
||
thread
.
from
.
icon
||
thread
.
info
.
icon
;
//获取分享设置
if
(
!
thread
.
share
||
thread
.
share_type
==
1
)
{
if
(
!
thread
.
share
||
thread
.
share_type
!==
2
)
{
//获取默认文章分享
getWX
(
res
,
title
,
desc
,
link
,
imgUrl
,
mid
,
ent_code
,
thread
.
_id
,
type
,
thread
);
}
else
{
...
...
@@ -354,18 +354,13 @@ router.get('/sharev2.js', function(req, res, next) {
imgUrl
=
thread
.
from
.
displayIcon
||
thread
.
from
.
icon
||
thread
.
info
.
icon
;
link
+=
baseParamsUrl
;
//获取分享设置
if
(
!
thread
.
share
||
thread
.
share_type
==
1
)
{
if
(
thread
.
share_type
!==
2
)
{
//文章默认分享
getWXV2
(
res
,
title
,
desc
,
link
,
imgUrl
,
mid
,
ent_code
,
thread
.
_id
,
type
,
thread
);
}
else
if
(
thread
.
share
){
getWXV2
(
res
,
thread
.
share
.
title
,
thread
.
share
.
description
,
link
,
thread
.
share
.
icon
,
mid
,
ent_code
,
thread
.
_id
,
type
,
thread
);
}
else
{
//获取个性化文章分享设置
forumShareService
.
getById
(
thread
.
share
,
function
(
err
,
forumShare
)
{
if
(
err
||
!
forumShare
){
getWXV2
(
res
,
title
,
desc
,
link
,
imgUrl
,
mid
,
ent_code
,
thread
.
_id
,
type
,
thread
);
}
else
{
getWXV2
(
res
,
forumShare
.
title
,
forumShare
.
description
,
link
,
forumShare
.
icon
,
mid
,
ent_code
,
thread
.
_id
,
type
,
thread
);
}
});
getWXV2
(
res
,
title
,
desc
,
link
,
imgUrl
,
mid
,
ent_code
,
thread
.
_id
,
type
,
thread
);
}
}
}).
fail
(
function
(
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