作者 lyh

gx脚本更新路由

... ... @@ -107,5 +107,5 @@ class UpdateKeyword extends Command
shell_exec('curl -k "'.$url.'"');
return true;
}
}
... ...
... ... @@ -208,8 +208,11 @@ class ProductLogic extends BaseLogic
public function editList(){
$category_ids = $this->param['category_id'];
$this->param['category_id'] = $this->handleListCategory($this->param['category_id']);
$keyword_arr = $this->param['keyword_id'];
$this->param['keyword_id'] = $this->saveKeyword($this->param['keyword_id']);
$keyword_arr = $this->saveKeyword($this->param['keyword_id']);
$this->param['keyword_id'] = '';
if(!empty($keyword_arr)){
$this->param['keyword_id'] = ','.implode(',',$keyword_arr).',';
}
if(isset($this->param['gallery']) && !empty($this->param['gallery'])){
foreach ($this->param['gallery'] as $k => $v){
$v['url'] = str_replace_url($v['url']);
... ... @@ -242,7 +245,7 @@ class ProductLogic extends BaseLogic
* @time :2023/10/26 9:51
*/
public function saveKeyword($keyword){
$str = '';
$arr = [];
if(isset($keyword) && !empty($keyword)){
$arr = [];
$keywordModel = new Keyword();
... ... @@ -267,9 +270,8 @@ class ProductLogic extends BaseLogic
$arr[] = $info['id'];
}
}
$str = ','.implode(',',$arr).',';
}
return $str;
return $arr;
}
/**
... ...