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
35b61279
Commit
35b61279
authored
Jul 15, 2015
by
刘文胜
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
板块个性化分享
parent
185b5f20
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
47 additions
and
23 deletions
+47
-23
forumShare.js
app/controllers/mobile/forumShare.js
+38
-22
forumInfo.js
app/models/forumInfo.js
+9
-1
No files found.
app/controllers/mobile/forumShare.js
View file @
35b61279
...
@@ -93,7 +93,21 @@ router.get('/:ent_code/share.js', function(req, res, next) {
...
@@ -93,7 +93,21 @@ router.get('/:ent_code/share.js', function(req, res, next) {
//分享记录对象
//分享记录对象
share_log
.
type
=
2
;
share_log
.
type
=
2
;
share_log
.
info
=
id
;
share_log
.
info
=
id
;
//查询板块默认分享设置
forumInfoService
.
getInfoById
(
id
,
function
(
err
,
forumInfo
)
{
if
(
err
)
{
console
.
error
(
err
);
res
.
json
(
_
.
assign
({
result
:
false
},
returnCode
.
BUSY
));
return
;
}
if
(
forumInfo
.
share_type
==
1
){
var
shareInfo
=
forumInfo
.
share
||
{};
var
title
=
shareInfo
.
title
||
''
,
desc
=
shareInfo
.
desc
||
''
,
imgUrl
=
shareInfo
.
imgUrl
||
''
;
link
=
link
+
'index&infoId='
+
id
+
'&uId='
+
uId
;
getWX
(
res
,
title
,
desc
,
link
,
imgUrl
,
mid
,
ent_code
,
id
,
type
,
null
);
return
;
}
//默认分享设置 //查询板块默认分享设置
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
);
...
@@ -120,6 +134,8 @@ router.get('/:ent_code/share.js', function(req, res, next) {
...
@@ -120,6 +134,8 @@ router.get('/:ent_code/share.js', function(req, res, next) {
}
}
}
}
});
});
});
}
else
if
(
type
===
'Thread'
)
{
}
else
if
(
type
===
'Thread'
)
{
share_log
.
type
=
3
;
share_log
.
type
=
3
;
share_log
.
thread
=
id
;
share_log
.
thread
=
id
;
...
...
app/models/forumInfo.js
View file @
35b61279
...
@@ -42,6 +42,14 @@ var ForumInfoSchema = new Schema({
...
@@ -42,6 +42,14 @@ var ForumInfoSchema = new Schema({
require
:
true
,
require
:
true
,
default
:
1
default
:
1
},
},
share_type
:{
//分享类型,1自定义,0和其它为默认
type
:
Number
,
default
:
0
},
share
:{
//desc title imgUrl
type
:
Object
,
default
:{}
},
created
:
{
created
:
{
type
:
Date
,
type
:
Date
,
required
:
true
,
required
:
true
,
...
...
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