Commit 1f66e433 authored by haowang's avatar haowang

add info in product info api

parent 600e008f
......@@ -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