作者 Your Name
@@ -56,15 +56,15 @@ class UpdateRoute extends Command @@ -56,15 +56,15 @@ class UpdateRoute extends Command
56 */ 56 */
57 public function handle(){ 57 public function handle(){
58 $projectModel = new Project(); 58 $projectModel = new Project();
59 - $list = $projectModel->list(['id'=>['in',[2321]]]); 59 + $list = $projectModel->list(['id'=>['in',[1871]]]);
60 $data = []; 60 $data = [];
61 foreach ($list as $v){ 61 foreach ($list as $v){
62 echo date('Y-m-d H:i:s') . 'project_id:'.$v['id'] . PHP_EOL; 62 echo date('Y-m-d H:i:s') . 'project_id:'.$v['id'] . PHP_EOL;
63 ProjectServer::useProject($v['id']); 63 ProjectServer::useProject($v['id']);
64 -// $this->getProduct(); 64 + $this->getProduct();
65 // $this->setProductKeyword(); 65 // $this->setProductKeyword();
66 // $this->getBlog(); 66 // $this->getBlog();
67 - $this->setCustomRoute($v['id']); 67 +// $this->setCustomRoute($v['id']);
68 DB::disconnect('custom_mysql'); 68 DB::disconnect('custom_mysql');
69 } 69 }
70 echo date('Y-m-d H:i:s') . 'end' . PHP_EOL; 70 echo date('Y-m-d H:i:s') . 'end' . PHP_EOL;
@@ -86,6 +86,7 @@ class CustomModuleCategoryLogic extends BaseLogic @@ -86,6 +86,7 @@ class CustomModuleCategoryLogic extends BaseLogic
86 $this->fail('当前数据不存在或已被删除'); 86 $this->fail('当前数据不存在或已被删除');
87 } 87 }
88 $info['image'] = getImageUrl($info['image'],$this->user['storage_type'],$this->user['project_location']); 88 $info['image'] = getImageUrl($info['image'],$this->user['storage_type'],$this->user['project_location']);
  89 + $info['banner_image'] = getImageUrl($info['banner_image'],$this->user['storage_type'] ?? 0,$this->user['project_location']);
89 return $this->success($info); 90 return $this->success($info);
90 } 91 }
91 92
@@ -118,6 +119,9 @@ class CustomModuleCategoryLogic extends BaseLogic @@ -118,6 +119,9 @@ class CustomModuleCategoryLogic extends BaseLogic
118 if(!isset($param['id']) || empty($param['id'])){ 119 if(!isset($param['id']) || empty($param['id'])){
119 $param['project_id'] = $this->user['project_id']; 120 $param['project_id'] = $this->user['project_id'];
120 } 121 }
  122 + if(isset($param['banner_image']) && !empty($param['banner_image'])){
  123 + $param['banner_image'] = str_replace_url($param['banner_image']);
  124 + }
121 if(isset($param['image']) && !empty($param['image'])){ 125 if(isset($param['image']) && !empty($param['image'])){
122 $param['image'] = str_replace_url($param['image']); 126 $param['image'] = str_replace_url($param['image']);
123 } 127 }
@@ -32,10 +32,30 @@ class NewsCategoryLogic extends BaseLogic @@ -32,10 +32,30 @@ class NewsCategoryLogic extends BaseLogic
32 public function info_news_category(){ 32 public function info_news_category(){
33 $info = $this->model->read($this->param); 33 $info = $this->model->read($this->param);
34 $info['url'] = $this->user['domain'] . $info['alias']; 34 $info['url'] = $this->user['domain'] . $info['alias'];
  35 + if(!empty($info['banner_image'])){
  36 + $info['banner_image'] = getImageUrl($info['banner_image'],$this->user['storage_type'] ?? 0,$this->user['project_location']);
  37 + }
35 return $this->success($info); 38 return $this->success($info);
36 } 39 }
37 40
38 /** 41 /**
  42 + * @remark :保存处理字段
  43 + * @name :handleParam
  44 + * @author :lyh
  45 + * @method :post
  46 + * @time :2024/9/13 9:15
  47 + */
  48 + public function handleParam($param)
  49 + {
  50 + if(isset($param['banner_image']) && !empty($param['banner_image'])){
  51 + $param['banner_image'] = str_replace_url($param['banner_image']);
  52 + }
  53 + if(isset($param['image']) && !empty($param['image'])){
  54 + $param['image'] = str_replace_url($param['image']);
  55 + }
  56 + return $this->success($param);
  57 + }
  58 + /**
39 * @remark :保存数据 59 * @remark :保存数据
40 * @name :newsCategorySave 60 * @name :newsCategorySave
41 * @author :lyh 61 * @author :lyh
@@ -45,6 +65,7 @@ class NewsCategoryLogic extends BaseLogic @@ -45,6 +65,7 @@ class NewsCategoryLogic extends BaseLogic
45 public function newsCategorySave(){ 65 public function newsCategorySave(){
46 //验证名称是否存在 66 //验证名称是否存在
47 $this->verifyParamName($this->param['name']); 67 $this->verifyParamName($this->param['name']);
  68 + $this->param = $this->handleParam($this->param);
48 DB::beginTransaction(); 69 DB::beginTransaction();
49 try { 70 try {
50 if(isset($this->param['id']) && !empty($this->param['id'])){ 71 if(isset($this->param['id']) && !empty($this->param['id'])){