作者 何书鹏

获取可用优惠券api

... ... @@ -47,7 +47,7 @@ class Coupons extends Base
"gettimestart": 1607875200,
"gettimeend": 1610640000,
"user_coupons_id": 1, //领取ID
"status_code": 1610640000, //状态码:no_use=未使用,used=已使用,expired=已过期
"status_code": "no_use", //状态码:no_use=未使用,used=已使用,expired=已过期
"status_name": "未使用" //状态名称
}]
})
... ...
... ... @@ -375,7 +375,37 @@ class Order extends Base
* @ApiHeaders (name=token, type=string, required=true, description="请求的Token")
* @ApiParams (name=goods_list, type=object, required=false, description="购买的商品:[{goods_id: 3, goods_num: 1, sku_price_id: 3, goods_price: 0.10}]")
*
* @ApiReturn()
* @ApiReturn({
"code": 1,
"msg": "获取成功",
"time": "1609222988",
"data": [{
"id": 3, //优惠券ID
"name": "无门槛优惠券", //优惠券名称
"type": "cash",
"goods_ids": "0",
"amount": "0.01", //券面额
"enough": "0.00", //消费门槛
"stock": 99,
"limit": 1,
"gettime": {
"start": 1609171200,
"end": 1609344000
},
"usetime": { //有效期
"start": "2020.12.29", //开始时间
"end": "2020.12.31" //结束时间
},
"description": "", //优惠券描述
"usetimestart": 1609171200,
"usetimeend": 1609344000,
"gettimestart": 1609171200,
"gettimeend": 1609344000,
"user_coupons_id": 2, //领取ID
"status_code": "no_use", //状态码:no_use=未使用,used=已使用,expired=已过期
"status_name": "未使用" //状态名称
}]
})
*/
public function coupons () {
$params = $this->request->post();
... ...
... ... @@ -2469,7 +2469,37 @@
<div class="tab-pane" id="sample47">
<div class="row">
<div class="col-md-12">
<pre id="sample_response47"></pre>
<pre id="sample_response47">{
"code": 1,
"msg": "获取成功",
"time": "1609222988",
"data": [{
"id": 3, //优惠券ID
"name": "无门槛优惠券", //优惠券名称
"type": "cash",
"goods_ids": "0",
"amount": "0.01", //券面额
"enough": "0.00", //消费门槛
"stock": 99,
"limit": 1,
"gettime": {
"start": 1609171200,
"end": 1609344000
},
"usetime": { //有效期
"start": "2020.12.29", //开始时间
"end": "2020.12.31" //结束时间
},
"description": "", //优惠券描述
"usetimestart": 1609171200,
"usetimeend": 1609344000,
"gettimestart": 1609171200,
"gettimeend": 1609344000,
"user_coupons_id": 2, //领取ID
"status_code": "no_use", //状态码:no_use=未使用,used=已使用,expired=已过期
"status_name": "未使用" //状态名称
}]
}</pre>
</div>
</div>
</div><!-- #sample -->
... ... @@ -10614,7 +10644,7 @@
"gettimestart": 1607875200,
"gettimeend": 1610640000,
"user_coupons_id": 1, //领取ID
"status_code": 1610640000, //状态码:no_use=未使用,used=已使用,expired=已过期
"status_code": "no_use", //状态码:no_use=未使用,used=已使用,expired=已过期
"status_name": "未使用" //状态名称
}]
}</pre>
... ... @@ -12492,7 +12522,7 @@
<div class="row mt0 footer">
<div class="col-md-6" align="left">
Generated on 2020-12-29 14:17:59 </div>
Generated on 2020-12-29 14:29:35 </div>
<div class="col-md-6" align="right">
<a href="./" target="_blank">My Website</a>
</div>
... ...