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

商品标签编辑

... ... @@ -108,10 +108,10 @@ class GoodsController extends AdminBaseController{
unset($_POST['label_id']);
Db::name('goods_label') -> where('goods_id',$_POST['id']) -> delete();
foreach ($label_id as $key => $val){
Db::name('goods_label') -> insert(['goods_id'=>$_POST['id'],'label_id'=>$val]);
$goods_label_data = Db::name('goods_label') -> insert(['goods_id'=>$_POST['id'],'label_id'=>$val]);
}
$data = Db::name('goods') -> update($_POST);
if($data){
if($data || $goods_label_data){
$this -> success('保存成功',url('Goods/goods_edit',array('id'=>$_POST['id'])));
}else{
$this -> error('保存失败');
... ...