合并分支 'develop' 到 'master'
Develop 查看合并请求 !264
正在显示
4 个修改的文件
包含
22 行增加
和
8 行删除
| @@ -460,7 +460,6 @@ if (!function_exists('getImageUrl')) { | @@ -460,7 +460,6 @@ if (!function_exists('getImageUrl')) { | ||
| 460 | foreach ($path as $v){ | 460 | foreach ($path as $v){ |
| 461 | $url[] = getImageUrl($v); | 461 | $url[] = getImageUrl($v); |
| 462 | } | 462 | } |
| 463 | - $url = array_filter($url); | ||
| 464 | }else{ | 463 | }else{ |
| 465 | if(empty($path)){ | 464 | if(empty($path)){ |
| 466 | return ''; | 465 | return ''; |
| @@ -174,8 +174,6 @@ class ProjectLogic extends BaseLogic | @@ -174,8 +174,6 @@ class ProjectLogic extends BaseLogic | ||
| 174 | } | 174 | } |
| 175 | } | 175 | } |
| 176 | $param['notice_file'] = Arr::a2s($param['notice_file']); | 176 | $param['notice_file'] = Arr::a2s($param['notice_file']); |
| 177 | - }else{ | ||
| 178 | - unset($param['notice_file']); | ||
| 179 | } | 177 | } |
| 180 | if(isset($param['confirm_file']) && !empty($param['confirm_file'])){ | 178 | if(isset($param['confirm_file']) && !empty($param['confirm_file'])){ |
| 181 | foreach ($param['confirm_file'] as &$v2) { | 179 | foreach ($param['confirm_file'] as &$v2) { |
| @@ -184,11 +182,8 @@ class ProjectLogic extends BaseLogic | @@ -184,11 +182,8 @@ class ProjectLogic extends BaseLogic | ||
| 184 | } | 182 | } |
| 185 | } | 183 | } |
| 186 | $param['confirm_file'] = Arr::a2s($param['confirm_file']); | 184 | $param['confirm_file'] = Arr::a2s($param['confirm_file']); |
| 187 | - }else{ | ||
| 188 | - unset($param['confirm_file']); | ||
| 189 | } | 185 | } |
| 190 | unset($param['payment'],$param['deploy_build'],$param['deploy_optimize'],$param['online_check'],$param['project_after']); | 186 | unset($param['payment'],$param['deploy_build'],$param['deploy_optimize'],$param['online_check'],$param['project_after']); |
| 191 | - | ||
| 192 | //文件上传默认值 | 187 | //文件上传默认值 |
| 193 | if($param['is_upload_manage']){ | 188 | if($param['is_upload_manage']){ |
| 194 | $param['upload_config'] = [ | 189 | $param['upload_config'] = [ |
| @@ -99,6 +99,7 @@ class CategoryLogic extends BaseLogic | @@ -99,6 +99,7 @@ class CategoryLogic extends BaseLogic | ||
| 99 | $info = $this->model->read(['id'=>$id]); | 99 | $info = $this->model->read(['id'=>$id]); |
| 100 | $info['url'] = $info['route']; | 100 | $info['url'] = $info['route']; |
| 101 | $info['image_link'] = getImageUrl($info['image']); | 101 | $info['image_link'] = getImageUrl($info['image']); |
| 102 | + $info['describe_image'] = !empty($info['describe_image']) ? getImageUrl(json_decode($info['describe_image'])) : []; | ||
| 102 | return $this->success($info); | 103 | return $this->success($info); |
| 103 | } | 104 | } |
| 104 | 105 | ||
| @@ -112,12 +113,12 @@ class CategoryLogic extends BaseLogic | @@ -112,12 +113,12 @@ class CategoryLogic extends BaseLogic | ||
| 112 | public function categorySave(){ | 113 | public function categorySave(){ |
| 113 | DB::beginTransaction(); | 114 | DB::beginTransaction(); |
| 114 | try { | 115 | try { |
| 116 | + $this->param = $this->saveHandleParam($this->param); | ||
| 115 | if(isset($this->param['id']) && !empty($this->param['id'])){ | 117 | if(isset($this->param['id']) && !empty($this->param['id'])){ |
| 116 | $this->param['route'] = RouteMap::setRoute($this->param['route'], RouteMap::SOURCE_PRODUCT_CATE, $this->param['id'], $this->user['project_id']); | 118 | $this->param['route'] = RouteMap::setRoute($this->param['route'], RouteMap::SOURCE_PRODUCT_CATE, $this->param['id'], $this->user['project_id']); |
| 117 | $route = $this->param['route']; | 119 | $route = $this->param['route']; |
| 118 | $this->model->edit($this->param,['id'=>$this->param['id']]); | 120 | $this->model->edit($this->param,['id'=>$this->param['id']]); |
| 119 | }else{ | 121 | }else{ |
| 120 | - $this->param['project_id'] = $this->user['project_id']; | ||
| 121 | $id = $this->model->addReturnId($this->param); | 122 | $id = $this->model->addReturnId($this->param); |
| 122 | $route = RouteMap::setRoute($this->param['route'], RouteMap::SOURCE_PRODUCT_CATE, $id, $this->user['project_id']); | 123 | $route = RouteMap::setRoute($this->param['route'], RouteMap::SOURCE_PRODUCT_CATE, $id, $this->user['project_id']); |
| 123 | $this->edit(['route'=>$route],['id'=>$id]); | 124 | $this->edit(['route'=>$route],['id'=>$id]); |
| @@ -135,6 +136,25 @@ class CategoryLogic extends BaseLogic | @@ -135,6 +136,25 @@ class CategoryLogic extends BaseLogic | ||
| 135 | } | 136 | } |
| 136 | 137 | ||
| 137 | /** | 138 | /** |
| 139 | + * @remark :保存时处理数据 | ||
| 140 | + * @name :saveHandleParam | ||
| 141 | + * @author :lyh | ||
| 142 | + * @method :post | ||
| 143 | + * @time :2023/12/22 17:28 | ||
| 144 | + */ | ||
| 145 | + public function saveHandleParam($param){ | ||
| 146 | + if(isset($this->param['describe_image']) && !empty($this->param['describe_image'])){ | ||
| 147 | + foreach ($this->param['describe_image'] as $k => $v){ | ||
| 148 | + $v = str_replace_url($v); | ||
| 149 | + $this->param['describe_image'][$k] = $v; | ||
| 150 | + } | ||
| 151 | + $this->param['describe_image'] = json_encode($this->param['describe_image']); | ||
| 152 | + } | ||
| 153 | + $this->param['project_id'] = $this->user['project_id']; | ||
| 154 | + return $this->success($param); | ||
| 155 | + } | ||
| 156 | + | ||
| 157 | + /** | ||
| 138 | * @remark :删除 | 158 | * @remark :删除 |
| 139 | * @name :delete | 159 | * @name :delete |
| 140 | * @author :lyh | 160 | * @author :lyh |
| @@ -355,7 +355,7 @@ Route::middleware(['bloginauth'])->group(function () { | @@ -355,7 +355,7 @@ Route::middleware(['bloginauth'])->group(function () { | ||
| 355 | Route::any('/read', [\App\Http\Controllers\Bside\Template\CustomTemplateController::class, 'read'])->name('custom_read'); | 355 | Route::any('/read', [\App\Http\Controllers\Bside\Template\CustomTemplateController::class, 'read'])->name('custom_read'); |
| 356 | Route::any('/save', [\App\Http\Controllers\Bside\Template\CustomTemplateController::class, 'save'])->name('custom_save'); | 356 | Route::any('/save', [\App\Http\Controllers\Bside\Template\CustomTemplateController::class, 'save'])->name('custom_save'); |
| 357 | Route::any('/saveHtml', [\App\Http\Controllers\Bside\Template\CustomTemplateController::class, 'saveHtml'])->name('custom_saveHtml'); | 357 | Route::any('/saveHtml', [\App\Http\Controllers\Bside\Template\CustomTemplateController::class, 'saveHtml'])->name('custom_saveHtml'); |
| 358 | - Route::any('/statusNum', [\App\Http\Controllers\Bside\Template\CustomTemplateController::class, 'statusNumber'])->name('product_statusNum'); | 358 | + Route::any('/statusNum', [\App\Http\Controllers\Bside\Template\CustomTemplateController::class, 'statusNumber'])->name('custom_statusNum'); |
| 359 | Route::any('/del', [\App\Http\Controllers\Bside\Template\CustomTemplateController::class, 'del'])->name('custom_del'); | 359 | Route::any('/del', [\App\Http\Controllers\Bside\Template\CustomTemplateController::class, 'del'])->name('custom_del'); |
| 360 | }); | 360 | }); |
| 361 | // 菜单组 | 361 | // 菜单组 |
-
请 注册 或 登录 后发表评论