作者 lyh

gx脚本更新路由

... ... @@ -114,15 +114,17 @@ class ProductLogic extends BaseLogic
$this->delProductDetail($product_id);
if(!empty($detail)){
try {
foreach ($detail as $key =>$val){
//查看当前栏目是否存在
$columnId = $this->getColumnId($product_id,$key);
foreach ($detail as $val){
foreach ($val as $v){
if(empty($key)){
//查看当前栏目是否存在
$columnId = $this->getColumnId($product_id,$v['column_name']);
if(empty($v['column_name'])){
continue;
}
$save_data = $this->handleDetailParam($columnId['column_id'],$product_id,$v);
$this->model->add($save_data);
foreach ($v['data'] as $item){
$save_data = $this->handleDetailParam($columnId['column_id'],$product_id,$item);
$this->model->add($save_data);
}
}
}
}catch (\Exception $e){
... ...