Team.php 733 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. <?php
  2. namespace app\admin\controller\user;
  3. use app\common\controller\Backend;
  4. use fast\Tree;
  5. /**
  6. * 会员团队
  7. *
  8. * @icon fa fa-circle-o
  9. */
  10. class Team extends Backend
  11. {
  12. /**
  13. * @var \app\admin\model\UserRule
  14. */
  15. protected $model = null;
  16. public function _initialize()
  17. {
  18. parent::_initialize();
  19. $this->model = model('UserRule');
  20. }
  21. /**
  22. * 查看
  23. */
  24. public function index()
  25. {
  26. if ($this->request->isAjax()) {
  27. $list = $this->rulelist;
  28. $total = count($this->rulelist);
  29. $result = array("total" => $total, "rows" => $list);
  30. return json($result);
  31. }
  32. return $this->view->fetch();
  33. }
  34. }