service = PackageService::getInstance(); $this->insertField = ['name']; $this->updateField = ['id', 'name']; $this->notRequest = ['cover', 'subtitle', 'remark', 'is_hot', 'sort', 'status', 'package_amount']; } /** * 上架 / 下架 * @Method POST */ public function status(): JsonResponse { return jok( $this->service->status((int) request()->post('id'), request()->post('status')), '操作成功' ); } /** * 保存搭配明细并重算原价 / 补差价 * @Method POST */ public function saveItems(): JsonResponse { return jok($this->service->saveItems(request()->post()), '搭配已保存'); } /** * 搭配搜索:带回封面和规格,无有效报价的规格 selectable=false * @Method GET */ public function searchCatalog(): JsonResponse { return jok($this->service->searchCatalog()); } }