EnshrineController.php 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. <?php
  2. namespace App\Http\Controllers\Api\v1;
  3. use App\Http\Controllers\Api\BaseController;
  4. use App\Services\EnshrineService;
  5. use Illuminate\Http\Request;
  6. /**
  7. * 供奉控制器类
  8. * @author wesmiler
  9. * @since 2020/11/10
  10. * Class EnshrineController
  11. * @package App\Http\Controllers
  12. */
  13. class EnshrineController extends BaseController
  14. {
  15. /**
  16. * 构造函数
  17. * @author wesmiler
  18. * @since 2020/11/11
  19. * EnshrineController constructor.
  20. */
  21. public function __construct()
  22. {
  23. parent::__construct();
  24. $this->service = new EnshrineService();
  25. }
  26. /**
  27. * 供奉记录
  28. * @return array
  29. */
  30. public function index(){
  31. return $this->service->getDataList($this->userId);
  32. }
  33. /**
  34. * 供奉物品
  35. * @return array
  36. */
  37. public function goods(){
  38. return $this->service->goods();
  39. }
  40. /**
  41. * 选择佛像
  42. * @return mixed
  43. */
  44. public function select(){
  45. return $this->service->select($this->userId);
  46. }
  47. /**
  48. * 送圣
  49. * @return array
  50. */
  51. public function packoff(){
  52. return $this->service->packoff($this->userId);
  53. }
  54. /**
  55. * 供奉操作记录
  56. * @return array
  57. */
  58. public function actionRecord(){
  59. return $this->service->actionRecord($this->userId);
  60. }
  61. /**
  62. * 购买物品
  63. * @return array
  64. */
  65. public function buy(){
  66. return $this->service->buy($this->userId);
  67. }
  68. }