You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

29 lines
752 B

  1. <?php
  2. namespace App\Controller\v3;
  3. use App\Controller\BaseController;
  4. use App\Service\v3\Interfaces\StoreServiceInterface;
  5. use Hyperf\Di\Annotation\Inject;
  6. use App\Service\v3\Interfaces\GoodsServiceInterface;
  7. class GoodsController extends BaseController
  8. {
  9. /**
  10. * @Inject
  11. * @var GoodsServiceInterface
  12. */
  13. protected $goodsService;
  14. /**
  15. * @Inject
  16. * @var StoreServiceInterface
  17. */
  18. protected $storeService;
  19. public function detail()
  20. {
  21. $params = $this->request->all();
  22. $res['detail'] = $this->goodsService->do();
  23. $res['banner'] = $this->goodsService->getBanner();
  24. $res['store'] = $this->storeService->detail($params['store_id']);
  25. return $this->success($res);
  26. }
  27. }