|
...
|
...
|
@@ -40,7 +40,7 @@ class CategoryController extends BaseController |
|
|
|
$data = [];
|
|
|
|
if(!empty($list)){
|
|
|
|
foreach ($list as $k =>$v){
|
|
|
|
$v = $this->handleParam($category,$v);
|
|
|
|
$v = $this->handleParam($v);
|
|
|
|
$list[$k] = $v;
|
|
|
|
}
|
|
|
|
$data = $this->getListSon($list);
|
|
...
|
...
|
@@ -55,9 +55,9 @@ class CategoryController extends BaseController |
|
|
|
* @method :post
|
|
|
|
* @time :2023/8/17 11:10
|
|
|
|
*/
|
|
|
|
public function handleParam(&$category,$v){
|
|
|
|
public function handleParam($v){
|
|
|
|
$v['url'] = $this->user['domain'] . RouteMap::getRoute(RouteMap::SOURCE_PRODUCT_CATE, $v['id'], $v['project_id']);
|
|
|
|
$v['product_num'] = Product::where('category_id','like' ,'%,'.$v['category_id'].',%')->count();;
|
|
|
|
$v['product_num'] = Product::where('category_id','like' ,'%,'.$v['id'].',%')->count();;
|
|
|
|
$v['image_link'] = getImageUrl($v['image']);
|
|
|
|
return $v;
|
|
|
|
}
|
...
|
...
|
|