Commit 03669c34 authored by 王浩's avatar 王浩

Merge branch 'haow/dev' into 'test'

fix code

See merge request alpha/sun!290
parents b97e7720 dedc177b
......@@ -147,3 +147,19 @@ class PictorialFeedDelete(APIView):
return {
'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
......@@ -187,3 +187,20 @@ class ReplyManageBatchUpdate(APIView):
return {
"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": '更新成功',
}
......@@ -151,6 +151,7 @@ urlpatterns = [
url(r'^pictorial/feed/list$', PictorialFeedlListView.as_view()),
url(r'^pictorial/feed/rank$', PictorialFeedlRank.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()),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment