>分类列表,获取顶级分类
~~~[api]
get:/index.php/helper/Apiclass/getTopMenuList
int:num=0#获取分类的个数 ,0或者不填表示获取全部
<<<
success
{
"err": 0,
"count": 2,
"data": [
{
"id": 10,
"title": "api帮助文档",
"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/helper/Apiclass/getMenuList
int:parent_id=0#顶级分类id,0或者不填表示所有的分类
int:num=0#获取菜单的顶级个数 ,0或者不填表示获取全部
int:level=0#获取菜单层数 ,0或者不填表示获取全部
<<<
success
{
"err": 0,
"count": 2,
"data": [
{
"id": 10,
"title": "api帮助文档",
"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": "php开发api",
"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": "c语言开发api",
"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/helper/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/helper/Apihelper/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
<<<
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",
"describe": "描述",
"parent_id": 100,
"order_num": 10,
"browse_num": 10,
"addtime": 12346678910,
"publisher": {
"id": 10,
"name": "小怪兽123",
"headPath": "http://open.cowcms.com/Public/css_js_font_img/plugg/img/logo.png"
}
}
]
}
<<<
error
{
"err": 1,
"code": 1000,
"content": "错误信息"
}
~~~
>获取文章详情
~~~[api]
get:/index.php/helper/Apihelper/getInfo
*int:id=1#文章id
<<<
success
{
"err": 0,
"data": {
"id": 10,
"title": "帮助名称",
"thumb": "http://open.cowcms.com/Public/css_js_font_img/plugg/img/logo.png",
"describe": "描述",
"parent_id": 100,
"order_num": 10,
"browse_num": 10,
"follow_num": 10,
"url": "http://open.cowcms.com/",
"addtime": 12346678910,
"content": "文章内容",
"publisher": {
"id": 10,
"name": "小怪兽123",
"headPath": "http://open.cowcms.com/Public/css_js_font_img/plugg/img/logo.png"
}
}
}
<<<
error
{
"err": 1,
"code": 1000,
"content": "错误信息"
}
~~~