AccountController.php 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  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\AccountService;
  13. use App\Services\Common\FinanceService;
  14. /**
  15. * 账户明细管理-控制器
  16. * @author laravel开发员
  17. * @since 2020/11/11
  18. * Class AccountController
  19. * @package App\Http\Controllers
  20. */
  21. class AccountController extends Backend
  22. {
  23. /**
  24. * 构造函数
  25. * @author laravel开发员
  26. * @since 2020/11/11
  27. * AccountController constructor.
  28. */
  29. public function __construct()
  30. {
  31. parent::__construct();
  32. $this->service = new AccountService();
  33. }
  34. // 记录
  35. public function index()
  36. {
  37. $pageSize = request()->get('limit', 15);
  38. $list = $this->service->getDataList(request()->all(), $pageSize);
  39. $message = array(
  40. "msg" => '操作成功',
  41. "code" => 0,
  42. "data" => isset($list['list'])? $list['list']:[],
  43. "count" => isset($list['total'])? $list['total']:0,
  44. );
  45. return $message;
  46. }
  47. }