feature/main20240421
郭嘉 9 months ago
parent a398f33a7f
commit faf254b49a
  1. 6
      app/api/controller/Category.php

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

Loading…
Cancel
Save