|
...
|
...
|
@@ -374,4 +374,31 @@ class PrivateController extends BaseController |
|
|
|
$optimize->save();
|
|
|
|
return $this->success();
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @remark :根据项目域名获取产品关键字
|
|
|
|
* @name :getProjectKeyword
|
|
|
|
* @author :lyh
|
|
|
|
* @method :post
|
|
|
|
* @time :2025/2/7 17:26
|
|
|
|
*/
|
|
|
|
public function getProjectKeyword(){
|
|
|
|
$this->request->validate([
|
|
|
|
'domain' => 'required',
|
|
|
|
], [
|
|
|
|
'domain.required' => '域名不能为空',
|
|
|
|
]);
|
|
|
|
$parsedUrl = parse_url($this->map['domain']);
|
|
|
|
$this->map['domain'] = $parsedUrl['host'] ?? $this->map['domain'];
|
|
|
|
$domainModel = new DomainInfo();
|
|
|
|
$info = $domainModel->read(['domain'=>$this->param['domain']]);
|
|
|
|
if(empty($info)){
|
|
|
|
$this->response('当前域名不存在',Code::SYSTEM_ERROR);
|
|
|
|
}
|
|
|
|
ProjectServer::useProject($info['project_id']);
|
|
|
|
$productKeywordModel = new Keyword();
|
|
|
|
$list = $productKeywordModel::orderByRaw('LENGTH(title) ASC')->limit(50)->get();
|
|
|
|
DB::disconnect('custom_mysql');
|
|
|
|
$this->response('success',Code::SUCCESS,$list);
|
|
|
|
}
|
|
|
|
} |
...
|
...
|
|