Commit 6351ac53 authored by haowang's avatar haowang

add product effect list api

parent 1f66e433
import json
from utils.base import APIView, get_offset_count
from utils.logger import error_logger
class EffectListView(APIView):
def get(self, request):
offset, count = get_offset_count(request)
cn_name = request.GET.get('cn_name')
data = self.rpc['neptune/commodity/effect/list'](
offset=offset, count=count, cn_name=cn_name).unwrap()
return data
......@@ -30,6 +30,7 @@ from .brand import *
from .product import *
from .category import *
from .classify import *
from .effect import *
urlpatterns = [
......@@ -209,6 +210,9 @@ urlpatterns = [
# 商品分类
url(r'^classify/list$', ClassifyListView.as_view()),
# 商品功效
url(r'^effect/list$', EffectListView.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