|
|
|
@ -51,6 +51,7 @@ class Category extends Controller |
|
|
|
|
$model = new CategoryModel; |
|
|
|
|
$hasGoods = GoodsCategoryRel::getcategory($this->storeId,$merchantId); |
|
|
|
|
$arr = []; |
|
|
|
|
$arr1 = []; |
|
|
|
|
if (isset($hasGoods['data']) && !empty($hasGoods['data'])) { |
|
|
|
|
foreach ($hasGoods['data'] as $v) { |
|
|
|
|
$arr[] = $v['category_id']; |
|
|
|
@ -58,10 +59,10 @@ class Category extends Controller |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (!empty($arr)) { |
|
|
|
|
$arr = ['cataIds' => $hasGoods]; |
|
|
|
|
$arr1 = ['cataIds' => $arr]; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
$list = $model->getListPublic($this->request->param(), $arr); |
|
|
|
|
$list = $model->getListPublic($this->request->param(), $arr1); |
|
|
|
|
$tmplist = []; |
|
|
|
|
foreach ($list as $kl => $l) { |
|
|
|
|
$tmplist[$kl] = $this->listcata($list, $hasGoods); |
|
|
|
|