正在显示
1 个修改的文件
包含
4 行增加
和
4 行删除
| @@ -114,13 +114,13 @@ class ProductLogic extends BaseLogic | @@ -114,13 +114,13 @@ class ProductLogic extends BaseLogic | ||
| 114 | $this->delProductDetail($product_id); | 114 | $this->delProductDetail($product_id); |
| 115 | if(!empty($detail)){ | 115 | if(!empty($detail)){ |
| 116 | try { | 116 | try { |
| 117 | - foreach ($detail as $val){ | 117 | + foreach ($detail as $key =>$val){ |
| 118 | + //查看当前栏目是否存在 | ||
| 119 | + $columnId = $this->getColumnId($product_id,$key); | ||
| 118 | foreach ($val as $v){ | 120 | foreach ($val as $v){ |
| 119 | - if(empty($v['column_name'])){ | 121 | + if(empty($key)){ |
| 120 | continue; | 122 | continue; |
| 121 | } | 123 | } |
| 122 | - //查看当前栏目是否存在 | ||
| 123 | - $columnId = $this->getColumnId($product_id,$v['column_name']); | ||
| 124 | $save_data = $this->handleDetailParam($columnId['column_id'],$product_id,$v); | 124 | $save_data = $this->handleDetailParam($columnId['column_id'],$product_id,$v); |
| 125 | $this->model->add($save_data); | 125 | $this->model->add($save_data); |
| 126 | } | 126 | } |
-
请 注册 或 登录 后发表评论