作者 刘朕
1 个管道 的构建 通过 耗费 5 秒

后台字段修改

... ... @@ -125,6 +125,9 @@ class OrderOptionController extends AdminBaseController
}
$post['values'] = str_replace(',', ',', trim($post['values']));
}
if(empty($post['icon'])) {
$post['icon'] = 'admin/20181008/e40464f84105b3b27449e70cc1bb68e3.png';
}
if(empty($post['is_show'])) {
$post['is_show'] = 0;
}
... ... @@ -189,6 +192,9 @@ class OrderOptionController extends AdminBaseController
}
$post['values'] = str_replace(',', ',', trim($post['values']));
}
if(empty($post['icon'])) {
$post['icon'] = 'admin/20181008/e40464f84105b3b27449e70cc1bb68e3.png';
}
if(empty($post['is_show'])) {
$post['is_show'] = 0;
}
... ...
... ... @@ -15,14 +15,14 @@ class OrderOptionValidate extends Validate
protected $rule = [
'name' => 'require',
'icon' => 'require',
// 'icon' => 'require',
'sort' => 'require|number|between:1,12',
'is_show' => 'in:0,1',
];
protected $message = [
'name.require' => '名称不能为空',
'icon.require' => '图标不能为空',
// 'icon.require' => '图标不能为空',
'sort.require' => '类型不能为空',
'sort.number' => '类型必须为数字',
'sort.between' => '类型值必须在1-12之间',
... ...