From 3556bf3bfc41632437885944d5ec27be0f8c897c Mon Sep 17 00:00:00 2001 From: jsasg <735273025@qq.com> Date: Thu, 13 Feb 2025 16:12:50 +0800 Subject: [PATCH] =?UTF-8?q?refactor:=20=E4=BF=AE=E6=94=B9=E4=BA=A7?= =?UTF-8?q?=E5=93=81=E9=AA=8C=E8=AF=81=E5=99=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/admin/validate/v1/ProductValidate.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/app/admin/validate/v1/ProductValidate.php b/app/admin/validate/v1/ProductValidate.php index 572dcc14..dce02abe 100644 --- a/app/admin/validate/v1/ProductValidate.php +++ b/app/admin/validate/v1/ProductValidate.php @@ -28,6 +28,7 @@ class ProductValidate extends Validate 'is_sale' => 'in:0,1', 'is_new' => 'in:0,1', 'is_hot' => 'in:0,1', + 'is_show' => 'in:0,1', 'sort' => 'integer', 'detail' => 'max:65535', 'status' => 'in:-1,1', @@ -62,9 +63,10 @@ class ProductValidate extends Validate 'desc.max' => '描述不能超过255个字符', 'video_img.max' => '视频封面图不能超过255个字符', 'video_url.max' => '视频地址不能超过255个字符', - 'is_sale.in' => '上架状态值错误', + 'is_sale.in' => '在售状态值错误', 'is_new.in' => '新品状态值错误', 'is_hot.in' => '热门状态值错误', + 'is_show.in' => '上下架状态值错误', 'sort.integer' => '排序值类型错误', 'detail.max' => '详情不能超过65535个字符', 'status.in' => '状态值错误', @@ -86,7 +88,7 @@ class ProductValidate extends Validate */ public function sceneIndex() { - return $this->only(['created_id', 'is_sale', 'created_at']); + return $this->only(['categroy_id', 'is_show', 'created_at']); } /** @@ -107,6 +109,7 @@ class ProductValidate extends Validate 'is_sale', 'is_new', 'is_hot', + 'is_show', 'sort', 'detail', 'status',