IntegralGoodsController.php 851 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. <?php
  2. namespace app\shopapi\controller;
  3. use app\shopapi\logic\IntegralGoodsLogic;
  4. use app\shopapi\validate\IntegralGoodsValidate;
  5. /**
  6. * 积分商品
  7. * Class IntegralGoods
  8. * @package app\api\controller
  9. */
  10. class IntegralGoodsController extends BaseShopController
  11. {
  12. /**
  13. * @notes 积分商品列表
  14. * @author 段誉
  15. * @date 2022/3/31 9:46
  16. */
  17. public function lists()
  18. {
  19. $lists = IntegralGoodsLogic::lists($this->userId);
  20. return $this->data($lists);
  21. }
  22. /**
  23. * @notes 商品详情
  24. * @return \think\response\Json
  25. * @author 段誉
  26. * @date 2022/3/31 9:48
  27. */
  28. public function detail()
  29. {
  30. $params = (new IntegralGoodsValidate())->goCheck();
  31. $detail = IntegralGoodsLogic::detail($params);
  32. return $this->success('获取成功', $detail);
  33. }
  34. }