Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
S
sun
Project
Project
Details
Activity
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
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
钟尚武
sun
Commits
03669c34
Commit
03669c34
authored
Aug 07, 2019
by
王浩
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'haow/dev' into 'test'
fix code See merge request
alpha/sun!290
parents
b97e7720
dedc177b
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
34 additions
and
0 deletions
+34
-0
pictorial.py
api/pictorial.py
+16
-0
reply.py
api/reply.py
+17
-0
urls.py
api/urls.py
+1
-0
No files found.
api/pictorial.py
View file @
03669c34
...
@@ -147,3 +147,19 @@ class PictorialFeedDelete(APIView):
...
@@ -147,3 +147,19 @@ class PictorialFeedDelete(APIView):
return
{
return
{
'message'
:
'删除成功'
'message'
:
'删除成功'
}
}
class
PictorialTopicList
(
APIView
):
"""获取榜单帖子列表"""
def
get
(
self
,
request
):
id_
=
request
.
GET
.
get
(
'id'
)
offset
=
int
(
request
.
GET
.
get
(
'page'
,
1
))
limit
=
int
(
request
.
GET
.
get
(
'count'
,
10
))
try
:
data
=
self
.
rpc
[
'venus/sun/pictorial/topic/list'
](
id_
=
id_
,
offset
=
(
offset
-
1
)
*
limit
,
limit
=
limit
)
.
unwrap
()
except
Exception
as
e
:
error_logger
.
error
(
u'获取信息失败
%
s'
%
(
e
))
raise
return
data
api/reply.py
View file @
03669c34
...
@@ -187,3 +187,20 @@ class ReplyManageBatchUpdate(APIView):
...
@@ -187,3 +187,20 @@ class ReplyManageBatchUpdate(APIView):
return
{
return
{
"message"
:
'更新成功'
,
"message"
:
'更新成功'
,
}
}
class
ReplyManageMove
(
APIView
):
def
post
(
self
,
request
):
ids
=
json
.
loads
(
request
.
POST
.
get
(
'ids'
,
'[]'
))
topic_id
=
request
.
POST
.
get
(
'topic_id'
,
None
)
pictorial_id
=
request
.
POST
.
get
(
'pictorial_id'
,
None
)
try
:
self
.
rpc
[
'venus/sun/reply/manage/batch/move'
](
ids
=
ids
,
topic_id
=
topic_id
,
pictorial_id
=
pictorial_id
)
.
unwrap
()
except
Exception
as
e
:
error_logger
.
error
(
u'平移reply失败
%
s'
%
(
e
))
raise
return
{
"message"
:
'更新成功'
,
}
api/urls.py
View file @
03669c34
...
@@ -151,6 +151,7 @@ urlpatterns = [
...
@@ -151,6 +151,7 @@ urlpatterns = [
url
(
r'^pictorial/feed/list$'
,
PictorialFeedlListView
.
as_view
()),
url
(
r'^pictorial/feed/list$'
,
PictorialFeedlListView
.
as_view
()),
url
(
r'^pictorial/feed/rank$'
,
PictorialFeedlRank
.
as_view
()),
url
(
r'^pictorial/feed/rank$'
,
PictorialFeedlRank
.
as_view
()),
url
(
r'^pictorial/feed/delete$'
,
PictorialFeedDelete
.
as_view
()),
url
(
r'^pictorial/feed/delete$'
,
PictorialFeedDelete
.
as_view
()),
url
(
r'^pictorial/topic/list$'
,
PictorialTopicList
.
as_view
()),
#运营位
#运营位
url
(
r'^topic/home_recommend/list'
,
TopicHomeRecommendList
.
as_view
()),
url
(
r'^topic/home_recommend/list'
,
TopicHomeRecommendList
.
as_view
()),
...
...
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