多应用+插件架构,代码干净,二开方便,首家独创一键云编译技术,文档视频完善,免费商用码云13.8K 广告
#### 列表 ~~~[api] get:/index/coupon/index *number:storesId#门店ID number:p=1#当前页数 numbner:ps=20#分页大小 <<< success { "code": 1, "msg": "", "time": "2018-08-15 17:41:27", "data": [ { "id": 1, "dealer_id": 2, "stores_id": 2, "name": "优惠券1", "money": "5.00", "number": 1, "conditions": { "type": 1, "value": "" }, "status": 1, "created_at": "2016-01-01 00:00:00", "updated_at": "2016-01-01 00:00:00", "start_at": "2016-01-01 00:00:00", "end_at": "2016-01-01 00:00:00", "stores": { "id": 2, "name": "门店2", "thumb": "http://oss.dgyouduo.com/static/img/no-image.png" }, "status_text": "正常" } ], "_meta": { "totalCount": 1, "pageCount": 1, "currentPage": 1, "perPage": 10 } } ~~~ #### 领取 ~~~[api] post:/index/coupon/receive/id/:id <<< success { "code": 1, "msg": "success", "time": "2018-08-16 15:32:08", "data": [] } ~~~ #### 我的 ~~~[api] get:/index/coupon/my number:p=1#当前页数 numbner:ps=20#分页大小 <<< success { "code": 1, "msg": "", "time": "2018-08-22 00:22:08", "data": [ { "id": 1, "coupon_id": 1, "member_id": 1, "order_id": null, "status": 1, "created_at": "2018-08-16 15:32:08", "updated_at": "2018-08-16 15:32:08", "coupon": { "id": 1, "dealer_id": 2, "stores_id": 2, "name": "优惠券1", "money": "5.00", "number": 0, "conditions": { "type": 1, "value": "" }, "status": 1, "created_at": "2016-01-01 00:00:00", "updated_at": "2018-08-16 15:32:08", "start_at": "2016-01-01 00:00:00", "end_at": "2016-01-01 00:00:00", "stores": { "id": 2, "name": "门店2", "is_audit": 1, "status": 1, "is_audit_text": "审核通过", "status_text": "正常" }, "status_text": "正常" }, "status_text": "正常" } ], "_meta": { "totalCount": 1, "pageCount": 1, "currentPage": 1, "perPage": 10 } } ~~~ #### 可用 > 存在商品秒杀ID将返回空数组 ~~~[api] post:/index/coupon/usable *number:stores_id#门店ID *array:goods#商品 *number:goods_id#商品ID *string:sku_key#商品存放SKU库存量项目ID *number:number#商品数量 number:seckill_id#秒杀ID <<< success { "code": 1, "msg": "", "time": "2018-08-21 18:47:01", "data": { "1": { "id": 4, "coupon_id": 5, "member_id": 4, "order_id": null, "status": 1, "created_at": "2018-08-21 14:33:47", "updated_at": "2018-08-21 14:33:47", "coupon": { "id": 5, "dealer_id": 1, "stores_id": 17, "name": "无条件优惠券1", "money": "10.00", "number": 19, "conditions": { "type": 1, "value": "" }, "status": 1, "created_at": "2018-08-21 14:32:48", "updated_at": "2018-08-21 14:33:48", "start_at": "2018-08-21 00:00:00", "end_at": "2018-08-22 00:00:00", "status_text": "正常" }, "status_text": "正常" } } } <<< success秒杀 { "code": 1, "msg": "", "time": "2018-08-23 17:07:37", "data": [] } <<< example { "stores_id": 17, "goods": [ { "goods_id": 39, "sku_key": "", "number": 10 } ] } <<< example秒杀 { "stores_id": 17, "goods": [ { "goods_id": 39, "sku_key": "", "number": 10, "seckill_id": 6 } ] } ~~~