wysf
liuqing 9 months ago
parent 6b6d11e579
commit 2bf78781d1
  1. 4
      app/common/model/Category.php

@ -107,6 +107,10 @@ class Category extends BaseModel
} }
isset($params['store_id']) && $params['store_id'] > -1 && $filter[] = ['store_id', '=', (int)$params['store_id']]; isset($params['store_id']) && $params['store_id'] > -1 && $filter[] = ['store_id', '=', (int)$params['store_id']];
if (isset($param['category_id']) && $param['category_id'] != "") {
$filter[] = ['parent_id', '=', $params['category_id']];
}
// 查询列表数据 // 查询列表数据
return $this->with(['image']) return $this->with(['image'])
->where($filter) ->where($filter)

Loading…
Cancel
Save