HomeController.php 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148
  1. <?php
  2. namespace App\Http\Controllers\Home;
  3. use App\Http\Controllers\BaseController;
  4. use App\Http\Logic\Home\HomeLogic;
  5. class HomeController extends BaseController
  6. {
  7. /**
  8. * @SWG\Get(
  9. * path="/home/list",
  10. * tags={"首页管理"},
  11. * summary="获取省钱列表接口",
  12. * description="获取省钱列表接口",
  13. * produces={"application/json"},
  14. * @SWG\Response(
  15. * response="200",
  16. * description="success",
  17. * @SWG\Schema(
  18. * @SWG\Property(
  19. * property="category_type_name",
  20. * type="string",
  21. * description="类型名称"
  22. * ),
  23. * @SWG\Property(
  24. * property="category_data",
  25. * type="array",
  26. * description="数据",
  27. * @SWG\Items(
  28. * @SWG\Property(
  29. * property="category_name",
  30. * type="string",
  31. * description="名称"
  32. * ),
  33. * @SWG\Property(
  34. * property="category_img_url",
  35. * type="string",
  36. * description="图标"
  37. * ),
  38. * @SWG\Property(
  39. * property="link_url",
  40. * type="string",
  41. * description="跳转地址"
  42. * )
  43. * )
  44. * ),
  45. * )
  46. * ),
  47. * @SWG\Response(
  48. * response="403",
  49. * description="fail",
  50. * @SWG\Schema(ref="#/definitions/ErrorBean")
  51. * )
  52. * )
  53. */
  54. public function getHomeList()
  55. {
  56. $datas = HomeLogic::getHomeListLogic();
  57. return $this->success($datas);
  58. }
  59. /**
  60. * @SWG\Get(
  61. * path="/home/commission/list",
  62. * tags={"首页管理"},
  63. * summary="反钱赚钱列表接口",
  64. * description="反钱赚钱列表接口",
  65. * produces={"application/json"},
  66. * @SWG\Parameter(
  67. * name="type",
  68. * in="query",
  69. * description="类型(0赚钱1反钱)",
  70. * type="string"
  71. * ),
  72. * @SWG\Response(
  73. * response="200",
  74. * description="success",
  75. * @SWG\Schema(
  76. * @SWG\Property(
  77. * property="total",
  78. * type="string",
  79. * description="总数量"
  80. * ),
  81. * @SWG\Property(
  82. * property="list",
  83. * type="array",
  84. * description="数据",
  85. * @SWG\Items(
  86. * @SWG\Property(
  87. * property="order_commission",
  88. * type="string",
  89. * description="订单佣金(单位为分)"
  90. * ),
  91. * @SWG\Property(
  92. * property="commission_status",
  93. * type="string",
  94. * description="佣金状态(0未结算1已结算2已退款)"
  95. * ),
  96. * @SWG\Property(
  97. * property="commission_type",
  98. * type="string",
  99. * description="佣金类型"
  100. * ),
  101. * @SWG\Property(
  102. * property="created_at",
  103. * type="string",
  104. * description="创建时间"
  105. * ),
  106. * @SWG\Property(
  107. * property="user_head_img_url",
  108. * type="string",
  109. * description="赚钱头像"
  110. * ),
  111. * @SWG\Property(
  112. * property="user_provider_head_img_url",
  113. * type="string",
  114. * description="反钱头像"
  115. * ),
  116. * @SWG\Property(
  117. * property="order_title",
  118. * type="string",
  119. * description="订单标题"
  120. * ),
  121. * @SWG\Property(
  122. * property="user_nickname",
  123. * type="string",
  124. * description="用户昵称"
  125. * )
  126. * )
  127. * ),
  128. * )
  129. * ),
  130. * @SWG\Response(
  131. * response="403",
  132. * description="fail",
  133. * @SWG\Schema(ref="#/definitions/ErrorBean")
  134. * )
  135. * )
  136. */
  137. public function getCommissionList()
  138. {
  139. $datas = HomeLogic::getCommissionListLogic();
  140. return $this->success($datas);
  141. }
  142. }