ComplaintController.php 990 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. <?php
  2. namespace App\Http\Controllers\Admin;
  3. use App\Services\Common\ArticleService;
  4. use App\Services\Common\ComplaintService;
  5. /**
  6. * 意见反馈
  7. * Class ComplaintController
  8. * @package App\Http\Controllers\Admin
  9. */
  10. class ComplaintController extends Backend
  11. {
  12. /**
  13. * 构造函数
  14. * @author laravel开发员
  15. * @since 2020/11/11
  16. * ComplaintController constructor.
  17. */
  18. public function __construct()
  19. {
  20. parent::__construct();
  21. $this->service = new ComplaintService();
  22. }
  23. /**
  24. * 列表
  25. * @return array
  26. */
  27. public function index()
  28. {
  29. $pageSize = request()->get('limit', 15);
  30. $list = $this->service->getDataList(request()->all(), $pageSize);
  31. $message = array(
  32. "msg" => '操作成功',
  33. "code" => 0,
  34. "data" => isset($list['list'])? $list['list']:[],
  35. "count" => isset($list['total'])? $list['total']:0,
  36. );
  37. return $message;
  38. }
  39. }