From f734476251dee7493fda31fad01f59e1d9608152 Mon Sep 17 00:00:00 2001 From: wangxinglong <2371974647@qq.com> Date: Tue, 8 Feb 2022 15:46:31 +0800 Subject: [PATCH] setter --- app/controller/api/Coupon.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/controller/api/Coupon.php b/app/controller/api/Coupon.php index f30778e..0582e52 100644 --- a/app/controller/api/Coupon.php +++ b/app/controller/api/Coupon.php @@ -728,7 +728,7 @@ class Coupon extends Base } $type = CouponRepository::getInstance()->getCouponTypeAll(); $type = array_column($type->toArray(), null, "id"); - $data['type_name'] = $type[$data['type']]['name']; + $couponMain['type_name'] = $type[$couponMain['type']]['name']; //验证通过 $couponMain['business_type'] = $account->business['type']; @@ -743,7 +743,7 @@ class Coupon extends Base $totalMoney = $couponMain['deduction_money'] * $couponMain['count']; //检测消费者部分是否最少1元 - $consumerMoney = ($data['commission_consumer']/100) * $data['deduction_money']; + $consumerMoney = ($couponMain['commission_consumer']/100) * $couponMain['deduction_money']; if ($consumerMoney != 0 && $consumerMoney < CouponMain::min_consumer_money) { return $this->json(4002, "消费者红包最低" . CouponMain::min_consumer_money . "元"); }