From 0b9bfe36e3088b92b7dbd92bdfaaae67b06c08bd Mon Sep 17 00:00:00 2001 From: wangxinglong <2371974647@qq.com> Date: Fri, 17 Dec 2021 14:52:51 +0800 Subject: [PATCH] settter --- app/validate/BusinessValidate.php | 6 +++--- app/validate/CouponRelease.php | 4 ++-- view/manager/coupon/edit.html | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/app/validate/BusinessValidate.php b/app/validate/BusinessValidate.php index 995c18f..27a0be3 100644 --- a/app/validate/BusinessValidate.php +++ b/app/validate/BusinessValidate.php @@ -9,7 +9,7 @@ class BusinessValidate extends Validate protected $rule = [ 'type' => 'require|gt:0', 'business_name|商家名称' => 'require|max:150', - 'business_subtitle|商家简称' => 'max:50', + 'business_subtitle|商家简称' => 'require|max:150', 'business_license|营业执照' => 'require|max:250', 'contact_name|联系人' => 'require|max:20', 'contact_phone|联系电话' => 'require|max:20', @@ -22,8 +22,8 @@ class BusinessValidate extends Validate 'business_address|商家地址' => 'require|max:250', 'characteristic|商家特色' => 'max:250', - 'background|商家背景图' => 'max:250', - 'business_circle_id' => 'egt:0', + 'background|商家背景图' => 'require|max:250', + 'business_circle_id|所属商圈' => 'egt:0', ]; diff --git a/app/validate/CouponRelease.php b/app/validate/CouponRelease.php index 1d7d99c..a9f8d29 100644 --- a/app/validate/CouponRelease.php +++ b/app/validate/CouponRelease.php @@ -18,7 +18,7 @@ class CouponRelease extends Validate 'name|优惠券名称' => 'require|length:3,32', 'money|金额' => 'require|>:0|<=:5000', 'deduction_money|扣除金额' => 'require|>=:0.1|<=:5000', - //'image_url|预览图' => '', + 'image_url|预览图' => 'require', //'using_rule|使用规则' => '', //'punishing_rule|处罚规则' => '', //'using_count|使用中' => '', @@ -31,7 +31,7 @@ class CouponRelease extends Validate ]; protected $scene = [ - 'edit' => ['start_time', 'end_time', 'name',"status","on_shelf"], + 'edit' => ['start_time', 'end_time', 'name',"status","on_shelf",'image_url'], 'api_edit' => ['name', 'type', 'start_time',"end_time","image_url"], ]; diff --git a/view/manager/coupon/edit.html b/view/manager/coupon/edit.html index 4724b88..36096ad 100644 --- a/view/manager/coupon/edit.html +++ b/view/manager/coupon/edit.html @@ -55,14 +55,14 @@