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
6351ac53
Commit
6351ac53
authored
Jul 05, 2019
by
haowang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add product effect list api
parent
1f66e433
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
0 deletions
+18
-0
effect.py
api/effect.py
+14
-0
urls.py
api/urls.py
+4
-0
No files found.
api/effect.py
0 → 100644
View file @
6351ac53
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
api/urls.py
View file @
6351ac53
...
...
@@ -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
()),
]
...
...
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