多应用+插件架构,代码干净,二开方便,首家独创一键云编译技术,文档视频完善,免费商用码云13.8K 广告
#### 列表 ~~~[api] get:/admin/template/index/index string:search#搜索关键词 string:status=all#状态,all=>全部,onSale=>已上架,offSale=>已下架,saled=>已售完 number:cateId#分类ID number:brandsId#品牌ID number:p=1#当前页数 numbner:ps=20#分页大小 <<< success { "code": 1, "msg": "", "time": "2018-08-09 10:56:00", "data": [ { "id": 1, "cate_id": 1, "brands_id": 0, "name": "商品", "weight": 0, "volume": 0, "thumb": "http://oss.dgyouduo.com/static/img/no-image.png", "banner": [ "http://oss.dgyouduo.com/static/img/no-image-16x10.png" ], "summary": "", "price": "100.00", "market_price": "200.00", "inventory": 100, "view_count": 0, "sale_count": 0, "sort": 0, "is_free_shipping": 0, "is_hot": 0, "is_new": 0, "is_real": 1, "is_sale": 0, "is_trash": 0, "status": 1, "created_at": "2018-08-09 09:56:42", "updated_at": "2018-08-09 10:55:05", "saled_at": "2016-01-01 00:00:00", "status_text": "正常" } ], "_meta": { "totalCount": 1, "pageCount": 1, "currentPage": 1, "perPage": 20 } } ~~~ #### 详情 ~~~[api] get:/admin/template/index/retrieve/id/:id <<< success { "code": 1, "msg": "", "time": "2018-08-09 10:54:38", "data": { "id": 1, "cate_id": 1, "brands_id": 0, "name": "商品", "weight": 0, "volume": 0, "thumb": "http://oss.dgyouduo.com/static/img/no-image.png", "banner": [ "http://oss.dgyouduo.com/static/img/no-image-16x10.png" ], "summary": "", "content": "", "price": "100.00", "market_price": "200.00", "inventory": 100, "view_count": 0, "sale_count": 0, "sort": 0, "is_free_shipping": 0, "is_hot": 0, "is_new": 0, "is_real": 1, "is_sale": 0, "status": 1, "created_at": "2018-08-09 09:56:42", "updated_at": "2018-08-09 10:40:05", "saled_at": "2016-01-01 00:00:00", "status_text": "正常", "cate_parent_id_path": "0_1" } } ~~~ #### 创建 ~~~[api] post:/admin/template/index/create *number:cate_id#分类ID number:brands_id#品牌ID *string:name#名称 float:weight#重量(kg) float:volume#体积(m³) string:thumb=http://oss.dgyouduo.com/static/img/no-image.png#缩略图 string:banner#横幅(轮播图) string:summary#摘要 string:content#内容 *float:price#普通价格 *float:market_price#市场价格 *number:inventory#库存 number:sort=0#排序 number:is_free_shipping=0#是否包邮 number:is_real=1#是否实体商品 number:is_sale=0#是否上架 number:status=1#状态,0=>禁用,1=>启用 <<< success { "code": 1, "msg": "success", "time": "2018-01-03 21:04:36", "data": { "id": 1 } } ~~~ #### 更新 ~~~[api] post:/admin/template/index/update/id/:id number:cate_id#分类ID number:brands_id#品牌ID string:name#名称 float:weight#重量(kg) float:volume#体积(m³) string:thumb=http://oss.dgyouduo.com/static/img/no-image.png#缩略图 string:banner#横幅(轮播图) string:summary#摘要 string:content#内容 float:price#普通价格 float:market_price#市场价格 number:inventory#库存 number:sort=0#排序 number:is_free_shipping=0#是否包邮 number:is_real=1#是否实体商品 number:is_sale=0#是否上架 number:status=1#状态,0=>禁用,1=>启用 <<< success { "code": 1, "msg": "success", "time": "2018-01-01 12:07:35", "data": [] } ~~~ #### 删除 ~~~[api] post:/admin/template/index/delete/id/:id <<< success { "code": 1, "msg": "success", "time": "2018-01-01 12:17:15", "data": [] } ~~~ #### 参数 > 商品参数根据分类变化,请先为商品选择分类,然后添加商品参数,最后再回来编辑参数。 ~~~[api] get:/admin/template/index/parameter/id/:id <<< success { "code": 1, "msg": "", "time": "2018-08-10 10:33:04", "data": [ { "id": 1, "cate_id": 1, "name": "产地", "type": 1, "default_values": [ "" ], "sort": 0, "status": 1, "created_at": "2018-08-09 11:32:53", "updated_at": "2018-08-09 11:33:11", "parameter_value": null, "type_text": "单行文本", "status_text": "正常" } ], "_meta": { "totalCount": 1, "pageCount": 1, "currentPage": 1, "perPage": 20 } } ~~~ ~~~[api] post:/admin/template/index/parameter/id/:id *array:params#参数 *number:param_id#参数ID *mixed:value#值 <<< success { "code": 1, "msg": "success", "time": "2018-01-02 20:01:35", "data": [] } <<< example { "params": [ { "param_id": 1, "value": [1, 2, 3] } ] } ~~~ #### 批量上架 ~~~[api] post:/admin/template/index/sales *array:ids#ID集合 <<< success { "code": 1, "msg": "success", "time": "2018-01-12 20:55:58", "data": [] } <<< example { "ids": [1, 2] } ~~~