切换导航条
此项目
正在载入...
登录
李忠强
/
temporaryfood
·
提交
转到一个项目
GitLab
转到仪表盘
项目
活动
文件
提交
管道
0
构建
0
图表
里程碑
问题
0
合并请求
0
成员
标记
维基
派生
网络
创建新的问题
下载为
邮件补丁
差异文件
浏览文件
作者
何书鹏
3 years ago
提交
f15653174a8c0bacc350676236ed2dd9a80448e3
1 个父辈
18ce0733
bug修改
隐藏空白字符变更
内嵌
并排对比
正在显示
1 个修改的文件
包含
5 行增加
和
1 行删除
application/api/controller/User.php
application/api/controller/User.php
查看文件 @
f156531
...
...
@@ -203,9 +203,13 @@ class User extends Api
*/
public
function
userCoupon
()
{
$model
=
new
UserCoupon
();
// 更新已过期状态
$model
->
where
(
'status'
,
'0'
)
->
where
(
'user_id'
,
$this
->
auth
->
id
)
->
update
([
'status'
=>
'2'
]);
$type
=
$this
->
request
->
post
(
'type'
);
if
(
!
in_array
(
$type
,[
0
,
1
,
2
]))
$this
->
error
(
'type参数不合法'
);
$model
=
new
UserCoupon
();
$list
=
$model
->
where
(
'status'
,
$type
)
->
where
(
'user_id'
,
$this
->
auth
->
id
)
->
select
();
$this
->
success
(
'用户优惠券列表'
,
$list
);
}
...
...
请
注册
或
登录
后发表评论