>分類列表,獲取頂級分類
~~~[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": "錯誤信息"
}
~~~