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
623c76c5
Commit
623c76c5
authored
Jan 27, 2016
by
刘文胜
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
公告分享
parent
f9fab099
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
3 deletions
+25
-3
forumShare.js
app/controllers/mobile/forumShare.js
+25
-3
No files found.
app/controllers/mobile/forumShare.js
View file @
623c76c5
...
...
@@ -306,8 +306,8 @@ router.get('/sharev2.js', function(req, res, next) {
var
title
=
''
,
desc
=
''
,
imgUrl
=
''
;
if
(
type
&&
type
===
'index'
){
var
key
=
ent_code
+
'forum_share_index_info'
;
if
(
type
&&
type
===
'index'
){
var
expire
=
60
*
60
;
redis
.
get
(
key
,
function
(
error
,
share
){
if
(
share
){
//有缓存
...
...
@@ -385,9 +385,31 @@ router.get('/sharev2.js', function(req, res, next) {
res
.
json
(
_
.
assign
({
result
:
false
},
returnCode
.
BUSY
));
}
link
=
link
+
'noticeDetail&infoId='
+
(
result
.
plate
||
''
)
+
'&ent_code='
+
ent_code
+
'&tId='
+
result
.
_id
+
'&uId='
+
uId
;
title
=
result
.
title
,
desc
=
result
.
content
,
imgUrl
=
result
.
icon
;
title
=
result
.
title
,
desc
=
result
.
content
;
redis
.
get
(
key
,
function
(
error
,
share
){
if
(
share
){
//有缓存
try
{
share
=
JSON
.
parse
(
share
);
imgUrl
=
share
.
imgUrl
;
}
catch
(
err
){
console
.
log
(
err
);
}
getWXV2
(
res
,
title
,
desc
,
link
,
imgUrl
,
mid
,
ent_code
,
id
,
type
,
null
);
}
else
{
request
.
get
({
url
:
config
.
rest_api
+
'/v1.0/internal/forum/config/share/byentcode?entCode='
+
ent_code
,
body
:{},
json
:
true
},
function
(
e
,
r
,
result
)
{
if
(
result
.
data
){
try
{
var
obj
=
JSON
.
parse
(
result
.
data
);
imgUrl
=
obj
.
sharePictureUrl
||
''
;
}
catch
(
err
){
console
.
log
(
err
);
}
}
getWXV2
(
res
,
title
,
desc
,
link
,
imgUrl
,
mid
,
ent_code
,
id
,
type
,
null
);
});
}
});
});
}
else
if
(
type
===
'Info'
)
{
//分享记录对象
share_log
.
type
=
2
;
...
...
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