作者 lyh

gx

@@ -433,8 +433,8 @@ class ProductController extends BaseController @@ -433,8 +433,8 @@ class ProductController extends BaseController
433 * @time :2023/7/29 14:59 433 * @time :2023/7/29 14:59
434 */ 434 */
435 public function copyProduct(ProductLogic $logic){ 435 public function copyProduct(ProductLogic $logic){
436 - $rs = $logic->setCopyProduct();  
437 - $this->response('success',Code::SUCCESS,$rs); 436 + $data = $logic->setCopyProduct();
  437 + $this->response('success',Code::SUCCESS,$data);
438 } 438 }
439 439
440 /** 440 /**
@@ -45,7 +45,7 @@ class ProductLogic extends BaseLogic @@ -45,7 +45,7 @@ class ProductLogic extends BaseLogic
45 $category_ids = $this->handleCategory(); 45 $category_ids = $this->handleCategory();
46 //处理其他字段 46 //处理其他字段
47 $this->param = $this->handleSaveParam($this->param); 47 $this->param = $this->handleSaveParam($this->param);
48 -// try { 48 + try {
49 if(isset($this->param['id']) && !empty($this->param['id'])){ 49 if(isset($this->param['id']) && !empty($this->param['id'])){
50 $is_upgrade = $this->param['is_upgrade'] ?? 0;//1:5.0数据 0:6.0 50 $is_upgrade = $this->param['is_upgrade'] ?? 0;//1:5.0数据 0:6.0
51 $six_read = $this->param['six_read'] ?? 0;//是否按6.0显示 51 $six_read = $this->param['six_read'] ?? 0;//是否按6.0显示
@@ -66,10 +66,10 @@ class ProductLogic extends BaseLogic @@ -66,10 +66,10 @@ class ProductLogic extends BaseLogic
66 CategoryRelated::saveRelated($id, $category_ids); 66 CategoryRelated::saveRelated($id, $category_ids);
67 //保存扩展字段 67 //保存扩展字段
68 $this->saveExtendInfo($id,$extend); 68 $this->saveExtendInfo($id,$extend);
69 -// }catch (\Exception $e){  
70 -// Log::info('错误信息---'.$e->getMessage());  
71 -// $this->fail('系统错误请联系管理员');  
72 -// } 69 + }catch (\Exception $e){
  70 + Log::info('错误信息---'.$e->getMessage());
  71 + $this->fail('系统错误请联系管理员');
  72 + }
73 $this->addUpdateNotify(RouteMap::SOURCE_PRODUCT,$route); 73 $this->addUpdateNotify(RouteMap::SOURCE_PRODUCT,$route);
74 $this->curlDelRoute(['new_route'=>$route]); 74 $this->curlDelRoute(['new_route'=>$route]);
75 return $this->success(); 75 return $this->success();
@@ -441,7 +441,7 @@ class ProductLogic extends BaseLogic @@ -441,7 +441,7 @@ class ProductLogic extends BaseLogic
441 $this->model->edit(['route'=>$route],['id'=>$save_id]); 441 $this->model->edit(['route'=>$route],['id'=>$save_id]);
442 //同步可视化装修数据 442 //同步可视化装修数据
443 $this->copyTemplate($this->param['id'],$info['project_id'],$save_id); 443 $this->copyTemplate($this->param['id'],$info['project_id'],$save_id);
444 - return $this->success(); 444 + return $this->success(['id'=>$save_id]);
445 } 445 }
446 446
447 /** 447 /**