FlowerController.php 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. <?php
  2. namespace App\Http\Controllers\PartnerPay;
  3. use App\Http\Controllers\Controller;
  4. use App\Http\Controllers\Core\Auth;
  5. use App\Services\Pay\FlowerService;
  6. use Illuminate\Http\Request;
  7. class FlowerController extends Controller
  8. {
  9. /**
  10. * 通过小花提升人气值时长
  11. */
  12. public function payPopularity()
  13. {
  14. $uid = Auth::auth();
  15. $fs = new FlowerService();
  16. $fs->payPopularity($uid);
  17. return array(
  18. 'code' => 200,
  19. 'message' => 'success'
  20. );
  21. }
  22. /**
  23. * 用户小花明细
  24. * @param Request $request
  25. * @return array
  26. */
  27. public function flowerlogs(Request $request)
  28. {
  29. $uid = Auth::auth();
  30. $page = $request->get('page') ?? 1;
  31. $pages = array(
  32. 'page' => $page,
  33. 'limit' => 30
  34. );
  35. $fs = new FlowerService();
  36. $data = $fs->logs($uid, $pages);
  37. return array(
  38. 'code' => 200,
  39. 'message' => 'success',
  40. 'data' => $data
  41. );
  42. }
  43. }