...
|
...
|
@@ -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);
|
|
|
}
|
...
|
...
|
|