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
7bc04676
Commit
7bc04676
authored
Sep 24, 2015
by
陈志良
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch '0922_forum_share' into SANDBOX
parents
5d152c58
109edf1c
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
10 deletions
+10
-10
forumShare.js
app/controllers/mobile/forumShare.js
+10
-10
No files found.
app/controllers/mobile/forumShare.js
View file @
7bc04676
...
...
@@ -60,15 +60,15 @@ function getWX(res, title, desc, link, imgUrl, mid,ent_code, id,type,forumThread
error
:
err
});
}
else
{
title
=
title
.
replace
(
/{板块名称}/g
,
forumInfo
.
name
)
;
desc
=
desc
.
replace
(
/{板块名称}/g
,
forumInfo
.
name
)
;
title
=
title
?
title
.
replace
(
/{板块名称}/g
,
forumInfo
.
name
):
''
;
desc
=
desc
?
desc
.
replace
(
/{板块名称}/g
,
forumInfo
.
name
):
''
;
write
(
res
,
title
,
desc
,
link
,
imgUrl
,
mid
,
ent_code
);
}
});
}
else
if
(
type
===
"Thread"
){
title
=
title
.
replace
(
/{文章标题}|{话题名称}|{照片墙标题}/g
,
forumThread
.
title
)
;
desc
=
desc
.
replace
(
/{文章标题}|{话题名称}|{照片墙标题}/g
,
forumThread
.
title
)
;
title
=
title
?
title
.
replace
(
/{文章标题}|{话题名称}|{照片墙标题}/g
,
forumThread
.
title
):
''
;
desc
=
desc
?
desc
.
replace
(
/{文章标题}|{话题名称}|{照片墙标题}/g
,
forumThread
.
title
):
''
;
write
(
res
,
title
,
desc
,
link
,
imgUrl
,
mid
,
ent_code
);
}
}
...
...
@@ -162,7 +162,7 @@ router.get('/:ent_code/share.js', function(req, res, next) {
}
var
baseParamsUrl
=
'&infoId='
+
thread
.
info
+
'&ent_code='
+
ent_code
+
'&id='
+
thread
.
_id
+
'&uId='
+
uId
;
link
+=
baseParamsUrl
;
desc
=
thread
.
content
.
replace
(
/<
\/?
.+
?
>/g
,
""
).
replace
(
/ /g
,
""
)
;
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
)
{
...
...
@@ -251,13 +251,13 @@ function getWXV2(res, title, desc, link, imgUrl, mid,ent_code, id,type,forumThre
error
:
err
});
}
else
{
title
=
title
?
title
.
replace
(
/{板块名称}/g
,
forumInfo
.
name
):
title
;
desc
=
desc
?
desc
.
replace
(
/{板块名称}/g
,
forumInfo
.
name
):
desc
;
title
=
title
?
title
.
replace
(
/{板块名称}/g
,
forumInfo
.
name
):
''
;
desc
=
desc
?
desc
.
replace
(
/{板块名称}/g
,
forumInfo
.
name
):
''
;
}
});
}
else
if
(
type
===
"Thread"
){
title
=
title
?
title
.
replace
(
/{文章标题}|{话题名称}|{照片墙标题}/g
,
forumThread
.
title
):
title
;
desc
=
desc
?
desc
.
replace
(
/{文章标题}|{话题名称}|{照片墙标题}/g
,
forumThread
.
title
):
desc
;
title
=
title
?
title
.
replace
(
/{文章标题}|{话题名称}|{照片墙标题}/g
,
forumThread
.
title
):
''
;
desc
=
desc
?
desc
.
replace
(
/{文章标题}|{话题名称}|{照片墙标题}/g
,
forumThread
.
title
):
''
;
}
res
.
json
({
title
:
title
,
...
...
@@ -353,7 +353,7 @@ router.get('/sharev2.js', function(req, res, next) {
}
break
;
}
desc
=
thread
.
content
.
replace
(
/<
\/?
.+
?
>/g
,
""
).
replace
(
/ /g
,
""
)
;
desc
=
thread
.
content
?
thread
.
content
.
replace
(
/<
\/?
.+
?
>/g
,
""
).
replace
(
/ /g
,
""
):
''
;
imgUrl
=
thread
.
from
.
displayIcon
||
thread
.
from
.
icon
||
thread
.
info
.
icon
;
link
+=
baseParamsUrl
;
//获取分享设置
...
...
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