Commit ff5d5136 authored by 王浩's avatar 王浩

Merge branch 'haow/dev' into 'dev'

modify product list response

See merge request alpha/sun!226
parents 1fbd549f 0d6aa3bb
......@@ -10,12 +10,13 @@ class PictorialListView(APIView):
offset = int(request.GET.get('page', 1))
limit = int(request.GET.get('limit', 10))
filters = self.handle_filter(request.GET.get('filter', '{}'))
product_id = request.GET.get('product_id')
if star_id:
filters.update({'star_id': star_id})
if user_id:
filters.update({'user_id': user_id})
try:
data = self.rpc['venus/sun/pictorial/list'](filters=filters, offset=(offset-1)*limit, limit=limit).unwrap()
data = self.rpc['venus/sun/pictorial/list'](filters=filters, offset=(offset-1)*limit, limit=limit, product_id=product_id).unwrap()
except Exception as e:
error_logger.error(u'获取画报列表失败%s' , e)
raise
......
......@@ -83,7 +83,7 @@ class ProductListView(APIView):
has_image=has_image, brand_id=brand_id, category_id=category_id, price_low=price_low, price_high=price_high,
grade_low=grade_low, grade_high=grade_high, comment_nums_low=comment_nums_low, comment_nums_high=comment_nums_high).unwrap()
result = {
'data': data,
'list': data,
'total': count,
}
return result
......
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