ArticleCateController.php 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. <?php
  2. // +----------------------------------------------------------------------
  3. // | LARAVEL8.0 框架 [ LARAVEL ][ RXThinkCMF ]
  4. // +----------------------------------------------------------------------
  5. // | 版权所有 2017~2021 LARAVEL研发中心
  6. // +----------------------------------------------------------------------
  7. // | 官方网站: http://www.laravel.cn
  8. // +----------------------------------------------------------------------
  9. // | Author: laravel开发员 <laravel.qq.com>
  10. // +----------------------------------------------------------------------
  11. namespace App\Http\Controllers\Admin;
  12. use App\Services\Common\ArticleCateService;
  13. use App\Services\Common\ArticleService;
  14. use App\Services\Common\DrawLogsService;
  15. use App\Services\Common\FinanceService;
  16. use App\Services\Common\MachineService;
  17. use App\Services\Common\WalletService;
  18. /**
  19. * 承兑商管理-控制器
  20. * @author laravel开发员
  21. * @since 2020/11/11
  22. * @package App\Http\Controllers
  23. */
  24. class ArticleCateController extends Backend
  25. {
  26. /**
  27. * 构造函数
  28. * @author laravel开发员
  29. * @since 2020/11/11
  30. */
  31. public function __construct()
  32. {
  33. parent::__construct();
  34. $this->service = new ArticleCateService();
  35. }
  36. /**
  37. * 列表
  38. * @return array
  39. */
  40. public function index()
  41. {
  42. $pageSize = request()->get('limit', 15);
  43. $fields = request()->get('field', null);
  44. $list = $this->service->getDataList(request()->all(), $pageSize,$fields);
  45. $message = array(
  46. "msg" => '操作成功',
  47. "code" => 0,
  48. "data" => isset($list['list'])? $list['list']:[],
  49. "count" => isset($list['total'])? $list['total']:0,
  50. );
  51. return $message;
  52. }
  53. }