作者 lyh

gx脚本更新路由

@@ -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){