refactor: 修改产品分类列表接口

This commit is contained in:
2025-03-31 14:11:10 +08:00
parent 3a763be41a
commit 73d1770207
2 changed files with 2 additions and 2 deletions

View File

@@ -34,7 +34,7 @@ class ProductCategory
'name_nullable' => $params['keywords']??null
])
->where(function($query) use($params) {
if (!empty($params['is_show'])) {
if (isset($params['is_show'])) {
$query->where('is_show', '=', $params['is_show']);
}
})

View File

@@ -286,7 +286,7 @@ Route::group('v1', function () {
});
// 产品分类
Route::get('categorys', 'ProductCategory/index')->append(['is_show' => '1']);
Route::get('categorys', 'ProductCategory/index');
Route::group('category', function () {
// tco分类树
Route::get('tco/tree', 'ProductTcoCategory/tree');