作者 lyh

gx脚本更新路由

@@ -552,16 +552,17 @@ class ProductLogic extends BaseLogic @@ -552,16 +552,17 @@ class ProductLogic extends BaseLogic
552 $columnList = $columnModel->list(['product_id'=>$product_id]); 552 $columnList = $columnModel->list(['product_id'=>$product_id]);
553 if(!empty($columnList)){ 553 if(!empty($columnList)){
554 foreach ($columnList as $k => $v){ 554 foreach ($columnList as $k => $v){
  555 + $column_id = $v['id'];
555 unset($v['id']); 556 unset($v['id']);
556 $v['product_id'] = $new_product_id; 557 $v['product_id'] = $new_product_id;
557 $column_id = $columnModel->addReturnId($v); 558 $column_id = $columnModel->addReturnId($v);
558 //执行新增描述 559 //执行新增描述
559 $detailModel = new Detail(); 560 $detailModel = new Detail();
560 - $detailList = $detailModel->list(['product_id'=>$product_id,'column_id'=>$v['id']]); 561 + $detailList = $detailModel->list(['product_id'=>$product_id,'column_id'=>$column_id]);
561 if(!empty($detailList)){ 562 if(!empty($detailList)){
562 $data = []; 563 $data = [];
563 foreach ($detailList as $val){ 564 foreach ($detailList as $val){
564 - unset($v['id']); 565 + unset($val['id']);
565 $val['css'] = Arr::a2s($val['css']); 566 $val['css'] = Arr::a2s($val['css']);
566 $val['content'] = Arr::a2s($val['content']); 567 $val['content'] = Arr::a2s($val['content']);
567 $val['product_id'] = $new_product_id; 568 $val['product_id'] = $new_product_id;