作者 lyh

列表页聚合页模式

@@ -260,4 +260,23 @@ class CategoryController extends BaseController @@ -260,4 +260,23 @@ class CategoryController extends BaseController
260 $this->logic->copyCategoryInfo(); 260 $this->logic->copyCategoryInfo();
261 $this->response('success'); 261 $this->response('success');
262 } 262 }
  263 +
  264 + /**
  265 + * @remark :更改状态
  266 + * @name :editIsType
  267 + * @author :lyh
  268 + * @method :post
  269 + * @time :2025/7/30 14:23
  270 + */
  271 + public function editIsType(){
  272 + $this->request->validate([
  273 + 'id'=>['required'],
  274 + 'is_type'=>['required'],
  275 + ],[
  276 + 'id.required' => 'ID不能为空',
  277 + 'is_type.required' => 'is_type不能为空',
  278 + ]);
  279 + $data = $this->logic->editIsType($this->param['is_type'],$this->param['id']);
  280 + $this->response('success',Code::SUCCESS,$data);
  281 + }
263 } 282 }
@@ -361,4 +361,16 @@ class CategoryLogic extends BaseLogic @@ -361,4 +361,16 @@ class CategoryLogic extends BaseLogic
361 ]; 361 ];
362 return $this->success($param); 362 return $this->success($param);
363 } 363 }
  364 +
  365 + /**
  366 + * @remark :更改分类为聚合页模式
  367 + * @name :editIsType
  368 + * @author :lyh
  369 + * @method :post
  370 + * @time :2025/7/30 14:21
  371 + */
  372 + public function editIsType($is_type = 0,$id){
  373 + $data = $this->model->edit(['iS_type'=>$is_type],['id'=>$id]);
  374 + return $this->success($data);
  375 + }
364 } 376 }
@@ -304,6 +304,7 @@ Route::middleware(['bloginauth'])->group(function () { @@ -304,6 +304,7 @@ Route::middleware(['bloginauth'])->group(function () {
304 Route::post('category/sort', [\App\Http\Controllers\Bside\Product\CategoryController::class, 'sort'])->name('product_category_sort'); 304 Route::post('category/sort', [\App\Http\Controllers\Bside\Product\CategoryController::class, 'sort'])->name('product_category_sort');
305 Route::any('category/delete', [\App\Http\Controllers\Bside\Product\CategoryController::class, 'delete'])->name('product_category_delete'); 305 Route::any('category/delete', [\App\Http\Controllers\Bside\Product\CategoryController::class, 'delete'])->name('product_category_delete');
306 Route::any('category/allSort', [\App\Http\Controllers\Bside\Product\CategoryController::class, 'allSort'])->name('product_category_allSort'); 306 Route::any('category/allSort', [\App\Http\Controllers\Bside\Product\CategoryController::class, 'allSort'])->name('product_category_allSort');
  307 + Route::any('category/editIsType', [\App\Http\Controllers\Bside\Product\CategoryController::class, 'editIsType'])->name('product_category_editIsType');//列表页聚合页设置
307 Route::any('category/copyCategory', [\App\Http\Controllers\Bside\Product\CategoryController::class, 'copyCategory'])->name('product_category_copyCategory'); 308 Route::any('category/copyCategory', [\App\Http\Controllers\Bside\Product\CategoryController::class, 'copyCategory'])->name('product_category_copyCategory');
308 //产品关键词 309 //产品关键词
309 Route::get('keyword', [\App\Http\Controllers\Bside\Product\KeywordController::class, 'index'])->name('product_keyword'); 310 Route::get('keyword', [\App\Http\Controllers\Bside\Product\KeywordController::class, 'index'])->name('product_keyword');