VideoController.php 1.7 KB

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