...
|
...
|
@@ -363,9 +363,14 @@ class Order extends Api |
|
|
*/
|
|
|
public function chooseCoupon()
|
|
|
{
|
|
|
$model = new UserCoupon();
|
|
|
|
|
|
// 更新已过期状态
|
|
|
$model->where('status','0')->where('user_id',$this->auth->id)->update(['status'=>'2']);
|
|
|
|
|
|
$price = $this->request->post('price');
|
|
|
if (!is_numeric($price)) $this->error('订单价格不合法');
|
|
|
$model = new UserCoupon();
|
|
|
|
|
|
$list = $model
|
|
|
->where('status','0')
|
|
|
->where('user_id',$this->auth->id)
|
...
|
...
|
|