diff --git a/app/controller/api/Coupon.php b/app/controller/api/Coupon.php index 3c815ec..02e12c8 100644 --- a/app/controller/api/Coupon.php +++ b/app/controller/api/Coupon.php @@ -315,8 +315,6 @@ class Coupon extends Base return $this->json(4001, "商家已禁用"); } - - try { //检查优惠券状态 CouponRepository::getInstance()->checkCouponMainReceiveStatus($couponMain); diff --git a/app/controller/manager/Coupon.php b/app/controller/manager/Coupon.php index a4334c7..cb08b71 100644 --- a/app/controller/manager/Coupon.php +++ b/app/controller/manager/Coupon.php @@ -224,12 +224,12 @@ class Coupon extends Base - $data['commission_agency'] = input("item.commission_agency/d", 0,"abs"); - $data['commission_admin'] = input("item.commission_admin/d", 0,"abs"); - $data['commission_consumer'] = input("item.commission_consumer/d", 0,"abs"); - $data['commission_dis_admin'] = input("item.commission_dis_admin/d", 0,"abs"); - $data['commission_dis_distribution'] = input("item.commission_dis_distribution/d", 0,"abs"); - $data['commission_dis_distributed'] = input("item.commission_dis_distributed/d", 0,"abs"); + $data['commission_agency'] = $this->data["distributionProportion"]["commission_agency"]; + $data['commission_admin'] = $this->data["distributionProportion"]["commission_admin"]; + $data['commission_consumer'] = $this->data["distributionProportion"]["commission_consumer"]; + $data['commission_dis_admin'] = $this->data["distributionProportionUser"]["commission_dis_admin"]; + $data['commission_dis_distribution'] = $this->data["distributionProportionUser"]["commission_dis_distribution"]; + $data['commission_dis_distributed'] = $this->data["distributionProportionUser"]["commission_dis_distributed"]; $totalCommission = $data['commission_agency'] + $data['commission_admin'] + $data['commission_consumer']; if ($totalCommission != 100) { diff --git a/app/traits/CouponTrait.php b/app/traits/CouponTrait.php index 013575d..529b699 100644 --- a/app/traits/CouponTrait.php +++ b/app/traits/CouponTrait.php @@ -162,10 +162,14 @@ trait CouponTrait //白名单 if(!empty($couponMain->white_list)){ - if (empty($account->real_name) || empty($account->mobile)) { - throw new RepositoryException("请先授权手机号和真实姓名"); + if ( + //empty($account->real_name) || + empty($account->mobile)) { + throw new RepositoryException("请先授权手机号"); } - if (false === strpos($couponMain->white_list, $account->mobile . "-" . $account->real_name)) { + if (false === strpos($couponMain->white_list, $account->mobile + //. "-" . $account->real_name + )) { throw new RepositoryException("您没有在该优惠券白名单内"); } } diff --git a/view/manager/coupon/add.html b/view/manager/coupon/add.html index 6d73e4a..631159b 100644 --- a/view/manager/coupon/add.html +++ b/view/manager/coupon/add.html @@ -149,9 +149,9 @@