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
b36eb6d4
Commit
b36eb6d4
authored
Apr 22, 2015
by
刘文胜
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'development' of git.wxpai.cn:scrmgroup/pisns-forum-api into development
parents
b010731c
21a75806
Changes
6
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
2028 additions
and
14 deletions
+2028
-14
forumThread.js
app/controllers/admin/forumThread.js
+3
-5
forumThread.js
app/controllers/mobile/forumThread.js
+0
-6
forumThreadService.js
app/service/forumThreadService.js
+3
-3
forumThreadService.js.BASE.js
app/service/forumThreadService.js.BASE.js
+674
-0
forumThreadService.js.LOCAL.js
app/service/forumThreadService.js.LOCAL.js
+674
-0
forumThreadService.js.REMOTE.js
app/service/forumThreadService.js.REMOTE.js
+674
-0
No files found.
app/controllers/admin/forumThread.js
View file @
b36eb6d4
...
...
@@ -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/controllers/mobile/forumThread.js
View file @
b36eb6d4
...
...
@@ -687,15 +687,9 @@ router.post('/thread/:tid/comment/:cid/delete', function(req, res, next) {
//评论列表
router
.
get
(
'/thread/:tid/comment/list'
,
function
(
req
,
res
,
next
)
{
<<<<<<<
HEAD
var
tid
=
req
.
params
.
tid
||
null
;
var
pageNo
=
req
.
query
.
pageNo
||
1
;
=======
var
tid
=
req
.
params
.
tid
||
null
;
var
pageNo
=
req
.
query
.
pageNo
||
1
;
>>>>>>>
f2a61e4b468be1158deee3015cb171b0bede90e4
var
pageSize
=
req
.
query
.
pageSize
||
10
;
var
conditions
=
{
...
...
app/service/forumThreadService.js
View file @
b36eb6d4
...
...
@@ -253,8 +253,8 @@ exports.getThreadById = function(tid, callback) {
//根据ID更新文章
exports
.
updateThreadById
=
function
(
tid
,
entity
,
callback
)
{
var
shareEntity
=
entity
.
share
||
{}
;
if
(
entity
.
share
&&
entity
.
share
.
_id
)
{
var
shareEntity
=
entity
.
share
;
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
);
...
...
app/service/forumThreadService.js.BASE.js
0 → 100644
View file @
b36eb6d4
This diff is collapsed.
Click to expand it.
app/service/forumThreadService.js.LOCAL.js
0 → 100644
View file @
b36eb6d4
This diff is collapsed.
Click to expand it.
app/service/forumThreadService.js.REMOTE.js
0 → 100644
View file @
b36eb6d4
This diff is collapsed.
Click to expand it.
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