|
|
|
@ -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']); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|