Apply.php 794 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. <?php
  2. namespace app\shop\controller\plus\agent;
  3. use app\shop\controller\Controller;
  4. use app\shop\model\plus\agent\Apply as ApplyModel;
  5. /**
  6. * 分销控制器
  7. */
  8. class Apply extends Controller
  9. {
  10. /**
  11. * 分销商申请列表
  12. */
  13. public function index()
  14. {
  15. $model = new ApplyModel;
  16. $apply_list = $model->getList($this->postData());
  17. return $this->renderSuccess('', compact('apply_list'));
  18. }
  19. /**
  20. * 审核分销商
  21. */
  22. public function editApplyStatus($apply_id)
  23. {
  24. $model = ApplyModel::detail($apply_id);
  25. if ($model->submit($this->postData())) {
  26. return $this->renderSuccess('修改成功');
  27. }
  28. return $this->renderError('修改失败');
  29. }
  30. }