Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
S
sun
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
alpha
sun
Commits
4bbb954a
Commit
4bbb954a
authored
Jul 01, 2019
by
yangchenglin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ycl/kyc_pictorial
parent
1ead0077
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
11 deletions
+12
-11
word_parent.py
api/word_parent.py
+12
-11
No files found.
api/word_parent.py
View file @
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'更新失败'
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment