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
5934f4f9
Commit
5934f4f9
authored
Apr 21, 2015
by
邓军
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.论坛子文章管理
2.调整个性化分享BUG
parent
f2a61e4b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
7 deletions
+5
-7
forumThread.js
app/controllers/admin/forumThread.js
+3
-5
forumThreadService.js
app/service/forumThreadService.js
+2
-2
No files found.
app/controllers/admin/forumThread.js
View file @
5934f4f9
...
...
@@ -25,14 +25,15 @@ module.exports = function(app) {
//新增论坛文章
router
.
post
(
'/thread/create'
,
function
(
req
,
res
,
next
)
{
var
rs
=
{};
req
.
body
.
ent_code
=
req
.
session
.
user
.
ent_code
;
var
uid
=
req
.
session
.
user
.
id
;
// var uid='12345';
if
(
req
.
body
.
pid
){
req
.
body
.
level
=
2
;
}
async
.
waterfall
([
function
(
callback
){
forumUserService
.
getUserByUid
(
uid
,
callback
);
...
...
@@ -129,8 +130,6 @@ router.post('/thread/:tid/update', function(req, res, next) {
if
(
err
){
res
.
json
(
returnCode
.
BUSY
);
}
else
{
console
.
log
(
thread
);
console
.
log
(
fatherTitle
);
res
.
json
({
message
:
"success"
,
data
:
thread
,
title
:
fatherTitle
});
}
});
...
...
@@ -219,7 +218,6 @@ router.get('/threads/list', function(req, res, next) {
conditions
.
level
=
2
;
}
console
.
log
(
conditions
);
forumThreadService
.
getAllThreadByFid
(
conditions
,
pageNo
,
pageSize
,
null
,
function
(
err
,
results
){
if
(
err
){
console
.
error
(
err
);
...
...
app/service/forumThreadService.js
View file @
5934f4f9
...
...
@@ -254,7 +254,7 @@ exports.getThreadById = function(tid, callback) {
//根据ID更新文章
exports
.
updateThreadById
=
function
(
tid
,
entity
,
callback
)
{
var
shareEntity
=
entity
.
share
;
if
(
entity
.
share
.
_id
)
{
if
(
entity
.
share
&&
entity
.
share
.
_id
)
{
entity
.
share
=
entity
.
share
.
_id
;
}
else
{
entity
.
share
=
''
;
...
...
@@ -283,7 +283,7 @@ exports.updateThreadById = function(tid, entity, callback) {
});
}
else
{
if
(
shareEntity
.
title
||
shareEntity
.
description
||
shareEntity
.
icon
)
{
if
(
shareEntity
&&
(
shareEntity
.
title
||
shareEntity
.
description
||
shareEntity
.
icon
)
)
{
shareEntity
.
ent_code
=
entity
.
ent_code
;
var
forumShare
=
new
ForumShare
(
shareEntity
);
...
...
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