|
...
|
...
|
@@ -432,4 +432,29 @@ class PrivateController extends BaseController |
|
|
|
DB::disconnect('custom_mysql');
|
|
|
|
$this->response('success',Code::SUCCESS,$data);
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 获取项目监控关键词
|
|
|
|
* @param Request $request
|
|
|
|
* @return false|string
|
|
|
|
*/
|
|
|
|
public function getMonitorKeyword(Request $request)
|
|
|
|
{
|
|
|
|
$domain = trim($request->input('domain'));
|
|
|
|
$domain_parse = parse_url($domain);
|
|
|
|
$domain = $domain_parse['host'] ?? $domain;
|
|
|
|
|
|
|
|
if (empty($domain)) {
|
|
|
|
return $this->error('非法参数!');
|
|
|
|
}
|
|
|
|
|
|
|
|
$project = Project::getProjectByDomain($domain);
|
|
|
|
if (empty($project)) {
|
|
|
|
return $this->error('未找到当前域名对应的项目!');
|
|
|
|
}
|
|
|
|
|
|
|
|
$json = file_get_contents(storage_path('data/send_product_tag_keyword/' . $project->id . '.json'));
|
|
|
|
$result = json_decode($json, true) ?: [];
|
|
|
|
return $this->success($result);
|
|
|
|
}
|
|
|
|
} |
...
|
...
|
|