HomeController.php 954 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. <?php
  2. namespace App\Http\Controllers\Api\V1;
  3. use Illuminate\Http\Request;
  4. use App\Services\Base\ErrorCode;
  5. class HomeController extends Controller
  6. {
  7. /**
  8. * @api {get} /api/home/index 首页(home)
  9. * @apiSuccessExample {json} Success-Response:
  10. * HTTP/1.1 200 OK
  11. * {
  12. * "state": true,
  13. * "code": 0,
  14. * "message": "",
  15. * "data": {
  16. * "verify_code": "1234"//该值调试时使用,sms调通后取消
  17. * }
  18. * }
  19. * @apiErrorExample {json} Error-Response:
  20. * HTTP/1.1 400 Bad Request
  21. * {
  22. * "state": false,
  23. * "code": 1000,
  24. * "message": "传入参数不正确",
  25. * "data": null or []
  26. * }
  27. * 可能出现的错误代码:
  28. * 1000 CLIENT_WRONG_PARAMS 传入参数不正确
  29. */
  30. public function index()
  31. {
  32. //获取轮播图
  33. return $this->error(ErrorCode::SERVICE_CODE_FAILED);
  34. }
  35. }