userShopCouponList($data); $this->ajaxReturn($result); } //领取商家券成功后 public function receiveCouponCallback() { $data = I('post.'); $data['merchant_id'] = self::$merchant_id; $data['xcx_id'] = self::$uid; $data['openid'] = self::$openid; $data['store_id'] = self::$store_id; $ShopCouponClass = new ShopCoupon(); $result = $ShopCouponClass->receiveCouponCallback($data); $this->ajaxReturn($result); } //领券的参数 public function grantCouponParam() { $data = I('post.'); $data['xcx_id'] = self::$uid; $data['merchant_id'] = self::$merchant_id; $ShopCouponClass = new ShopCoupon(); $result = $ShopCouponClass->grantCouponSign($data); $this->ajaxReturn($result); } //已领取后点击商家券显示商家券详情(2020-10-13已作废) public function shopCouponRule() { $coupon_id = I('post.id'); $ShopCouponClass = new ShopCoupon(); $result = $ShopCouponClass->shopCouponRule([ 'coupon_id' => $coupon_id ]); $this->ajaxReturn($result); } /** * 商家券点击立即使用 */ public function useShopCoupon() { $coupon_id = I('post.id'); $ShopCouponClass = new ShopCoupon(); $result = $ShopCouponClass->useShopCoupon([ 'coupon_id' => $coupon_id ]); $this->ajaxReturn($result); } /** * 未领取的商家券详情(2020-10-13已作废) */ public function notReceivedCouponRule() { $id = I('post.id'); $ShopCouponClass = new ShopCoupon(); $result = $ShopCouponClass->notReceivedCouponRule([ 'id' => $id, 'merchant_id' => self::$merchant_id ]); $this->ajaxReturn($result); } //商家券详情 public function couponInfo() { $id = I('post.id'); $ShopCouponClass = new ShopCoupon(); $result = $ShopCouponClass->userCoupon([ 'id' => $id, 'merchant_id' => self::$merchant_id, 'xcx_id'=>self::$uid ]); $this->ajaxReturn($result); } }