|
|
@ -3,6 +3,7 @@ |
|
|
namespace App\Controller\v3; |
|
|
namespace App\Controller\v3; |
|
|
|
|
|
|
|
|
use App\Controller\BaseController; |
|
|
use App\Controller\BaseController; |
|
|
|
|
|
use App\Service\v3\Interfaces\StoreServiceInterface; |
|
|
use Hyperf\Di\Annotation\Inject; |
|
|
use Hyperf\Di\Annotation\Inject; |
|
|
use App\Service\v3\Interfaces\GoodsServiceInterface; |
|
|
use App\Service\v3\Interfaces\GoodsServiceInterface; |
|
|
class GoodsController extends BaseController |
|
|
class GoodsController extends BaseController |
|
|
@ -12,10 +13,18 @@ class GoodsController extends BaseController |
|
|
* @var GoodsServiceInterface |
|
|
* @var GoodsServiceInterface |
|
|
*/ |
|
|
*/ |
|
|
protected $goodsService; |
|
|
protected $goodsService; |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* @Inject |
|
|
|
|
|
* @var StoreServiceInterface |
|
|
|
|
|
*/ |
|
|
|
|
|
protected $storeService; |
|
|
public function detail() |
|
|
public function detail() |
|
|
{ |
|
|
{ |
|
|
|
|
|
$params = $this->request->all(); |
|
|
$res['detail'] = $this->goodsService->do(); |
|
|
$res['detail'] = $this->goodsService->do(); |
|
|
$res['banner'] = $this->goodsService->getBanner(); |
|
|
$res['banner'] = $this->goodsService->getBanner(); |
|
|
|
|
|
$res['store'] = $this->storeService->detail($params['store_id']); |
|
|
return $this->success($res); |
|
|
return $this->success($res); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |