切换导航条
此项目
正在载入...
登录
何书鹏
/
anttest
·
提交
转到一个项目
GitLab
转到仪表盘
项目
活动
文件
提交
管道
0
构建
0
图表
里程碑
问题
0
合并请求
0
成员
标记
维基
派生
网络
创建新的问题
下载为
邮件补丁
差异文件
浏览文件
作者
何书鹏
4 years ago
提交
0dd4b46f502f9aaae44d46ca181cf7a06cd46b45
1 个父辈
1c7b60f2
master
获取可用优惠券api
隐藏空白字符变更
内嵌
并排对比
正在显示
3 个修改的文件
包含
65 行增加
和
5 行删除
application/api/controller/Coupons.php
application/api/controller/Order.php
public/api.html
application/api/controller/Coupons.php
查看文件 @
0dd4b46
...
...
@@ -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": "未使用" //状态名称
}]
})
...
...
application/api/controller/Order.php
查看文件 @
0dd4b46
...
...
@@ -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
();
...
...
public/api.html
查看文件 @
0dd4b46
...
...
@@ -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>
...
...
请
注册
或
登录
后发表评论