|
...
|
...
|
@@ -555,20 +555,23 @@ class OptimizeController extends BaseController |
|
|
|
], [
|
|
|
|
'project_id.required' => '项目id不能为空',
|
|
|
|
]);
|
|
|
|
$domainModel = new DomainInfo();
|
|
|
|
$domainInfo = $domainModel->read(['project_id'=>$this->param['project_id']],['domain']);
|
|
|
|
if($domainInfo === false){
|
|
|
|
$this->response('success');
|
|
|
|
}
|
|
|
|
ProjectServer::useProject($this->param['project_id']);
|
|
|
|
$aiBlogModel = new AiBlog();
|
|
|
|
$list = $aiBlogModel->formatQuery(['route'=>['!=',null]])->pluck('route')->toArray();
|
|
|
|
$list = $aiBlogModel->list(['route'=>['!=',null]],'id',['route','title']);
|
|
|
|
if(!empty($list)){
|
|
|
|
$domainModel = new DomainInfo();
|
|
|
|
$DomainInfo = $domainModel->read(['project_id'=>$this->param['project_id']]);
|
|
|
|
$resultData = [];
|
|
|
|
$DomainInfo['domain'] = $DomainInfo['domain'] ?? '';
|
|
|
|
foreach ($list as $k => $v){
|
|
|
|
$v = ('https://'.$DomainInfo['domain'].'/') . 'blog/' . $v;
|
|
|
|
$list[$k] = $v;
|
|
|
|
foreach ($list as $v){
|
|
|
|
$resultData[] = ('https://'.$DomainInfo['domain'].'/') . 'blog/' . $v['route'] . '/{' . $v['title'] . '}';
|
|
|
|
}
|
|
|
|
}
|
|
|
|
DB::disconnect('custom_mysql');
|
|
|
|
$this->response('success',Code::SUCCESS,$list);
|
|
|
|
$this->response('success',Code::SUCCESS,$resultData);
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
...
|
...
|
|