正在显示
3 个修改的文件
包含
19 行增加
和
13 行删除
| @@ -171,18 +171,6 @@ class ProductController extends BaseController | @@ -171,18 +171,6 @@ class ProductController extends BaseController | ||
| 171 | } | 171 | } |
| 172 | 172 | ||
| 173 | /** | 173 | /** |
| 174 | - * @remark :搜索分类参数 | ||
| 175 | - * @name :searchCategory | ||
| 176 | - * @author :lyh | ||
| 177 | - * @method :post | ||
| 178 | - * @time :2024/7/9 14:48 | ||
| 179 | - */ | ||
| 180 | - public function getSearchCategoryList(ProductLogic $logic){ | ||
| 181 | - $data = $logic->getSearchCategoryList(); | ||
| 182 | - $this->response('success',Code::SUCCESS,$data); | ||
| 183 | - } | ||
| 184 | - | ||
| 185 | - /** | ||
| 186 | * @remark :获取当前id下所有子集 | 174 | * @remark :获取当前id下所有子集 |
| 187 | * @name :getAllSub | 175 | * @name :getAllSub |
| 188 | * @author :lyh | 176 | * @author :lyh |
| @@ -592,4 +580,21 @@ class ProductController extends BaseController | @@ -592,4 +580,21 @@ class ProductController extends BaseController | ||
| 592 | } | 580 | } |
| 593 | $this->response('success',Code::SUCCESS,$productInfo); | 581 | $this->response('success',Code::SUCCESS,$productInfo); |
| 594 | } | 582 | } |
| 583 | + | ||
| 584 | + /** | ||
| 585 | + * @remark :搜索分类参数 | ||
| 586 | + * @name :searchCategory | ||
| 587 | + * @author :lyh | ||
| 588 | + * @method :post | ||
| 589 | + * @time :2024/7/9 14:48 | ||
| 590 | + */ | ||
| 591 | + public function getSearchCategoryList(ProductLogic $logic){ | ||
| 592 | + $this->request->validate([ | ||
| 593 | + 'featured_status'=>'numeric', | ||
| 594 | + ],[ | ||
| 595 | + 'featured_status.numeric' => 'numeric为数字', | ||
| 596 | + ]); | ||
| 597 | + $data = $logic->getSearchCategoryList(); | ||
| 598 | + $this->response('success',Code::SUCCESS,$data); | ||
| 599 | + } | ||
| 595 | } | 600 | } |
| @@ -862,7 +862,7 @@ class ProductLogic extends BaseLogic | @@ -862,7 +862,7 @@ class ProductLogic extends BaseLogic | ||
| 862 | { | 862 | { |
| 863 | $categoryModel = new Category(); | 863 | $categoryModel = new Category(); |
| 864 | $this->param['deleted_at'] = null; | 864 | $this->param['deleted_at'] = null; |
| 865 | - if(!empty($cateList) && !isset($this->param['featured_status'])) { | 865 | + if(!isset($this->param['featured_status'])) { |
| 866 | $this->param['title'] = ['not like','%Featured%']; | 866 | $this->param['title'] = ['not like','%Featured%']; |
| 867 | } | 867 | } |
| 868 | $list = $categoryModel->list($this->param, ['sort', 'id'], ['id', 'pid', 'title']); | 868 | $list = $categoryModel->list($this->param, ['sort', 'id'], ['id', 'pid', 'title']); |
| @@ -255,6 +255,7 @@ Route::middleware(['bloginauth'])->group(function () { | @@ -255,6 +255,7 @@ Route::middleware(['bloginauth'])->group(function () { | ||
| 255 | Route::any('/copyProduct', [\App\Http\Controllers\Bside\Product\ProductController::class, 'copyProduct'])->name('product_copyProduct'); | 255 | Route::any('/copyProduct', [\App\Http\Controllers\Bside\Product\ProductController::class, 'copyProduct'])->name('product_copyProduct'); |
| 256 | Route::any('/batchSetCategory', [\App\Http\Controllers\Bside\Product\ProductController::class, 'batchSetCategory'])->name('product_batchSetCategory'); | 256 | Route::any('/batchSetCategory', [\App\Http\Controllers\Bside\Product\ProductController::class, 'batchSetCategory'])->name('product_batchSetCategory'); |
| 257 | Route::any('/sendAiProduct', [\App\Http\Controllers\Bside\Product\ProductController::class, 'sendAiProduct'])->name('product_sendAiProduct'); | 257 | Route::any('/sendAiProduct', [\App\Http\Controllers\Bside\Product\ProductController::class, 'sendAiProduct'])->name('product_sendAiProduct'); |
| 258 | + Route::any('/getSearchCategoryList', [\App\Http\Controllers\Bside\Product\ProductController::class, 'getSearchCategoryList'])->name('product_getSearchCategoryList'); | ||
| 258 | //产品分类 | 259 | //产品分类 |
| 259 | Route::get('category', [\App\Http\Controllers\Bside\Product\CategoryController::class, 'index'])->name('product_category'); | 260 | Route::get('category', [\App\Http\Controllers\Bside\Product\CategoryController::class, 'index'])->name('product_category'); |
| 260 | Route::get('category/info', [\App\Http\Controllers\Bside\Product\CategoryController::class, 'info'])->name('product_category_info'); | 261 | Route::get('category/info', [\App\Http\Controllers\Bside\Product\CategoryController::class, 'info'])->name('product_category_info'); |
-
请 注册 或 登录 后发表评论