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
e233b98d
Commit
e233b98d
authored
Jul 17, 2015
by
陈志良
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
ffa6bd1a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
31 additions
and
27 deletions
+31
-27
forumShare.js
app/controllers/mobile/forumShare.js
+31
-27
No files found.
app/controllers/mobile/forumShare.js
View file @
e233b98d
...
@@ -102,38 +102,42 @@ router.get('/:ent_code/share.js', function(req, res, next) {
...
@@ -102,38 +102,42 @@ router.get('/:ent_code/share.js', function(req, res, next) {
}
}
if
(
forumInfo
.
share_type
==
1
){
if
(
forumInfo
.
share_type
==
1
){
var
shareInfo
=
forumInfo
.
share
||
{};
var
shareInfo
=
forumInfo
.
share
||
{};
var
title
=
shareInfo
.
title
||
''
,
desc
=
shareInfo
.
desc
||
''
,
imgUrl
=
shareInfo
.
imgUrl
||
''
;
var
title
=
shareInfo
.
title
||
''
,
desc
=
shareInfo
.
description
||
''
,
imgUrl
=
shareInfo
.
icon
||
''
;
link
=
link
+
'index&infoId='
+
id
+
'&uId='
+
uId
;
link
=
link
+
'index&infoId='
+
id
+
'&uId='
+
uId
;
getWX
(
res
,
title
,
desc
,
link
,
imgUrl
,
mid
,
ent_code
,
id
,
type
,
null
);
getWX
(
res
,
title
,
desc
,
link
,
imgUrl
,
mid
,
ent_code
,
id
,
type
,
null
);
return
;
return
;
}
}
else
{
//默认分享设置 //查询板块默认分享设置
//默认分享设置 //查询板块默认分享设置
forumShareConfigService
.
getByKey
(
ent_code
,
'share'
,
function
(
err
,
result
)
{
forumShareConfigService
.
getByKey
(
ent_code
,
'share'
,
function
(
err
,
result
)
{
if
(
err
){
if
(
err
){
console
.
error
(
err
);
console
.
error
(
err
);
res
.
json
(
_
.
assign
({
result
:
false
},
returnCode
.
BUSY
));
res
.
json
(
_
.
assign
({
result
:
false
},
returnCode
.
BUSY
));
}
else
{
var
title
=
''
,
desc
=
''
,
imgUrl
=
''
;
if
(
result
)
{
//匹配板块默认分享设置
result
=
result
.
meta_value
;
_
.
forEach
(
result
,
function
(
e
){
if
(
e
.
type
===
'info'
)
{
title
=
e
.
title
;
desc
=
e
.
desc
;
imgUrl
=
e
.
imgUrl
;
return
;
}
});
link
=
link
+
'index&infoId='
+
id
+
'&uId='
+
uId
;
getWX
(
res
,
title
,
desc
,
link
,
imgUrl
,
mid
,
ent_code
,
id
,
type
,
null
);
}
else
{
}
else
{
//没找到板块默认分享设置
var
title
=
''
,
desc
=
''
,
imgUrl
=
''
;
console
.
error
(
'info默认分享设置不存在'
);
if
(
result
)
{
res
.
json
(
_
.
assign
({
result
:
false
},
returnCode
.
DATA_NOTEXITS
));
//匹配板块默认分享设置
result
=
result
.
meta_value
;
_
.
forEach
(
result
,
function
(
e
){
if
(
e
.
type
===
'info'
)
{
title
=
e
.
title
;
desc
=
e
.
desc
;
imgUrl
=
e
.
imgUrl
;
return
;
}
});
link
=
link
+
'index&infoId='
+
id
+
'&uId='
+
uId
;
getWX
(
res
,
title
,
desc
,
link
,
imgUrl
,
mid
,
ent_code
,
id
,
type
,
null
);
}
else
{
//没找到板块默认分享设置
console
.
error
(
'info默认分享设置不存在'
);
res
.
json
(
_
.
assign
({
result
:
false
},
returnCode
.
DATA_NOTEXITS
));
}
}
}
}
});
});
}
});
});
}
else
if
(
type
===
'Thread'
)
{
}
else
if
(
type
===
'Thread'
)
{
...
...
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