|
@@ -197,6 +197,7 @@ class ProductLogic extends BaseLogic |
|
@@ -197,6 +197,7 @@ class ProductLogic extends BaseLogic |
|
197
|
* @time :2023/10/26 9:49
|
197
|
* @time :2023/10/26 9:49
|
|
198
|
*/
|
198
|
*/
|
|
199
|
public function editList(){
|
199
|
public function editList(){
|
|
|
|
200
|
+ $category_ids = $this->param['category_id'];
|
|
200
|
$this->param['category_id'] = $this->handleListCategory($this->param['category_id']);
|
201
|
$this->param['category_id'] = $this->handleListCategory($this->param['category_id']);
|
|
201
|
$this->param['keyword_id'] = $this->saveKeyword($this->param['keyword_id']);
|
202
|
$this->param['keyword_id'] = $this->saveKeyword($this->param['keyword_id']);
|
|
202
|
if(isset($this->param['gallery']) && !empty($this->param['gallery'])){
|
203
|
if(isset($this->param['gallery']) && !empty($this->param['gallery'])){
|
|
@@ -215,6 +216,8 @@ class ProductLogic extends BaseLogic |
|
@@ -215,6 +216,8 @@ class ProductLogic extends BaseLogic |
|
215
|
$this->editProductRoute($this->param['id'],$this->param['route']);
|
216
|
$this->editProductRoute($this->param['id'],$this->param['route']);
|
|
216
|
}
|
217
|
}
|
|
217
|
$this->model->edit($this->param,['id'=>$this->param['id']]);
|
218
|
$this->model->edit($this->param,['id'=>$this->param['id']]);
|
|
|
|
219
|
+ //产品分类关联
|
|
|
|
220
|
+ CategoryRelated::saveRelated($this->param['id'], $category_ids);
|
|
218
|
}catch (\Exception $e){
|
221
|
}catch (\Exception $e){
|
|
219
|
$this->fail('系统错误,请连续管理员');
|
222
|
$this->fail('系统错误,请连续管理员');
|
|
220
|
}
|
223
|
}
|
|
@@ -317,7 +320,7 @@ class ProductLogic extends BaseLogic |
|
@@ -317,7 +320,7 @@ class ProductLogic extends BaseLogic |
|
317
|
$str .= $v.',';
|
320
|
$str .= $v.',';
|
|
318
|
}
|
321
|
}
|
|
319
|
}
|
322
|
}
|
|
320
|
- return !empty($str) ? ','.$str : '';
|
323
|
+ return !empty(trim($str,',')) ? ','.$str.',' : '';
|
|
321
|
}
|
324
|
}
|
|
322
|
|
325
|
|
|
323
|
/**
|
326
|
/**
|