OrderAftersale.php
1.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
<?php
namespace addons\shopro\validate;
use think\Validate;
class OrderAftersale extends Validate
{
/**
* 验证规则
*/
protected $rule = [
'id' => 'require',
'order_id' => 'require',
'order_item_id' => 'require',
'type' => 'require',
'phone' => 'require',
'reason' => 'require',
'images' => 'array',
];
/**
* 提示消息
*/
protected $message = [
'id.require' => '缺少参数',
'type.require' => '请选择售后类型',
'order_id.require' => '缺少参数',
'order_item_id.require' => '缺少订单商品参数',
'phone.require' => '联系方式必须填写',
'reason.require' => '售后原因必须选择',
'images.array' => '图片不正确',
];
/**
* 字段描述
*/
protected $field = [
];
/**
* 验证场景
*/
protected $scene = [
'detail' => ['id'],
'cancel' => ['id'],
'delete' => ['id'],
'aftersale' => ['type', 'order_id', 'order_item_id', 'phone', 'reason', 'images'],
];
}