🔥码云GVP开源项目 12k star Uniapp+ElementUI 功能强大 支持多语言、二开方便! 广告
#### 列表 ~~~[api] get:/admin/template/parameter/index string:search#搜索关键词 number:cateId#分类ID number:p=1#当前页数 number:ps=20#分页大小 <<< success { "code": 1, "msg": "", "time": "2018-08-09 11:47:14", "data": [ { "id": 1, "cate_id": 1, "name": "参数1", "type": 2, "default_values": false, "sort": 0, "status": 1, "created_at": "2018-08-09 11:44:08", "updated_at": "2018-08-09 11:46:10", "type_text": "多行文本", "status_text": "正常" } ], "_meta": { "totalCount": 1, "pageCount": 1, "currentPage": 1, "perPage": 20 } } ~~~ #### 详情 ~~~[api] get:/admin/template/parameter/retrieve/id/:id <<< success { "code": 1, "msg": "", "time": "2018-08-09 11:46:32", "data": { "id": 1, "cate_id": 1, "name": "参数1", "type": 2, "default_values": false, "sort": 0, "status": 1, "created_at": "2018-08-09 11:44:08", "updated_at": "2018-08-09 11:46:10", "type_text": "多行文本", "status_text": "正常", "cate_parent_id_path": "0_1" } } ~~~ #### 创建 ~~~[api] post:/admin/template/parameter/create *number:cate_id#分类ID *string:name#名称 *number:type#属性值类型(录入方式),1=>单行文本,2=>多行文本,3=>单选,4=>多选 array:default_values#默认值(单选和多选需要填入) number:sort=0#排序 number:status=1#状态,0=>禁用,1=>启用 <<< success { "code": 1, "msg": "success", "time": "2017-12-28 13:05:15", "data": [] } <<< example { "cate_id": 1, "stores_id": 2, "name": "网络制式", "type": "3", "default_values": ["全网通4G", "电信4G", "联通4G"] } ~~~ #### 更新 ~~~[api] post:/admin/template/parameter/update/id/:id string:name#名称 number:type#属性值类型(录入方式),1=>单行文本,2=>多行文本,3=>单选,4=>多选 array:default_values#默认值(单选和多选需要填入) number:sort=0#排序 number:status=1#状态,0=>禁用,1=>启用 <<< success { "code": 1, "msg": "success", "time": "2018-01-03 21:58:03", "data": [] } ~~~ #### 删除 ~~~[api] post:/admin/template/parameter/delete/id/:id <<< success { "code": 1, "msg": "success", "time": "2017-12-28 13:05:15", "data": [] } ~~~