CommissionController.php 836 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. <?php
  2. namespace addons\OperationCenter\backend\controllers;
  3. use addons\OperationCenter\common\services\CommissionService;
  4. /**
  5. * 分佣控制器
  6. *
  7. * Class CommissionController
  8. * @package addons\OperationCenter\backend\controllers
  9. */
  10. class CommissionController extends BaseController
  11. {
  12. /**
  13. * @var CommissionService
  14. */
  15. protected $service;
  16. public function init()
  17. {
  18. parent::init();
  19. $this->service = new CommissionService(['mall_id' => $this->mall_id]);
  20. }
  21. /**
  22. * 首页
  23. *
  24. * @return string
  25. */
  26. public function actionIndex()
  27. {
  28. if ($this->request->isAjax) {
  29. $params = $this->request->get();
  30. return $this->success('ok', $this->service->getPageList($params));
  31. }
  32. return $this->render($this->action->id);
  33. }
  34. }