Commit a59683e8 authored by 王浩's avatar 王浩

Merge branch 'haow/dev' into 'dev'

add info in product info api

See merge request alpha/sun!228
parents bde8acc8 1f66e433
......@@ -129,6 +129,8 @@ class ProductInfoView(APIView):
brand_info = self.rpc['neptune/commodity/brand/infos'](product_id=id_).unwrap()
data['brand_name'] = brand_info[0].get('cn_name') if brand_info else ''
classify_infos = self.rpc['neptune/commodity/classify/infos'](product_ids=[id_]).unwrap()
data['classify_names'] = [obj.get('cn_name') for obj in classify_infos]
data['category_names'] = self.get_category_names(id_)
data['effect_names'] = self.get_effect_names(id_)
......
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