chore: 添加静态资源文件和版本配置文件
添加大量图片、字体、音频等静态资源文件,包括用户界面图片、模板文件和安装界面素材 添加系统版本配置文件(.version)和常量定义文件(.constant) 更新供应商依赖文件,包括Symfony VarDumper组件和相关许可证文件 添加验证码配置文件(captcha.php)和.gitignore规则
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
|
||||
// +----------------------------------------------------------------------
|
||||
// | Copyright (c) 2016~2026 https://www.crmeb.com All rights reserved.
|
||||
// +----------------------------------------------------------------------
|
||||
// | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
|
||||
// +----------------------------------------------------------------------
|
||||
// | Author: CRMEB Team <admin@crmeb.com>
|
||||
// +----------------------------------------------------------------------
|
||||
namespace app\validate\admin\marketing;
|
||||
|
||||
use think\Validate;
|
||||
|
||||
class StoreActivitySeckillValidate extends Validate
|
||||
{
|
||||
/**
|
||||
* 定义验证规则
|
||||
* 格式:'字段名' => ['规则1','规则2'...]
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $rule = [
|
||||
'name|活动名称' => 'require',
|
||||
'section_data|活动日期' => 'require',
|
||||
'num|活动限购' => 'require|gt:0',
|
||||
'once_num|活动单次限购' => 'require|gt:0',
|
||||
'time_id|活动场次' => 'require',
|
||||
'seckill_ids|活动商品' => 'require',
|
||||
];
|
||||
|
||||
}
|
||||
66
app/validate/admin/marketing/StoreBargainValidate.php
Normal file
66
app/validate/admin/marketing/StoreBargainValidate.php
Normal file
@@ -0,0 +1,66 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
|
||||
// +----------------------------------------------------------------------
|
||||
// | Copyright (c) 2016~2026 https://www.crmeb.com All rights reserved.
|
||||
// +----------------------------------------------------------------------
|
||||
// | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
|
||||
// +----------------------------------------------------------------------
|
||||
// | Author: CRMEB Team <admin@crmeb.com>
|
||||
// +----------------------------------------------------------------------
|
||||
namespace app\validate\admin\marketing;
|
||||
|
||||
use think\Validate;
|
||||
|
||||
class StoreBargainValidate extends Validate
|
||||
{
|
||||
/**
|
||||
* 定义验证规则
|
||||
* 格式:'字段名' => ['规则1','规则2'...]
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $rule = [
|
||||
'product_id' => 'require',
|
||||
'title' => 'require',
|
||||
'info' => 'require',
|
||||
'unit_name' => 'require',
|
||||
'images' => 'require',
|
||||
'section_time' => 'require',
|
||||
'num' => 'require|gt:0',
|
||||
'temp_id' => 'require',
|
||||
'description' => 'require',
|
||||
'attrs' => 'require',
|
||||
'items' => 'require',
|
||||
'bargain_num'=>'require|gt:0',
|
||||
'people_num'=>'require|gt:1',
|
||||
];
|
||||
|
||||
/**
|
||||
* 定义错误信息
|
||||
* 格式:'字段名.规则名' => '错误信息'
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $message = [
|
||||
'product_id.require' => '请选择商品',
|
||||
'title.require' => '请填写商品标题',
|
||||
'info.require' => '请填写砍价活动简介',
|
||||
'unit_name.require' => '请填写单位',
|
||||
'images.require' => '请选择商品轮播图',
|
||||
'section_time.require' => '请选择时间段',
|
||||
'num.require' => '请填写购买数量限制',
|
||||
'num.gt' => '购买数量限制必须大于0',
|
||||
'bargain_num.require' => '请填写帮砍次数',
|
||||
'bargain_num.gt' => '帮砍次数必须大于0',
|
||||
'people_num.require' => '请填写砍价人数',
|
||||
'people_num.gt' => '砍价人数必须大于1',
|
||||
'temp_id.require' => '请选择运费模板',
|
||||
'description.require' => '请填写砍价商品详情',
|
||||
'attrs.require' => '请选择规格',
|
||||
];
|
||||
|
||||
protected $scene = [
|
||||
'save' => ['product_id', 'title', 'info', 'unit_name', 'image', 'images', 'give_integral', 'section_time', 'is_hot', 'status', 'num', 'bargain_num', 'people_num', 'temp_id', 'sort', 'description', 'attrs', 'items'],
|
||||
];
|
||||
}
|
||||
73
app/validate/admin/marketing/StoreCombinationValidate.php
Normal file
73
app/validate/admin/marketing/StoreCombinationValidate.php
Normal file
@@ -0,0 +1,73 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
|
||||
// +----------------------------------------------------------------------
|
||||
// | Copyright (c) 2016~2026 https://www.crmeb.com All rights reserved.
|
||||
// +----------------------------------------------------------------------
|
||||
// | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
|
||||
// +----------------------------------------------------------------------
|
||||
// | Author: CRMEB Team <admin@crmeb.com>
|
||||
// +----------------------------------------------------------------------
|
||||
namespace app\validate\admin\marketing;
|
||||
|
||||
use think\Validate;
|
||||
|
||||
class StoreCombinationValidate extends Validate
|
||||
{
|
||||
/**
|
||||
* 定义验证规则
|
||||
* 格式:'字段名' => ['规则1','规则2'...]
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $rule = [
|
||||
'product_id' => 'require',
|
||||
'title' => 'require',
|
||||
'info' => 'require',
|
||||
'unit_name' => 'require',
|
||||
'images' => 'require',
|
||||
'section_time' => 'require',
|
||||
'num' => 'require|gt:0',
|
||||
'once_num' => 'require|gt:0',
|
||||
'temp_id' => 'require',
|
||||
'description' => 'require',
|
||||
'attrs' => 'require',
|
||||
'items' => 'require',
|
||||
'people' => 'require|gt:1',
|
||||
'effective_time' => 'require|gt:0',
|
||||
'virtual' => 'require|gt:0|elt:100',
|
||||
];
|
||||
|
||||
/**
|
||||
* 定义错误信息
|
||||
* 格式:'字段名.规则名' => '错误信息'
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $message = [
|
||||
'product_id.require' => '请选择商品',
|
||||
'title.require' => '请填写商品标题',
|
||||
'info.require' => '请填写拼团活动简介',
|
||||
'unit_name.require' => '请填写单位',
|
||||
'images.require' => '请选择商品轮播图',
|
||||
'section_time.require' => '请选择时间段',
|
||||
'num.require' => '请填写购买数量',
|
||||
'num.gt' => '购买数量必须大于0',
|
||||
'virtual.require' => '请填写虚拟拼团比例',
|
||||
'virtual.gt' => '虚拟拼团比例必须在1-100之间',
|
||||
'virtual.elt' => '虚拟拼团比例必须在1-100之间',
|
||||
'once_num.require' => '请填写单次购买数量',
|
||||
'once_num.gt' => '单次购买数量必须大于0',
|
||||
'temp_id.require' => '请选择运费模板',
|
||||
'description.require' => '请填写拼团商品详情',
|
||||
'attrs.require' => '请选择规格',
|
||||
'people.require' => '请填写成团人数',
|
||||
'people.gt' => '拼团人数不能小于2人',
|
||||
'effective_time.require' => '请填写成团有效期',
|
||||
'effective_time.gt' => '成团有效期必须大于0',
|
||||
];
|
||||
|
||||
protected $scene = [
|
||||
'save' => ['product_id', 'title', 'info', 'unit_name', 'image', 'images', 'section_time', 'is_host', 'is_show', 'num', 'people', 'once_num', 'virtual', 'temp_id', 'sort', 'description', 'attrs', 'items', 'people', 'effective_time'],
|
||||
];
|
||||
}
|
||||
54
app/validate/admin/marketing/StoreCouponValidate.php
Normal file
54
app/validate/admin/marketing/StoreCouponValidate.php
Normal file
@@ -0,0 +1,54 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
|
||||
// +----------------------------------------------------------------------
|
||||
// | Copyright (c) 2016~2026 https://www.crmeb.com All rights reserved.
|
||||
// +----------------------------------------------------------------------
|
||||
// | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
|
||||
// +----------------------------------------------------------------------
|
||||
// | Author: CRMEB Team <admin@crmeb.com>
|
||||
// +----------------------------------------------------------------------
|
||||
namespace app\validate\admin\marketing;
|
||||
|
||||
use think\Validate;
|
||||
|
||||
class StoreCouponValidate extends Validate
|
||||
{
|
||||
/**
|
||||
* 定义验证规则
|
||||
* 格式:'字段名' => ['规则1','规则2'...]
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $rule = [
|
||||
'title' => 'require',
|
||||
'image' => 'require',
|
||||
'category_id' => 'require',
|
||||
'coupon_price' => 'require',
|
||||
'use_min_price' => 'require',
|
||||
'coupon_time' => 'require',
|
||||
'status' => 'In:0,1',
|
||||
'type' => ['require', 'In:0,1,2'],
|
||||
];
|
||||
|
||||
/**
|
||||
* 定义错误信息
|
||||
* 格式:'字段名.规则名' => '错误信息'
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $message = [
|
||||
'title.require' => '请填写优惠卷名称',
|
||||
'image.require' => '请选择商品',
|
||||
'category_id.require' => '请选择商品类型',
|
||||
'coupon_price.require' => '请填写优惠卷金额',
|
||||
'use_min_price.require' => '请填写优惠卷最小使用金额',
|
||||
'coupon_time.require' => '请填写优惠卷有效期',
|
||||
];
|
||||
|
||||
protected $scene = [
|
||||
'save' => ['title', 'coupon_price', 'use_min_price', 'coupon_time'],
|
||||
'type' => ['title', 'category_id', 'coupon_price', 'use_min_price', 'coupon_time'],
|
||||
'product' => ['title', 'image', 'coupon_price', 'use_min_price', 'coupon_time'],
|
||||
];
|
||||
}
|
||||
55
app/validate/admin/marketing/StoreIntegralValidate.php
Normal file
55
app/validate/admin/marketing/StoreIntegralValidate.php
Normal file
@@ -0,0 +1,55 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
|
||||
// +----------------------------------------------------------------------
|
||||
// | Copyright (c) 2016~2026 https://www.crmeb.com All rights reserved.
|
||||
// +----------------------------------------------------------------------
|
||||
// | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
|
||||
// +----------------------------------------------------------------------
|
||||
// | Author: CRMEB Team <admin@crmeb.com>
|
||||
// +----------------------------------------------------------------------
|
||||
namespace app\validate\admin\marketing;
|
||||
|
||||
use think\Validate;
|
||||
|
||||
class StoreIntegralValidate extends Validate
|
||||
{
|
||||
/**
|
||||
* 定义验证规则
|
||||
* 格式:'字段名' => ['规则1','规则2'...]
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $rule = [
|
||||
'product_id' => 'require',
|
||||
'title' => 'require',
|
||||
'info' => 'require',
|
||||
'unit_name' => 'require',
|
||||
'image' => 'require',
|
||||
'images' => 'require',
|
||||
'description' => 'require',
|
||||
'attrs' => 'require',
|
||||
'items' => 'require',
|
||||
];
|
||||
|
||||
/**
|
||||
* 定义错误信息
|
||||
* 格式:'字段名.规则名' => '错误信息'
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $message = [
|
||||
'product_id.require' => '请选择商品',
|
||||
'title.require' => '请填写商品标题',
|
||||
'info.require' => '请填写秒杀活动简介',
|
||||
'unit_name.require' => '请填写单位',
|
||||
'image.require' => '请选择商品主图',
|
||||
'images.require' => '请选择商品轮播图',
|
||||
'description.require' => '请填写积分商品详情',
|
||||
'attrs.require' => '请选择规格',
|
||||
];
|
||||
|
||||
protected $scene = [
|
||||
'save' => ['product_id', 'title', 'unit_name', 'image', 'images', 'num', 'once_num', 'sort', 'description', 'attrs', 'items'],
|
||||
];
|
||||
}
|
||||
23
app/validate/admin/marketing/StoreSeckillTimeValidate.php
Normal file
23
app/validate/admin/marketing/StoreSeckillTimeValidate.php
Normal file
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
|
||||
// +----------------------------------------------------------------------
|
||||
// | Copyright (c) 2016~2026 https://www.crmeb.com All rights reserved.
|
||||
// +----------------------------------------------------------------------
|
||||
// | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
|
||||
// +----------------------------------------------------------------------
|
||||
// | Author: CRMEB Team <admin@crmeb.com>
|
||||
// +----------------------------------------------------------------------
|
||||
namespace app\validate\admin\marketing;
|
||||
|
||||
use think\Validate;
|
||||
|
||||
class StoreSeckillTimeValidate extends Validate
|
||||
{
|
||||
|
||||
protected $rule = [
|
||||
'time|时间选择' => 'require',
|
||||
'status|状态' => 'require|in:0,1',
|
||||
];
|
||||
|
||||
}
|
||||
65
app/validate/admin/marketing/StoreSeckillValidate.php
Normal file
65
app/validate/admin/marketing/StoreSeckillValidate.php
Normal file
@@ -0,0 +1,65 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
|
||||
// +----------------------------------------------------------------------
|
||||
// | Copyright (c) 2016~2026 https://www.crmeb.com All rights reserved.
|
||||
// +----------------------------------------------------------------------
|
||||
// | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
|
||||
// +----------------------------------------------------------------------
|
||||
// | Author: CRMEB Team <admin@crmeb.com>
|
||||
// +----------------------------------------------------------------------
|
||||
namespace app\validate\admin\marketing;
|
||||
|
||||
use think\Validate;
|
||||
|
||||
class StoreSeckillValidate extends Validate
|
||||
{
|
||||
/**
|
||||
* 定义验证规则
|
||||
* 格式:'字段名' => ['规则1','规则2'...]
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $rule = [
|
||||
'product_id' => 'require',
|
||||
'title' => 'require',
|
||||
'info' => 'require',
|
||||
'unit_name' => 'require',
|
||||
'images' => 'require',
|
||||
'section_time' => 'require',
|
||||
'num' => 'require|gt:0',
|
||||
'once_num' => 'require|gt:0',
|
||||
'time_id' => 'require',
|
||||
'temp_id' => 'require',
|
||||
'description' => 'require',
|
||||
'attrs' => 'require',
|
||||
'items' => 'require',
|
||||
];
|
||||
|
||||
/**
|
||||
* 定义错误信息
|
||||
* 格式:'字段名.规则名' => '错误信息'
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $message = [
|
||||
'product_id.require' => '请选择商品',
|
||||
'title.require' => '请填写商品标题',
|
||||
'info.require' => '请填写秒杀活动简介',
|
||||
'unit_name.require' => '请填写单位',
|
||||
'images.require' => '请选择商品轮播图',
|
||||
'section_time.require' => '请选择时间段',
|
||||
'num.require' => '请填写数量限制',
|
||||
'num.gt' => '数量限制必须大于0',
|
||||
'once_num.require' => '请填写单次购买次数',
|
||||
'once_num.gt' => '单次购买次数必须大于0',
|
||||
'time_id.require' => '请选择秒杀时间段',
|
||||
'temp_id.require' => '请选择运费模板',
|
||||
'description.require' => '请填写秒杀商品详情',
|
||||
'attrs.require' => '请选择规格',
|
||||
];
|
||||
|
||||
protected $scene = [
|
||||
'save' => ['product_id', 'title', 'info', 'unit_name', 'image', 'images', 'give_integral', 'section_time', 'is_hot', 'status', 'num', 'once_num', 'time_id', 'temp_id', 'sort', 'description', 'attrs', 'items'],
|
||||
];
|
||||
}
|
||||
59
app/validate/admin/marketing/card/CardBatchValidate.php
Normal file
59
app/validate/admin/marketing/card/CardBatchValidate.php
Normal file
@@ -0,0 +1,59 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
|
||||
// +----------------------------------------------------------------------
|
||||
// | Copyright (c) 2016~2026 https://www.crmeb.com All rights reserved.
|
||||
// +----------------------------------------------------------------------
|
||||
// | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
|
||||
// +----------------------------------------------------------------------
|
||||
// | Author: CRMEB Team <admin@crmeb.com>
|
||||
// +----------------------------------------------------------------------
|
||||
namespace app\validate\admin\marketing\card;
|
||||
|
||||
use think\Validate;
|
||||
|
||||
class CardBatchValidate extends Validate
|
||||
{
|
||||
/**
|
||||
* 验证规则
|
||||
*/
|
||||
protected $rule = [
|
||||
'name' => 'require|max:50',
|
||||
'card_prefix' => 'require|max:20',
|
||||
'card_suffix' => 'require|max:20',
|
||||
'total_num' => 'require|integer|gt:0|max:99999',
|
||||
'pwd_type' => 'require|array',
|
||||
'pwd_num' => 'require|integer|gt:0|max:10',
|
||||
];
|
||||
|
||||
/**
|
||||
* 定义错误信息
|
||||
* 格式:'字段名.规则名' => '错误信息'
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $message = [
|
||||
'name.require' => '请填写卡次名称',
|
||||
'name.max' => '卡次名称最多不能超过50个字符',
|
||||
'card_prefix.require' => '请填写卡号前缀',
|
||||
'card_prefix.max' => '卡号前缀最多不能超过20个字符',
|
||||
'card_suffix.require' => '请填写卡号后缀',
|
||||
'card_suffix.max' => '卡号后缀最多不能超过20个字符',
|
||||
'total_num.require' => '请填写总数量',
|
||||
'total_num.integer' => '总数量必须为整数',
|
||||
'total_num.gt' => '总数量必须大于0',
|
||||
'pwd_type.require' => '请选择卡密内容',
|
||||
'pwd_type.array' => '卡密内容格式错误',
|
||||
'pwd_num.require' => '请填写卡密位数',
|
||||
'pwd_num.integer' => '卡密位数必须为整数',
|
||||
'pwd_num.gt' => '卡密位数必须大于0',
|
||||
];
|
||||
|
||||
/**
|
||||
* 定义验证场景
|
||||
* @var array
|
||||
*/
|
||||
protected $scene = [
|
||||
'save' => ['name', 'card_prefix', 'card_suffix', 'total_num', 'pwd_type', 'pwd_num']
|
||||
];
|
||||
}
|
||||
136
app/validate/admin/marketing/card/CardGiftValidate.php
Normal file
136
app/validate/admin/marketing/card/CardGiftValidate.php
Normal file
@@ -0,0 +1,136 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
|
||||
// +----------------------------------------------------------------------
|
||||
// | Copyright (c) 2016~2026 https://www.crmeb.com All rights reserved.
|
||||
// +----------------------------------------------------------------------
|
||||
// | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
|
||||
// +----------------------------------------------------------------------
|
||||
// | Author: CRMEB Team <admin@crmeb.com>
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
namespace app\validate\admin\marketing\card;
|
||||
|
||||
use think\Validate;
|
||||
|
||||
/**
|
||||
* 礼品卡验证器
|
||||
* Class CardGiftValidate
|
||||
* @package app\validate\admin\marketing\card
|
||||
*/
|
||||
class CardGiftValidate extends Validate
|
||||
{
|
||||
/**
|
||||
* 自定义验证规则
|
||||
* @param $value
|
||||
* @param $rule
|
||||
* @param $data
|
||||
* @return bool|string
|
||||
*/
|
||||
|
||||
public function checkTimeGiftNum($value, $rule, $data)
|
||||
{
|
||||
if ($data[$rule] == 1) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public function checkBalance($value, $rule, $data)
|
||||
{
|
||||
if ($data[$rule] == 1) {
|
||||
// 先检查字段是否存在
|
||||
if (!isset($data['balance'])) {
|
||||
return '余额字段必须填写';
|
||||
}
|
||||
$validate = new Validate();
|
||||
$validate->rule('balance', 'float|gt:0');
|
||||
return $validate->check($data) ?: $validate->getError();
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* 验证规则
|
||||
* @var array
|
||||
*/
|
||||
protected $rule = [
|
||||
'name' => 'require|max:50',
|
||||
'type' => 'require|in:1,2',
|
||||
'batch_id' => 'require|integer|gt:0',
|
||||
'total_num' => 'require|integer|gt:0',
|
||||
'instructions' => 'require|max:500',
|
||||
'cover_image' => 'require',
|
||||
'valid_type' => 'require|in:1,2',
|
||||
'fixed_time' => 'requireIf:valid_type,2|array',
|
||||
'status' => 'require|in:0,1',
|
||||
'sort' => 'require|integer|between:0,99999',
|
||||
'balance' => 'checkBalance:type',
|
||||
// 'balance' => 'requireIf:type,1|float|gt:0',
|
||||
'exchange_type' => 'requireIf:type,2|in:1,2',
|
||||
'gift_num' => 'requireIf:type,2|integer|gt:0|checkTimeGiftNum:exchange_type',
|
||||
'product' => 'requireIf:type,2|array',
|
||||
'product.*.product_id' => 'requireIf:type,2|integer|gt:0',
|
||||
// 'product.*.limit_num' => 'requireIf:type,2|integer|gt:0',
|
||||
'product.*.unique' => 'requireIf:type,2|require',
|
||||
'description' => 'require',
|
||||
];
|
||||
|
||||
/**
|
||||
* 错误信息
|
||||
* @var array
|
||||
*/
|
||||
protected $message = [
|
||||
'name.require' => '请输入礼品卡名称',
|
||||
'name.max' => '礼品卡名称不能超过50个字符',
|
||||
'type.require' => '请选择礼品卡类型',
|
||||
'type.in' => '礼品卡类型错误',
|
||||
'batch_id.require' => '请选择关联卡密',
|
||||
'batch_id.integer' => '关联卡密ID必须为整数',
|
||||
'batch_id.gt' => '关联卡密ID必须大于0',
|
||||
'total_num.require' => '请输入总数量',
|
||||
'total_num.integer' => '总数量必须为整数',
|
||||
'total_num.gt' => '总数量必须大于0',
|
||||
'instructions.require' => '请输入使用须知',
|
||||
'instructions.max' => '使用须知不能超过500个字符',
|
||||
'cover_image.require' => '请上传封面图',
|
||||
'valid_type.require' => '请选择有效期类型',
|
||||
'valid_type.in' => '有效期类型错误',
|
||||
'fixed_time.requireIf' => '请设置有效期',
|
||||
'fixed_time.array' => '有效期必须为数组',
|
||||
'status.require' => '请选择礼品卡状态',
|
||||
'status.in' => '礼品卡状态错误',
|
||||
'sort.require' => '请输入排序',
|
||||
'sort.integer' => '排序必须为整数',
|
||||
'sort.between' => '排序必须在0-99999之间',
|
||||
'balance.requireIf' => '请输入储值金额',
|
||||
'balance.float' => '储值金额必须为数字',
|
||||
'balance.gt' => '储值金额必须大于0',
|
||||
'exchange_type.requireIf' => '请选择兑换商品类型',
|
||||
'exchange_type.in' => '兑换商品类型错误',
|
||||
'gift_num.requireIf' => '赠送商品类型错误',
|
||||
'gift_num.integer' => '赠送商品必须是整数',
|
||||
'gift_num.gt' => '赠送商品必须大于 0',
|
||||
'product.requireIf' => '请选择兑换商品',
|
||||
'product.array' => '兑换商品格式错误',
|
||||
'product.*.product_id.requireIf' => '请选择兑换商品',
|
||||
'product.*.product_id.integer' => '商品ID必须为整数',
|
||||
'product.*.product_id.gt' => '商品ID必须大于0',
|
||||
// 'product.*.limit_num.requireIf' => '请输入兑换数量限制',
|
||||
// 'product.*.limit_num.integer' => '兑换数量限制必须为整数',
|
||||
// 'product.*.limit_num.gt' => '兑换数量限制必须大于0',
|
||||
'product.*.unique.requireIf' => '请输入商品唯一标识',
|
||||
'product.*.unique.require' => '商品唯一标识不能为空',
|
||||
'description.require' => '请填写详情',
|
||||
|
||||
];
|
||||
|
||||
/**
|
||||
* 验证场景
|
||||
* @var array
|
||||
*/
|
||||
protected $scene = [
|
||||
'save' => ['name', 'type', 'batch_id', 'total_num', 'instructions', 'cover_image', 'valid_type', 'fixed_time', 'status', 'sort', 'balance', 'exchange_type', 'product', 'description'],
|
||||
'update' => ['name', 'type', 'instructions', 'cover_image', 'valid_type', 'fixed_time', 'status', 'sort', 'balance', 'exchange_type', 'product', 'description']
|
||||
];
|
||||
}
|
||||
Reference in New Issue
Block a user