VideosController.php 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  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\Models\VideoModel;
  13. use App\Services\Common\RewardOrderService;
  14. use App\Services\Common\TaskService;
  15. use App\Services\Common\TradeService;
  16. use App\Services\Common\VideosService;
  17. /**
  18. * 承兑商管理-控制器
  19. * @author laravel开发员
  20. * @since 2020/11/11
  21. * @package App\Http\Controllers
  22. */
  23. class VideosController extends Backend
  24. {
  25. /**
  26. * 构造函数
  27. * @author laravel开发员
  28. * @since 2020/11/11
  29. */
  30. public function __construct()
  31. {
  32. parent::__construct();
  33. $this->service = new VideosService();
  34. }
  35. /**
  36. * 列表
  37. * @return array
  38. */
  39. public function index()
  40. {
  41. $pageSize = request()->get('limit', 15);
  42. $list = $this->service->getDataList(request()->all(), $pageSize);
  43. $message = array(
  44. "msg" => '操作成功',
  45. "code" => 0,
  46. "data" => isset($list['list'])? $list['list']:[],
  47. "count" => isset($list['total'])? $list['total']:0,
  48. );
  49. return $message;
  50. }
  51. /**
  52. * 选项列表
  53. * @return mixed
  54. */
  55. public function options(){
  56. $result = $this->service->options();
  57. return message(1002,true, $result);
  58. }
  59. }