URL
method
step == 1
postData
csrf_token
mobile
手机号码
type = text
length = 11
require
captcha
短信验证码
type = text
length = 6
require
return
成功
失败
{"success": false, "message": ""}
step == 2
postData
csrf_token
password
密码
type = password
length = [6, 32]
require
需将用户的密码md5两次
confirm_password
确认密码
type = password
length = [6, 32]
require
需将用户的密码md5两次, 且与password相等
return
成功
{"status": true, "user": {"username": "", "mobile": ""}}
失败
{"status": false, "message": ""}
URL
method
postData
csrf_token
username
用户名 (手机号码 或 邮箱)
type = text
require
password
密码
type = password
require
需将用户密码md5两次
remember
return
成功
{"status": true, "user": {"username": "", "mobile": "", "email": ""}}
失败
{"status": false, "message": ""}
URL
method
step == 1
postData
csrf_token
mobile
手机号码
type = text
length = 11
require
captcha
短信验证码
type = text
length = 6
require
return
成功
失败
{"success": false, "message": ""}
step == 2
postData
csrf_token
password
密码
type = password
length = [6, 32]
require
需将用户的密码md5两次
confirm_password
确认密码
type = password
length = [6, 32]
require
需将用户的密码md5两次, 且与password相等
return
成功
{"status": true, "user": {"username": "", "mobile": ""}}
失败
{"status": false, "message": ""}
URL
method
parameters
page
item: item id, 仅POST, DELETE方式需要
return
GET
{"collections": [{"item": "", "price": "", "item_id": "", "deleted": "", "image_url": "", "is_suite": ""}], "amount": "", "page": "", "pages": ""}
amount
page
pages
POST
{"success": false, "message": "该商品不存在"}
{"success": true}
DELETE
URL
method
parameters
type = USER_USERNAME_SETTING
postData
return
成功
失败
{"success": false, "message": ""}
URL
method
parameters
type = USER_EMAIL_SETTING
postData
return
成功
失败
{"success": false, "message": ""}
URL
method
parameters
type = USER_PASSWORD_SETTING
postData
old_password
password
confirm_password
return
成功
失败
{"success": false, "message": ""}
URL
method
return
已登录
{"logined": true, "username": "", "mobile": "", "email": "", "username_revisable": "", "email_confirmed": ""}
未登录
URL
method
return
items列表长度正常情况下为8 (但是有可能商品数量确实不够的情况...)
{
"id1" : {
"scene" : " " ,
"items" : [
{"id" : " " , "item" : " " , "price" : " " , "image_url" : " " , "is_suite" : true },
{"id" : " " , "item" : " " , "price" : " " , "image_url" : " " , "is_suite" : false }
]
},
"id2" : {
"scene" : " " ,
"items" : [
{"id" : " " , "item" : " " , "price" : " " , "image_url" : " " , "is_suite" : true },
{"id" : " " , "item" : " " , "price" : " " , "image_url" : " " , "is_suite" : false }
]
},
"id3" : {
"scene" : " " ,
"items" : [
{"id" : " " , "item" : " " , "price" : " " , "image_url" : " " , "is_suite" : true },
{"id" : " " , "item" : " " , "price" : " " , "image_url" : " " , "is_suite" : false }
]
}
}
URL
method
parameters
format
若format != json, 返回html(brands.html)
若format == json, 返回json
return
{
"id1" : {
"brand" : " " ,
"items" : [
{"id" : " " , "item" : " " , "price" : " " , "image_url" : " " , "is_suite" : true },
{"id" : " " , "item" : " " , "price" : " " , "image_url" : " " , "is_suite" : false }
]
},
"id2" : {
"brand" : " " ,
"items" : [
{"id" : " " , "item" : " " , "price" : " " , "image_url" : " " , "is_suite" : true },
{"id" : " " , "item" : " " , "price" : " " , "image_url" : " " , "is_suite" : false }
]
}
}
URL
method
parameters
format
若format != json, 返回html(brand_detail.html)
若format == json, 返回json
return
{
"id1" : {
"scene" : " " ,
"items" : [
{"id" : " " , "item" : " " , "price" : " " , "image_url" : " " , "is_suite" : true },
{"id" : " " , "item" : " " , "price" : " " , "image_url" : " " , "is_suite" : false }
]
},
"id2" : {
"scene" : " " ,
"items" : [
{"id" : " " , "item" : " " , "price" : " " , "image_url" : " " , "is_suite" : true },
{"id" : " " , "item" : " " , "price" : " " , "image_url" : " " , "is_suite" : false }
]
}
}
URL
method
parameters
format
若format != json, 返回html(furniture.html)
若format == json, 返回json
return
{
"id1" : {
"style" : " " ,
"items" : [
{"id" : " " , "item" : " " , "price" : " " , "image_url" : " " , "is_suite" : true },
{"id" : " " , "item" : " " , "price" : " " , "image_url" : " " , "is_suite" : false }
]
},
"id2" : {
"style" : " " ,
"items" : [
{"id" : " " , "item" : " " , "price" : " " , "image_url" : " " , "is_suite" : true },
{"id" : " " , "item" : " " , "price" : " " , "image_url" : " " , "is_suite" : false }
]
}
}
URL
method
postData
csrf_token
feedback
contact
return
{"success": true}
{"success": false, "message": ""}
URL
method
parameters
page
brand
material
style
scene
category
search
price
价格 index(6个选项的索引值)
value = [0, 5]
order
按照价格排序
value = "desc" or "asc"
return
filters
available
可选条件
brand
category
material
scene
style
price
selected
已选条件
结构与available相同, 单个筛选条件(除category)只会在available或selected其中之一出现
category为分级筛选, 选择第一级条件后, 会返回第二级条件
items
amount
page
pages
search
order
排序方式(按照价格)
value = "asc" or "desc" or null(未排序)
query
id
item
price
image_url
is_suite
{
"filters" : {
"available" : {
"brand" : {
"id1" : {"brand" : " " },
"id2" : {"brand" : " " }
},
"category" : {
"id1" : {"category" : " " },
"id2" : {"category" : " " }
},
"material" : {
"id1" : {"material" : " " },
"id2" : {"material" : " " }
},
"scene" : {
"id1" : {"scene" : " " },
"id2" : {"scene" : " " }
},
"style" : {
"id1" : {"style" : " " },
"id2" : {"sty;e" : " " }
},
"price" : {
"price1" : {"price" : " " },
"price2" : {"price" : " " }
}
},
"selected" : {
"category" : {
"id" : {
"category" : " " ,
"children" : {
"id" : {
"category" : " "
}
}
}
}
}
},
"items" : {
"amount" : " " ,
"page" : " " ,
"pages" : " " ,
"search" : " " ,
"order" : " " ,
"query" : [
{"id" : " " , "item" : " " , "price" : " " , "image_url" : " " , "is_suite" : false },
{"id" : " " , "item" : " " , "price" : " " , "image_url" : " " , "is_suite" : true }
]
}
}
URL
method
parameters
format
若format != json, 返回html
若format == json && action == detail, 返回商品详情
若format == json && action != detail, 返回商品对比详情
return
format == json && action != detail
{"id": "", "item": "", "price": "", "second_material": "", "category": "", "second_scene": "", "outside_sand": "", "inside_sand": "", "size": "", "area": "", "stove": "", "carve_type": "", "carve": [""], "tenon": [""], "paint": "", "decoration": "", "story": "", "image_url": "", "brand": ""}
id
item
price
second_material
category
scene
outside_sand
inside_sand
size
area
stove
paint
decoration
carve
carve_type
tenon
story
image_url
brand
is_suite
format == json && action == detail
item object(单件 )
id
vendor_id
厂家 id
brand
item
price
size
area
second_material
category
scene
stove
outside_sand
inside_sand
paint
decoration
style
images
is_suite
is_component
item object(套件 )
id
vendor_id
brand
item
area
price
second_material
scene
style
outside_sand
inside_sand
stove
amount
images
components
is_suite
item object(组件 )
item
size
area
category
carve
tenon
paint
decoration
amount
is_component
{
"item" : {
"collected" : "" , // true or false
// 单件
"id" : "" ,
"item" : "" ,
"vendor_id" : "" ,
"brand" : "" ,
"price" : "" ,
"second_material" : "" ,
"category" : "" ,
"scene" : "" ,
"style" : "" ,
"outside_sand" : "" ,
"inside_sand" : "" ,
"size" : "" ,
"area" : "" ,
"stove" : "" ,
"paint" : "" ,
"decoration" : "" ,
"carve" : [ "" , "" ] ,
"carve_type" : "" ,
"tenon" : [ "" , "" ] , // 榫卯结构为选填, 可能为[]
"images" : [ "" , "" ] ,
"is_suite" : false ,
// 套件
"id" : "" ,
"item" : "" ,
"vendor_id" : "" ,
"brand" : "" ,
"price" : "" ,
"second_material" : "" ,
"scene" : "" ,
"style" : "" ,
"outside_sand" : "" ,
"inside_sand" : "" ,
"area" : "" ,
"stove" : "" ,
"carve_type" : "" ,
"amount" : "" ,
"images" : [ "" , "" ] ,
"is_suite" : true ,
"components" : [
{
"item" : "" ,
"category" : "" ,
"area" : "" ,
"size" : "" ,
"paint" : "" ,
"decoration" : "" ,
"carve" : [ "" , "" ] ,
"tenon" : [ "" , "" ] , // 榫卯结构为选填, 可能为[]
"amount" : "" ,
"is_component" : true
} ,
]
} ,
"distributors" : {
"id1" : {
"area" : "" ,
"children" : {
"id2" : {
"area" : "" ,
"children" : {
"id3" : {
"area" : "" ,
"distributors" : {
"id5" : {
"name" : "xxx体验馆" ,
"ext_number" : ""
} ,
"id6" : {
"name" : "xxx体验馆" ,
"ext_number" : ""
} ,
}
}
}
}
}
}
}
}
URL
method
postData
name
商家名称
type = text
required
password
密码
type = password
required
confirmed_password
确认密码
type = password
required
contact
联系人姓名
type = text
required
contact_mobile
联系人手机
type = text
required
contact_telephone
district_cn_id
address
详细地址
type = text
required
URL
method
postData
password
confirm_password
确认密码
type = text
required
email
agent_name
代理人姓名
type = text
required
agent_identity
代理人身份证号
type = text
required
agent_identity_front
代理人身份证正面照片
type = img
required
agent_identity_back
代理人身份证反面照片
type = img
required
name
厂家名称
type = text
required
license_limit
营业执照期限
type = text
required
license_image
营业执照照片
type = img
required
telephone
address
详细地址
type = text
required
district_cn_id
区域的cn_id
type = text
required
URL
method
postData
mobile
手机号码
type = text
required
password
密码
type = text
required
需要md5两次
URL
/vendor/items?draw=&start=&length=
method
paramaters
URL
/vendor/items/new_item?type=single
method
postData
item
商品名称
type = text
required
length
商品长度
type = text
商品长宽高与适用面积二选其一
商品长宽高只能全部填写或全不填写
width
heigth
area
商品适用面积
type = text
商品适用面积与长宽高二选其一
price
商品指导价格
type = text
required
second_material_id
商品二级材料id
type = text
required
category_id
商品分类id
type = text
required
stove_id
烘干工艺id
type = text
required
carve_id
雕刻工艺id
type = text
required
carve_type_id
雕刻方式id
type = text
requid
outside_sand_id
外表面打磨砂纸id
type = text
required
inside_sand_id
paint_id
涂饰工艺id
type = text
required
decoration_id
装饰工艺id
type = text
required
tenon_id
榫卯结构id
type = text
required
story
URL
/vendor/items/new_item?type=suite
method
postData
item
套件名称
type = text
required
area
price
商品指导价格
type = text
required
second_material_id
商品二级材料id
type = text
required
category_id
商品分类id
type = text
required
scene_id
二级场景id
type = text
required
stove_id
烘干工艺id
type = text
required
carve_id
雕刻工艺id
type = text
required
carve_type_id
雕刻方式id
type = text
required
outside_sand_id
外表面打磨砂纸id
type = text
required
inside_sand_id
story
components
包含组件信息列表的字符串
"{'components': ['component': '', 'length': '', 'width': '', 'height': '', 'area': '', 'category_id': '', 'carve_id': '', 'paint_id': '', 'decoration_id': '', 'tenon_id': '', 'amount': '']}"
required
component
组件名称
type = text
required
length
组件长度
type = text
组件长宽高与适用面积二选其一
组件长宽高只能全部填写或全不填写
width
height
area
组件适用面积
type = text
组件适用面积与长宽高二选其一
category_id
组件种类id
type = text
required
carve_id
雕刻id
type = text
required
decoration_id
装饰工艺id
type = text
required
tenon_id
榫卯结构id
type = text
required
amount
组件数量
type = text
required
URL
method
parameters
item: item id
Item Form
item:
商品名称
require
length: [1, 20]
length
width
height
price
material_id
second_category_id
stove_id
carve_id
sand_id
paint_id
decoration_id
tenon_id
story
URL
/vendor/items/oss_signature
method
parameters
return
成功
{"success": true, "url": "", "params": {"key": "", "OSSAccessKeyId": "", "Signature": "", "callback": "", "policy": ""}
url
ajax请求的url. 请求此url成功上传后, OSS会回调万木家的接口, 并将万木家返回的信息返回给前端
params
失败
URL
vendor oss signature
返回的url
/vendor/items/image
method
PUT image
postData
return
{"success": true, "image": {"url": "", "hash": "", "created": ""}}
DELETE image
vendor distributor detail
URL
/vendor/distributors/<distributor_id>
method
vendor distributor invitation
URL
/vendor/distributors/invitation
method
vendor distributors revocation
URL
/distributors/<int:distributor_id>/revocation
method
URL
/privilege/vendor_confirm
method
URL
/privilege/vendor_confirm/reject
method
postData
URL
/privilege/vendor_confirm/pass
method
postData
URL
/privilege/distributors/revocation
method
postData
distributor_revocation_id
revocation_confirm
URL
method
postData
csrf_token
username
password
records = [
{
"item" : "" ,
"brand" : "" ,
"distributor" : "" ,
"distributor_address" : "" ,
"distributor_telephone" : "" ,
"distributor_mobile" : "" ,
"mobile" : "" ,
"created" : "" ,
"item_url" : ""
}
]
URL
/service/mobile_register_sms
method
postData
return
成功
失败
{"success": false, "message": ""}
URL
method
parametes
type
USER_RESET_PASSWORD
USER_GUIDE
postData
type == USER_RESET_PASSWORD
type == USER_GUIDE
csrf_token
item_id
distributor_id
mobile
captcha
mobile sms login required
URL
/service/mobile_sms_login_required
method
parameters
type
USER_SMS_CAPTCHA(适用于用户修改用户名/密码/email)
postData
URL
method
parameters
type (以下之一)
USER_REGISTER
USER_EMAIL_CONFIRM
USER_RESET_PASSWORD
VENDOR_EMAIL_CONFIRM
postData
USER_REGISTER
USER_EMAIL_CONFIRM
USER_RESET_PASSWORD
VENDOR_EMAIL_CONFIRM
return
成功
失败
{"success": false, "message": ""}
URL
/service/<string:token>.jpg
method
return
URL
mehtod
return
json
{"A": {"ankang": {"city": "安康", "dist_count": "5"}}}