|
|
|
@ -108,16 +108,13 @@ class GoodsController extends BaseController |
|
|
|
$first = $this->categoryService->getByParentId(0); |
|
|
|
$secend = $this->categoryService->getByParentId($goods['category_id']); |
|
|
|
$third = $this->categoryService->getThird($goods['category_id']); |
|
|
|
$tags = $this->goodsService->getTags(); |
|
|
|
return $this->success([ |
|
|
|
'goods' => $goods, |
|
|
|
'first' => $first, |
|
|
|
'secend' => $secend, |
|
|
|
'third' => $third, |
|
|
|
'tags' => [ |
|
|
|
'新品', |
|
|
|
'热销', |
|
|
|
'新鲜' |
|
|
|
] |
|
|
|
'tags' => $tags |
|
|
|
]); |
|
|
|
} |
|
|
|
|
|
|
|
@ -126,4 +123,10 @@ class GoodsController extends BaseController |
|
|
|
$res = $this->goodsService->create($this->request->all()); |
|
|
|
return $this->success($res); |
|
|
|
} |
|
|
|
|
|
|
|
public function getTags() |
|
|
|
{ |
|
|
|
$tags = $this->goodsService->getTags(); |
|
|
|
return $this->success(['tags' => $tags]); |
|
|
|
} |
|
|
|
} |