|
...
|
...
|
@@ -201,17 +201,17 @@ class ProductLogic extends BaseLogic |
|
|
|
public function editList(){
|
|
|
|
$category_ids = $this->param['category_id'];
|
|
|
|
$this->param['category_id'] = $this->handleListCategory($this->param['category_id']);
|
|
|
|
// $this->param['keyword_id'] = $this->saveKeyword($this->param['keyword_id']);
|
|
|
|
// if(isset($this->param['gallery']) && !empty($this->param['gallery'])){
|
|
|
|
// foreach ($this->param['gallery'] as $k => $v){
|
|
|
|
// $v['url'] = str_replace_url($v['url']);
|
|
|
|
// $this->param['gallery'][$k] = $v;
|
|
|
|
// }
|
|
|
|
// $this->param['thumb'] = Arr::a2s($this->param['gallery'][0] ?? []);
|
|
|
|
// $this->param['gallery'] = Arr::a2s($this->param['gallery'] ?? []);
|
|
|
|
// }else{
|
|
|
|
// unset($this->param['thumb']);
|
|
|
|
// }
|
|
|
|
$this->param['keyword_id'] = $this->saveKeyword($this->param['keyword_id']);
|
|
|
|
if(isset($this->param['gallery']) && !empty($this->param['gallery'])){
|
|
|
|
foreach ($this->param['gallery'] as $k => $v){
|
|
|
|
$v['url'] = str_replace_url($v['url']);
|
|
|
|
$this->param['gallery'][$k] = $v;
|
|
|
|
}
|
|
|
|
$this->param['thumb'] = Arr::a2s($this->param['gallery'][0] ?? []);
|
|
|
|
$this->param['gallery'] = Arr::a2s($this->param['gallery'] ?? []);
|
|
|
|
}else{
|
|
|
|
unset($this->param['thumb']);
|
|
|
|
}
|
|
|
|
try {
|
|
|
|
if(isset($this->param['route']) && !empty($this->param['route'])){
|
|
|
|
$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 |
|
|
|
}
|
|
|
|
$this->model->edit($this->param,['id'=>$this->param['id']]);
|
|
|
|
//产品分类关联
|
|
|
|
CategoryRelated::saveRelated($this->param['id'], $category_ids);
|
|
|
|
// CategoryRelated::saveRelated($this->param['id'], $category_ids);
|
|
|
|
}catch (\Exception $e){
|
|
|
|
$this->fail('系统错误,请连续管理员');
|
|
|
|
}
|
...
|
...
|
|