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

后台字段修改

@@ -125,6 +125,9 @@ class OrderOptionController extends AdminBaseController @@ -125,6 +125,9 @@ class OrderOptionController extends AdminBaseController
125 } 125 }
126 $post['values'] = str_replace(',', ',', trim($post['values'])); 126 $post['values'] = str_replace(',', ',', trim($post['values']));
127 } 127 }
  128 + if(empty($post['icon'])) {
  129 + $post['icon'] = 'admin/20181008/e40464f84105b3b27449e70cc1bb68e3.png';
  130 + }
128 if(empty($post['is_show'])) { 131 if(empty($post['is_show'])) {
129 $post['is_show'] = 0; 132 $post['is_show'] = 0;
130 } 133 }
@@ -189,6 +192,9 @@ class OrderOptionController extends AdminBaseController @@ -189,6 +192,9 @@ class OrderOptionController extends AdminBaseController
189 } 192 }
190 $post['values'] = str_replace(',', ',', trim($post['values'])); 193 $post['values'] = str_replace(',', ',', trim($post['values']));
191 } 194 }
  195 + if(empty($post['icon'])) {
  196 + $post['icon'] = 'admin/20181008/e40464f84105b3b27449e70cc1bb68e3.png';
  197 + }
192 if(empty($post['is_show'])) { 198 if(empty($post['is_show'])) {
193 $post['is_show'] = 0; 199 $post['is_show'] = 0;
194 } 200 }
@@ -15,14 +15,14 @@ class OrderOptionValidate extends Validate @@ -15,14 +15,14 @@ class OrderOptionValidate extends Validate
15 15
16 protected $rule = [ 16 protected $rule = [
17 'name' => 'require', 17 'name' => 'require',
18 - 'icon' => 'require', 18 +// 'icon' => 'require',
19 'sort' => 'require|number|between:1,12', 19 'sort' => 'require|number|between:1,12',
20 'is_show' => 'in:0,1', 20 'is_show' => 'in:0,1',
21 ]; 21 ];
22 22
23 protected $message = [ 23 protected $message = [
24 'name.require' => '名称不能为空', 24 'name.require' => '名称不能为空',
25 - 'icon.require' => '图标不能为空', 25 +// 'icon.require' => '图标不能为空',
26 'sort.require' => '类型不能为空', 26 'sort.require' => '类型不能为空',
27 'sort.number' => '类型必须为数字', 27 'sort.number' => '类型必须为数字',
28 'sort.between' => '类型值必须在1-12之间', 28 'sort.between' => '类型值必须在1-12之间',