|
@@ -136,6 +136,14 @@ class ProductLogic extends BaseLogic |
|
@@ -136,6 +136,14 @@ class ProductLogic extends BaseLogic |
|
136
|
public function editList(){
|
136
|
public function editList(){
|
|
137
|
$this->param['category_id'] = $this->getLastCategory($this->param['category_id']);
|
137
|
$this->param['category_id'] = $this->getLastCategory($this->param['category_id']);
|
|
138
|
$this->param['keyword_id'] = $this->saveKeyword($this->param['keyword_id']);
|
138
|
$this->param['keyword_id'] = $this->saveKeyword($this->param['keyword_id']);
|
|
|
|
139
|
+ if(isset($this->param['gallery']) && !empty($this->param['gallery'])){
|
|
|
|
140
|
+ foreach ($this->param['gallery'] as $k => $v){
|
|
|
|
141
|
+ $v['url'] = str_replace_url($v['url']);
|
|
|
|
142
|
+ $this->param['gallery'][$k] = $v;
|
|
|
|
143
|
+ }
|
|
|
|
144
|
+ $this->param['thumb'] = Arr::a2s($this->param['gallery'][0] ?? []);
|
|
|
|
145
|
+ $this->param['gallery'] = Arr::a2s($this->param['gallery'] ?? []);
|
|
|
|
146
|
+ }
|
|
139
|
$this->model->edit($this->param,['id'=>$this->param['id']]);
|
147
|
$this->model->edit($this->param,['id'=>$this->param['id']]);
|
|
140
|
return $this->success();
|
148
|
return $this->success();
|
|
141
|
}
|
149
|
}
|