作者 lyh

gx

... ... @@ -108,6 +108,7 @@ class KeywordLogic extends BaseLogic
try {
$idArr = [];
foreach ($this->param['title'] as $v){
$this->model = new Keyword();
$info = $this->model->read(['title'=>$v]);
if($info === false){
$param['project_id'] = $this->user['project_id'];
... ... @@ -120,6 +121,7 @@ class KeywordLogic extends BaseLogic
}
//批量生成路由
foreach ($idArr as $v){
$this->model = new Keyword();
$route = RouteMap::setRoute($v['title'], RouteMap::SOURCE_PRODUCT_KEYWORD, $v['id'], $this->user['project_id']);
$this->model->edit(['route'=>$route],['id'=>$v['id']]);
}
... ...