dataLists(new CouponLists()); } /** * @notes 我的优惠券 * @author 张无忌 * @date 2021/7/22 10:18 */ public function my() { return $this->dataLists(new CouponMyLists()); } /** * @notes 领取优惠券 * @author 张无忌 * @date 2021/7/22 10:19 */ public function receive() { $params = (new CouponValidate())->post()->goCheck('receive'); $result = CouponLogic::receive($params, $this->userId); if ($result === true) { return $this->success('领取成功',[],1,1); } return $this->fail($result); } /** * @notes 结算页优惠券 * @return Json * @author Tab * @date 2021/9/8 10:53 */ public function orderCoupon() { $params = (new CouponValidate())->post()->goCheck('orderCoupon'); $params['user_id'] = $this->userId; $result = CouponLogic::orderCoupon($params); return $this->success('', $result); } }