|
...
|
...
|
@@ -149,37 +149,12 @@ class KeywordLogic extends BaseLogic |
|
|
|
}catch (\Exception $e){
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
Common::del_user_cache('product_keyword',$this->user['project_id']);
|
|
|
|
NoticeLog::createLog(NoticeLog::TYPE_INIT_KEYWORD, ['project_id' => $this->user['project_id']]);
|
|
|
|
return $this->success();
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @remark :
|
|
|
|
* @name :specialRouteCheck
|
|
|
|
* @author :lyh
|
|
|
|
* @method :post
|
|
|
|
* @time :2024/1/6 14:50
|
|
|
|
*/
|
|
|
|
public function specialRouteCheck($title)
|
|
|
|
{
|
|
|
|
if(preg_match('/[\x{4e00}-\x{9fa5}]/u', $title)){
|
|
|
|
$title = Translate::tran($title, 'en');
|
|
|
|
}
|
|
|
|
$suffix = '-tag';
|
|
|
|
$i = 1;
|
|
|
|
$sign = generateRoute($title);
|
|
|
|
$route = $sign . $suffix;
|
|
|
|
resetRoute:
|
|
|
|
$log = RouteMap::getRouteInfo($route, $this->user['project_id']);
|
|
|
|
if ($log) {
|
|
|
|
$route = $sign .'-'.$i.$suffix;
|
|
|
|
$i++;
|
|
|
|
goto resetRoute;
|
|
|
|
}
|
|
|
|
return $route;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @remark :删除标签
|
|
|
|
* @name :keywordDelete
|
|
|
|
* @author :lyh
|
...
|
...
|
|