diff --git a/app/controller/api/store/product/StoreSpu.php b/app/controller/api/store/product/StoreSpu.php index a6423693..dce7c908 100644 --- a/app/controller/api/store/product/StoreSpu.php +++ b/app/controller/api/store/product/StoreSpu.php @@ -91,7 +91,7 @@ class StoreSpu extends BaseController unset($where['type_id'], $where['street_id'],$where['type_code'],$where['village_id']); $where['is_gift_bag'] = 0; - $where['product_type'] = $where['product_type']??0; + $where['product_type'] = $where['product_type'] != '' ? $where['product_type'] : 0; $where['order'] = $where['order'] ?: 'star'; if ($where['is_trader'] != 1) unset($where['is_trader']); if($where['category_id']!=''){