From dc1305e5bd9162318c0e62d86ac5b682c0ea7d62 Mon Sep 17 00:00:00 2001 From: ztt <835303992@qq.com> Date: Fri, 22 Mar 2024 01:43:14 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=86=E9=94=80=E7=AD=89=E7=BA=A7=E9=85=8D?= =?UTF-8?q?=E7=BD=AE=E5=95=86=E5=93=81=E5=88=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- addons/shopro/controller/Coupon.php | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/addons/shopro/controller/Coupon.php b/addons/shopro/controller/Coupon.php index ab8903b..3f49254 100755 --- a/addons/shopro/controller/Coupon.php +++ b/addons/shopro/controller/Coupon.php @@ -2,9 +2,12 @@ namespace addons\shopro\controller; +use addons\shopro\service\commission\Agent; +use app\admin\model\shopro\commission\Level; use app\admin\model\shopro\Coupon as CouponModel; use addons\shopro\traits\CouponSend; use app\admin\model\shopro\goods\Goods as GoodsModel; +use app\common\model\User; class Coupon extends Common { @@ -100,4 +103,14 @@ class Coupon extends Common $this->success('优惠券详情', $coupon); } + + /** + * 用户分销等级优惠券 + */ + public function commissionCouponList() { + $user = auth_user(); + $userInfo = (new \app\admin\model\shopro\commission\Agent())->where('user_id', $user->id)->find(); + $data = Level::get(['level' => $userInfo['level']]); + $this->success($data['coupon_rules']); + } }