TradeController.php 1.5 KB

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