正在显示
1 个修改的文件
包含
12 行增加
和
12 行删除
| @@ -201,17 +201,17 @@ class ProductLogic extends BaseLogic | @@ -201,17 +201,17 @@ class ProductLogic extends BaseLogic | ||
| 201 | public function editList(){ | 201 | public function editList(){ |
| 202 | $category_ids = $this->param['category_id']; | 202 | $category_ids = $this->param['category_id']; |
| 203 | $this->param['category_id'] = $this->handleListCategory($this->param['category_id']); | 203 | $this->param['category_id'] = $this->handleListCategory($this->param['category_id']); |
| 204 | -// $this->param['keyword_id'] = $this->saveKeyword($this->param['keyword_id']); | ||
| 205 | -// if(isset($this->param['gallery']) && !empty($this->param['gallery'])){ | ||
| 206 | -// foreach ($this->param['gallery'] as $k => $v){ | ||
| 207 | -// $v['url'] = str_replace_url($v['url']); | ||
| 208 | -// $this->param['gallery'][$k] = $v; | ||
| 209 | -// } | ||
| 210 | -// $this->param['thumb'] = Arr::a2s($this->param['gallery'][0] ?? []); | ||
| 211 | -// $this->param['gallery'] = Arr::a2s($this->param['gallery'] ?? []); | ||
| 212 | -// }else{ | ||
| 213 | -// unset($this->param['thumb']); | ||
| 214 | -// } | 204 | + $this->param['keyword_id'] = $this->saveKeyword($this->param['keyword_id']); |
| 205 | + if(isset($this->param['gallery']) && !empty($this->param['gallery'])){ | ||
| 206 | + foreach ($this->param['gallery'] as $k => $v){ | ||
| 207 | + $v['url'] = str_replace_url($v['url']); | ||
| 208 | + $this->param['gallery'][$k] = $v; | ||
| 209 | + } | ||
| 210 | + $this->param['thumb'] = Arr::a2s($this->param['gallery'][0] ?? []); | ||
| 211 | + $this->param['gallery'] = Arr::a2s($this->param['gallery'] ?? []); | ||
| 212 | + }else{ | ||
| 213 | + unset($this->param['thumb']); | ||
| 214 | + } | ||
| 215 | try { | 215 | try { |
| 216 | if(isset($this->param['route']) && !empty($this->param['route'])){ | 216 | if(isset($this->param['route']) && !empty($this->param['route'])){ |
| 217 | $this->param['route'] = RouteMap::setRoute($this->param['route'], RouteMap::SOURCE_PRODUCT, $this->param['id'], $this->user['project_id']); | 217 | $this->param['route'] = RouteMap::setRoute($this->param['route'], RouteMap::SOURCE_PRODUCT, $this->param['id'], $this->user['project_id']); |
| @@ -219,7 +219,7 @@ class ProductLogic extends BaseLogic | @@ -219,7 +219,7 @@ class ProductLogic extends BaseLogic | ||
| 219 | } | 219 | } |
| 220 | $this->model->edit($this->param,['id'=>$this->param['id']]); | 220 | $this->model->edit($this->param,['id'=>$this->param['id']]); |
| 221 | //产品分类关联 | 221 | //产品分类关联 |
| 222 | - CategoryRelated::saveRelated($this->param['id'], $category_ids); | 222 | +// CategoryRelated::saveRelated($this->param['id'], $category_ids); |
| 223 | }catch (\Exception $e){ | 223 | }catch (\Exception $e){ |
| 224 | $this->fail('系统错误,请连续管理员'); | 224 | $this->fail('系统错误,请连续管理员'); |
| 225 | } | 225 | } |
-
请 注册 或 登录 后发表评论