正在显示
1 个修改的文件
包含
8 行增加
和
6 行删除
| @@ -114,15 +114,17 @@ class ProductLogic extends BaseLogic | @@ -114,15 +114,17 @@ 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 $key =>$val){ | ||
| 118 | - //查看当前栏目是否存在 | ||
| 119 | - $columnId = $this->getColumnId($product_id,$key); | 117 | + foreach ($detail as $val){ |
| 120 | foreach ($val as $v){ | 118 | foreach ($val as $v){ |
| 121 | - if(empty($key)){ | 119 | + //查看当前栏目是否存在 |
| 120 | + $columnId = $this->getColumnId($product_id,$v['column_name']); | ||
| 121 | + if(empty($v['column_name'])){ | ||
| 122 | continue; | 122 | continue; |
| 123 | } | 123 | } |
| 124 | - $save_data = $this->handleDetailParam($columnId['column_id'],$product_id,$v); | ||
| 125 | - $this->model->add($save_data); | 124 | + foreach ($v['data'] as $item){ |
| 125 | + $save_data = $this->handleDetailParam($columnId['column_id'],$product_id,$item); | ||
| 126 | + $this->model->add($save_data); | ||
| 127 | + } | ||
| 126 | } | 128 | } |
| 127 | } | 129 | } |
| 128 | }catch (\Exception $e){ | 130 | }catch (\Exception $e){ |
-
请 注册 或 登录 后发表评论