|
|
@@ -6,6 +6,7 @@ use App\Http\Controllers\Api\BaseController;
|
|
|
use App\Http\Validator\ActivityValidator;
|
|
|
use App\Services\ActivityBooksService;
|
|
|
use App\Services\ActivityService;
|
|
|
+use App\Services\GoodsCatesService;
|
|
|
use App\Services\GoodsService;
|
|
|
use Illuminate\Http\Request;
|
|
|
|
|
|
@@ -29,6 +30,7 @@ class GoodsController extends BaseController
|
|
|
parent::__construct();
|
|
|
|
|
|
$this->service = new GoodsService();
|
|
|
+ $this->cateService = new GoodsCatesService();
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
@@ -39,8 +41,20 @@ class GoodsController extends BaseController
|
|
|
return $this->service->getDataList();
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 详情
|
|
|
+ * @return array|mixed
|
|
|
+ */
|
|
|
public function info(){
|
|
|
$id = request()->get('id', 0);
|
|
|
return $this->service->getDetail($id);
|
|
|
}
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 获取分类
|
|
|
+ * @return mixed
|
|
|
+ */
|
|
|
+ public function cates(){
|
|
|
+ return $this->cateSevice->getOptions();
|
|
|
+ }
|
|
|
}
|