作者 anyv
1 个管道 的构建 通过 耗费 0 秒

商品添加

@@ -73,7 +73,9 @@ class GoodsController extends AdminBaseController{ @@ -73,7 +73,9 @@ class GoodsController extends AdminBaseController{
73 } 73 }
74 $_POST['type'] = 1; 74 $_POST['type'] = 1;
75 $_POST['create_time'] = time(); 75 $_POST['create_time'] = time();
76 - $label_id = $_POST['label_id']; 76 + if(!empty($label_id)){
  77 + $label_id = $_POST['label_id'];
  78 + }
77 unset($_POST['label_id']); 79 unset($_POST['label_id']);
78 $data = Db::name('goods') -> insertGetId($_POST); 80 $data = Db::name('goods') -> insertGetId($_POST);
79 if(!empty($label_id)){ 81 if(!empty($label_id)){