@ -41,8 +41,6 @@ class Category extends CategoryModel
*/
public function getListPublic(array $param = []): array
{
//添加店内分类
$param['is_in_store'] = !empty($param['is_in_store']) ? $param['is_in_store'] : 0;
return parent::getList(array_merge($param, ['status' => 1]));
}
@ -90,6 +90,10 @@ class Category extends BaseModel
if (!empty($_GET['is_hot']) && $_GET['is_hot'] == 1) {
$filter[] = ['is_hot', '=', $params['is_hot']];
// if (!empty($param['is_in_store']) && $param['is_in_store'] == 1) {
$filter[] = ['is_in_store', '=', $params['is_in_store'] ?? 0];
// }
// 查询列表数据
return $this->with(['image'])
@ -319,6 +319,8 @@ class Goods extends BaseModel
$filter[] = ['paihang', '>', 0];
$query->order('paihang asc');
//是否店内
// 实例化新查询对象
return $query->where($filter);