Xzfenhong.php 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. <?php
  2. namespace app\admin\controller\system;
  3. use app\common\controller\AdminController;
  4. use app\common\model\PayConfigModel;
  5. use app\common\model\SystemFaq;
  6. use app\common\model\UserteamLogModel;
  7. use think\App;
  8. /**
  9. * @ControllerAnnotation(title="星钻等级分红")
  10. */
  11. class Xzfenhong extends AdminController
  12. {
  13. use \app\admin\traits\Curd;
  14. public function __construct (App $app)
  15. {
  16. parent::__construct($app);
  17. $this->model = new UserteamLogModel();
  18. }
  19. /**
  20. * @NodeAnotation(title="列表")
  21. */
  22. public function index ()
  23. {
  24. if ($this->request->isAjax()) {
  25. // if (input('selectFields')) {
  26. // return $this->selectList();
  27. // }
  28. list($page, $limit, $where) = $this->buildTableParames();
  29. $count = $this->model
  30. ->where($where)
  31. ->count();
  32. $list = $this->model
  33. ->where($where)
  34. ->where('type', 2)
  35. ->page($page, $limit)
  36. ->order($this->sort)
  37. ->select();
  38. $data = [
  39. 'code' => 0,
  40. 'msg' => '',
  41. 'count' => $count,
  42. 'data' => $list,
  43. ];
  44. return json($data);
  45. }
  46. return $this->fetch();
  47. }
  48. }