|
|
|
@ -2,6 +2,8 @@ |
|
|
|
|
|
|
|
namespace App\Controller\v3; |
|
|
|
|
|
|
|
use App\Constants\v3\ErrorCode; |
|
|
|
use App\Exception\ErrorCodeException; |
|
|
|
use App\Controller\BaseController; |
|
|
|
use App\Model\v3\ServicePersonnel; |
|
|
|
use App\Request\v3\StoreIndexRequest; |
|
|
|
@ -58,8 +60,11 @@ class StoreController extends BaseController |
|
|
|
public function index(StoreIndexRequest $request) |
|
|
|
{ |
|
|
|
$params = $this->request->all(); |
|
|
|
|
|
|
|
$data = $this->storeService->detail($params['store_id']); |
|
|
|
if(empty($data)){ |
|
|
|
$msg = ['plat'=>'/v3/store/index/',"data"=>$params]; |
|
|
|
throw new ErrorCodeException(ErrorCode::STORE_NOT_AVAILABLE,'',$msg); |
|
|
|
} |
|
|
|
$data['is_collected'] = (bool)$this->collectService->check($params['user_id'],$params['store_id']); |
|
|
|
$data['goods_types'] = $this->categoryService->allForStore($params['store_id']); |
|
|
|
$data['in_business'] = $this->storeService->check($params['store_id']); |
|
|
|
|