>分类列表,获取顶级菜单
~~~[api]
get:/index.php/goods/Apiclass/getTopMenuList
int:num=0#获取菜单的个数 ,0或者不填表示获取全部
string:sort=order_num #排序字段
string:sort_type= desc#排序类型
int:mall_model_id=1#商城id,如果有多个商城需要填写商城id
<<<
success
{
"err": 0,
"count": 2,
"data": [
{
"id": 10,
"title": "语文",
"en_title": "Chinese",
"ico": "http://open.cowcms.com/Public/css_js_font_img/plugg/img/logo.png",
"order_num": 0,
"parent_id": 0
},
{
"id": 11,
"title": "数学",
"en_title": "Maths",
"ico": "http://open.cowcms.com/Public/css_js_font_img/plugg/img/logo.png",
"order_num": 0,
"parent_id": 0
}
]
}
<<<
error
{
"err": 1,
"code": 1000,
"content": "错误信息"
}
~~~
>分类多级列表,获取带子集的分类列表或者获取某个分类下的子分类
~~~[api]
get:/index.php/goods/Apiclass/getMenuList
int:parent_id=0#顶级分类id,0或者不填表示所有的分类
int:num=0#获取菜单的顶级个数 ,0或者不填表示获取全部
int:level=0#获取菜单层数 ,0或者不填表示获取全部
string:sort=order_num #排序字段
string:sort_type= desc#排序类型
<<<
success
{
"err": 0,
"count": 2,
"data": [
{
"id": 10,
"title": "语文",
"en_title": "Chinese",
"ico": "http://open.cowcms.com/Public/css_js_font_img/plugg/img/logo.png",
"order_num": 0,
"parent_id": 0,
"sub": [
{
"id": 12,
"title": "作文",
"en_title": "Composition",
"ico": "http://open.cowcms.com/Public/css_js_font_img/plugg/img/logo.png",
"order_num": 0,
"parent_id": 10,
"sub": [ ]
},
{
"id": 13,
"title": "诗词",
"en_title": "Poetry",
"ico": "http://open.cowcms.com/Public/css_js_font_img/plugg/img/logo.png",
"order_num": 0,
"parent_id": 10,
"sub": [ ]
}
]
},
{
"id": 11,
"title": "数学",
"en_title": "Maths",
"ico": "http://open.cowcms.com/Public/css_js_font_img/plugg/img/logo.png",
"order_num": 0,
"parent_id": 0
}
]
}
<<<
error
{
"err": 1,
"code": 1000,
"content": "错误信息"
}
~~~
>获取分类详细信息
~~~[api]
get:/index.php/goods/Apiclass/getInfo
*int:id=1#分类id
<<<
success
{
"err": 0,
"data": {
"id": 10,
"title": "语文",
"en_title": "Chinese",
"ico": "http://open.cowcms.com/Public/css_js_font_img/plugg/img/logo.png",
"order_num": 0,
"status": 0,
"parent_id": 0
}
}
<<<
error
{
"err": 1,
"code": 1000,
"content": "错误信息"
}
~~~
>产品列表
~~~[api]
get:/index.php/goods/Apigoods/getList
int:pagesize=10#每页显示个数
int:page=1#显示页码数
string:between_price= #价格区间 如100-200
string:keyword= #检索的关键字
string:sort= id #排序字段
string:sort_type= asc#排序类型
int:parent_id=1#产品分类id
int:mall_model_id=1#商城id,如果有多个商城需要填写商城id
<<<
success
{
"err": 0,
"page": 1,
"pageTotal": 10,
"pageSize": 10,
"count": 1,
"data": [
{
"id": 10,
"title": "产品名称",
"thumb": "http://open.cowcms.com/Public/css_js_font_img/plugg/img/logo.png",
"shelves": 1,
"price": 100,
"inventory": 10,
"coding": "商品编号",
"goods_type": 1,
"addtime": 12345678910,
"shop_info": {
"id": 10,
"title": "商城名称",
"thumb": "http://open.cowcms.com/Public/css_js_font_img/plugg/img/logo.png"
},
"publisher": {
"id": 10,
"headPath": "http://open.cowcms.com/Public/css_js_font_img/plugg/img/logo.png",
"name": "奶牛COWCMS"
},
"class": {
"id": 10,
"title": "分类名称",
"thumb": "http://open.cowcms.com/Public/css_js_font_img/plugg/img/logo.png"
}
}
]
}
<<<
error
{
"err": 1,
"code": 1000,
"content": "错误信息"
}
~~~
>获取登录会员可兑换或者可购买的产品列表
~~~[api]
get:/index.php/goods/Apigoods/getList_buy
int:num=4#显示个数
string:between_price= #价格区间 如100-200
string:keyword= #检索的关键字
string:sort= price #排序字段
string:sort_type= desc#排序类型
int:parent_id=0#产品分类id
int:mall_model_id=1#商城id,如果有多个商城需要填写商城id
<<<
success
{
"err": 0,
"count": 1,
"data": [
{
"id": 10,
"title": "产品名称",
"thumb": "http://open.cowcms.com/Public/css_js_font_img/plugg/img/logo.png",
"shelves": 1,
"price": 100,
"inventory": 10,
"coding": "商品编号",
"goods_type": 1,
"addtime": 12345678910,
"shop_info": {
"id": 10,
"title": "商城名称",
"thumb": "http://open.cowcms.com/Public/css_js_font_img/plugg/img/logo.png"
},
"publisher": {
"id": 10,
"headPath": "http://open.cowcms.com/Public/css_js_font_img/plugg/img/logo.png",
"name": "奶牛COWCMS"
},
"class": {
"id": 10,
"title": "分类名称",
"thumb": "http://open.cowcms.com/Public/css_js_font_img/plugg/img/logo.png"
}
}
]
}
<<<
error
{
"err": 1,
"code": 1000,
"content": "错误信息"
}
~~~
>产品详情信息
~~~[api]
get:/index.php/goods/Apigoods/getInfo
*int:id=1#课程id
*int:mall_model_id=1#商城id,如果有多个商城需要填写商城id
<<<
success
{
"err": 0,
"data": {
"id": 10,
"title": "产品名称",
"thumb": "http://open.cowcms.com/Public/css_js_font_img/plugg/img/logo.png",
"shelves": 1,
"price": 100,
"inventory": 10,
"coding": "商品编号",
"content": "课程内容",
"parameter": "产品规格:100x200x10",
"packaging": "售后包装",
"goods_type": 1,
"addtime": 12345678910,
"shop_info": {
"id": 10,
"title": "商城名称",
"thumb": "http://open.cowcms.com/Public/css_js_font_img/plugg/img/logo.png"
},
"property": [
{
"name": "颜色",
"val": [ "红色", "白色" ]
},
{
"name": "尺码",
"val": [ "XL", "ML" ]
}
],
"property_price": {
"0_0|1_0": {
"price": "11",
"inventory": "22"
}
},
"publisher": {
"id": 1,
"headPath": "http://open.cowcms.com/Public/css_js_font_img/plugg/img/logo.png",
"name": "奶牛COWCMS"
},
"class": {
"id": 10,
"title": "分类名称",
"thumb": "http://open.cowcms.com/Public/css_js_font_img/plugg/img/logo.png"
}
}
}
<<<
error
{
"err": 1,
"code": 1000,
"content": "错误信息"
}
~~~