|
...
|
...
|
@@ -148,16 +148,16 @@ class KeywordLogic extends BaseLogic |
|
|
|
$this->model = new Keyword();
|
|
|
|
$info = $this->model->read(['title'=>$v]);
|
|
|
|
if($info === false){
|
|
|
|
$route = $this->specialRouteCheck($v);
|
|
|
|
// $route = $this->specialRouteCheck($v);
|
|
|
|
$param['project_id'] = $this->user['project_id'];
|
|
|
|
$param['created_at'] = date('Y-m-d H:i:s');
|
|
|
|
$param['updated_at'] = $param['created_at'];
|
|
|
|
$param['title'] = $v;
|
|
|
|
$param['route'] = $route;
|
|
|
|
// $param['route'] = $route;
|
|
|
|
$id = $this->model->insertGetId($param);
|
|
|
|
$route = RouteMap::setRoute($route, RouteMap::SOURCE_PRODUCT_KEYWORD, $id, $this->user['project_id']);
|
|
|
|
//// $this->curlDelRoute(['new_route'=>$route]);
|
|
|
|
// $this->model->edit(['route'=>$route],['id'=>$id]);
|
|
|
|
$route = RouteMap::setRoute($route_array[$k], RouteMap::SOURCE_PRODUCT_KEYWORD, $id, $this->user['project_id']);
|
|
|
|
// $this->curlDelRoute(['new_route'=>$route]);
|
|
|
|
$this->model->edit(['route'=>$route],['id'=>$id]);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}catch (\Exception $e){
|
...
|
...
|
|