🔥码云GVP开源项目 12k star Uniapp+ElementUI 功能强大 支持多语言、二开方便! 广告
[TOC] ## 分类信息 ~~~[api] post:/goodstype/info *int:id=默认值1#分类id <<< success { "code": 0, "info": "成功", "data":{ "id": 1, "title": "测试名称", "state": 1, "is_work": 0 } } <<< error ~~~ ## 分类列表 ~~~[api] post:/goodstype/getlist *int:page=1#页码 *int:limit=10#每页显示个数 string:key=id#排序字段名 string:order=normal#排序方式 <<< success { "code": 0, "info": "成功", "data":[ { "id": 1, "title": "测试名称", "state": 1, "is_work": 0 }, { "id": 2, "title": "测试名称2", "state": 1, "is_work": 0 } ] } <<< error ~~~ ## 添加分类 ~~~[api] post:/goodstype/add *string:title=张三#分类名称 *int:is_work=1#售后待办 0-否,1-是 <<< success { "code": 0, "info": "成功", "data":{ "title": "测试名称", "id": "1" } } <<< error ~~~ ## 编辑分类 ~~~[api] post:/goodstype/edit *int:id=1000#分类Id *string:title=张三#分类名称 *int:is_work=1#售后待办 0-否,1-是 *int:state=1#状态 0-停业,1-营业 <<< success { "code": 0, "info": "成功", "data":{ "title": "测试名称", "id": "1", "state": "0", "is_work": "1" } } <<< error ~~~ ## 删除分类 ~~~[api] post:/goodstype/del *int:id=1000#分类Id <<< success { "code": 0, "info": "成功", "data": 0 } <<< error { "code": 12002, "info": "该分类下有商品,不能删除", "data": 0 } ~~~