Commit dfda2032 authored by 杨成林's avatar 杨成林

Merge branch 'ycl/kyc_pictorial' into 'test'

ycl/kyc_pictorial

See merge request !220
parents ee4d50fb 4bbb954a
...@@ -45,18 +45,19 @@ class WordParentCreateView(APIView): ...@@ -45,18 +45,19 @@ class WordParentCreateView(APIView):
class WordParentUpdateView(APIView): class WordParentUpdateView(APIView):
def post(self, request): def post(self, request):
id_ = request.POST.get('id', None)
name = request.POST.get('name', None)
children_words = json.loads(request.POST.get('children_words', '[]'))
content_ad = request.POST.get('content_ad', None)
makeup_ad = request.POST.get('makeup_ad', None)
dress_ad = request.POST.get('dress_ad', None)
gender = request.POST.get('gender', None)
if not id_:
return r'缺少参数'
data = self.rpc['venus/sun/word_parent/edit'](id_=id_, name=name, children_words=children_words, content_ad=content_ad, makeup_ad=makeup_ad, dress_ad=dress_ad, gender=gender).unwrap() data = {}
data["id"] = request.POST.get('id', None)
data["name"] = request.POST.get('name', None)
data["children_words"] = json.loads(request.POST.get('children_words', '[]'))
data["content_ad"] = request.POST.get('content_ad', None)
data["makeup_ad"] = request.POST.get('makeup_ad', None)
data["dress_ad"] = request.POST.get('dress_ad', None)
data["gender"] = request.POST.get('gender', None)
data["makeup_pictorial_ids"] = json.loads(request.POST.get('makeup_pictorial_ids', []))
data["clothing_pictorial_ids"] = json(request.POST.get('clothing_pictorial_ids', []))
data = self.rpc['venus/sun/word_parent/edit'](data=data).unwrap()
if not data: if not data:
return r'更新失败' return r'更新失败'
......
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