作者 lyh

列表页聚合页模式

... ... @@ -260,4 +260,23 @@ class CategoryController extends BaseController
$this->logic->copyCategoryInfo();
$this->response('success');
}
/**
* @remark :更改状态
* @name :editIsType
* @author :lyh
* @method :post
* @time :2025/7/30 14:23
*/
public function editIsType(){
$this->request->validate([
'id'=>['required'],
'is_type'=>['required'],
],[
'id.required' => 'ID不能为空',
'is_type.required' => 'is_type不能为空',
]);
$data = $this->logic->editIsType($this->param['is_type'],$this->param['id']);
$this->response('success',Code::SUCCESS,$data);
}
}
... ...
... ... @@ -361,4 +361,16 @@ class CategoryLogic extends BaseLogic
];
return $this->success($param);
}
/**
* @remark :更改分类为聚合页模式
* @name :editIsType
* @author :lyh
* @method :post
* @time :2025/7/30 14:21
*/
public function editIsType($is_type = 0,$id){
$data = $this->model->edit(['iS_type'=>$is_type],['id'=>$id]);
return $this->success($data);
}
}
... ...
... ... @@ -304,6 +304,7 @@ Route::middleware(['bloginauth'])->group(function () {
Route::post('category/sort', [\App\Http\Controllers\Bside\Product\CategoryController::class, 'sort'])->name('product_category_sort');
Route::any('category/delete', [\App\Http\Controllers\Bside\Product\CategoryController::class, 'delete'])->name('product_category_delete');
Route::any('category/allSort', [\App\Http\Controllers\Bside\Product\CategoryController::class, 'allSort'])->name('product_category_allSort');
Route::any('category/editIsType', [\App\Http\Controllers\Bside\Product\CategoryController::class, 'editIsType'])->name('product_category_editIsType');//列表页聚合页设置
Route::any('category/copyCategory', [\App\Http\Controllers\Bside\Product\CategoryController::class, 'copyCategory'])->name('product_category_copyCategory');
//产品关键词
Route::get('keyword', [\App\Http\Controllers\Bside\Product\KeywordController::class, 'index'])->name('product_keyword');
... ...