AreaDividendController.php 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. <?php
  2. namespace app\modules\admin\controllers;
  3. use app\modules\admin\models\AreaDividendForm;
  4. class AreaDividendController extends BaseController
  5. {
  6. //获取配置信息
  7. public function actionGetAreaAgentConfig() {
  8. $form = new AreaDividendForm();
  9. $form->attributes = get_params();
  10. $form->store_id = get_store_id();
  11. return $this->asJson($form->getAreaAgentConfig());
  12. }
  13. //保存配置信息
  14. public function actionSetAreaAgentConfig() {
  15. $form = new AreaDividendForm();
  16. $form->attributes = post_params();
  17. $form->store_id = get_store_id();
  18. return $this->asJson($form->setAreaAgentConfig(post_params()));
  19. }
  20. //处理区域代理申请
  21. public function actionHandleAreaAgentApply() {
  22. $form = new AreaDividendForm();
  23. $form->attributes = post_params();
  24. $form->store_id = get_store_id();
  25. return $this->asJson($form->handleAreaAgentApply());
  26. }
  27. // 获取申请列表
  28. public function actionGetAreaAgentApplyList() {
  29. $form = new AreaDividendForm();
  30. $form->attributes = get_params();
  31. $form->store_id = get_store_id();
  32. return $this->asJson($form->getAreaAgentApplyList());
  33. }
  34. //获取区域代理列表
  35. public function actionGetAreaAgentList() {
  36. $form = new AreaDividendForm();
  37. $form->attributes = get_params();
  38. $form->store_id = get_store_id();
  39. return $this->asJson($form->getAreaAgentList(all_params()));
  40. }
  41. //编辑代理员佣金状态
  42. public function actionSetAgentRate()
  43. {
  44. $form = new AreaDividendForm();
  45. $form->attributes = post_params();
  46. $form->store_id = get_store_id();
  47. return $this->asJson($form->setAgentRate());
  48. }
  49. }