xieruidong 2 năm trước cách đây
mục cha
commit
fb283af0dc
1 tập tin đã thay đổi với 3 bổ sung0 xóa
  1. 3 0
      application/admin/controller/Goods.php

+ 3 - 0
application/admin/controller/Goods.php

@@ -97,6 +97,9 @@ class Goods extends Backend
     protected function makeVal(){
         $data=input('row/a');
         $data['logo']=array_filter(explode(',',$data['logo']??''));
+        if(!empty($data['is_kill'])||$data['is_kill']==0){
+            unset($data['amount_kill']);
+        }
         $this->validate($data,[
             'name|商品名称'=>['require'],
             'category_id|商品分类'=>['require'],