作者 lyh

gx关键词关联关系

@@ -208,6 +208,7 @@ class ProductLogic extends BaseLogic @@ -208,6 +208,7 @@ class ProductLogic extends BaseLogic
208 public function editList(){ 208 public function editList(){
209 $category_ids = $this->param['category_id']; 209 $category_ids = $this->param['category_id'];
210 $this->param['category_id'] = $this->handleListCategory($this->param['category_id']); 210 $this->param['category_id'] = $this->handleListCategory($this->param['category_id']);
  211 + $keyword_arr = $this->param['keyword_id'];
211 $this->param['keyword_id'] = $this->saveKeyword($this->param['keyword_id']); 212 $this->param['keyword_id'] = $this->saveKeyword($this->param['keyword_id']);
212 if(isset($this->param['gallery']) && !empty($this->param['gallery'])){ 213 if(isset($this->param['gallery']) && !empty($this->param['gallery'])){
213 foreach ($this->param['gallery'] as $k => $v){ 214 foreach ($this->param['gallery'] as $k => $v){
@@ -226,6 +227,7 @@ class ProductLogic extends BaseLogic @@ -226,6 +227,7 @@ class ProductLogic extends BaseLogic
226 $this->model->edit($this->param,['id'=>$this->param['id']]); 227 $this->model->edit($this->param,['id'=>$this->param['id']]);
227 //产品分类关联 228 //产品分类关联
228 CategoryRelated::saveRelated($this->param['id'], $category_ids); 229 CategoryRelated::saveRelated($this->param['id'], $category_ids);
  230 + KeywordRelated::saveRelated($this->param['id'],$keyword_arr);
229 }catch (\Exception $e){ 231 }catch (\Exception $e){
230 $this->fail('系统错误,请连续管理员'); 232 $this->fail('系统错误,请连续管理员');
231 } 233 }