正在显示
1 个修改的文件
包含
7 行增加
和
0 行删除
| @@ -18,6 +18,7 @@ use App\Models\Com\City; | @@ -18,6 +18,7 @@ use App\Models\Com\City; | ||
| 18 | use App\Models\Com\UpdateLog; | 18 | use App\Models\Com\UpdateLog; |
| 19 | use App\Models\Devops\ServerConfig; | 19 | use App\Models\Devops\ServerConfig; |
| 20 | use App\Models\Domain\DomainInfo; | 20 | use App\Models\Domain\DomainInfo; |
| 21 | +use App\Models\Domain\DomainInfo; | ||
| 21 | use App\Models\Domain\DomainInfo as DomainInfoModel; | 22 | use App\Models\Domain\DomainInfo as DomainInfoModel; |
| 22 | use App\Models\HomeCount\Count; | 23 | use App\Models\HomeCount\Count; |
| 23 | use App\Models\Inquiry\InquirySet; | 24 | use App\Models\Inquiry\InquirySet; |
| @@ -200,6 +201,12 @@ class ProjectController extends BaseController | @@ -200,6 +201,12 @@ class ProjectController extends BaseController | ||
| 200 | * @return mixed | 201 | * @return mixed |
| 201 | */ | 202 | */ |
| 202 | public function searchContent(&$query){ | 203 | public function searchContent(&$query){ |
| 204 | + if(!empty($this->map['domain'])){ | ||
| 205 | + $parsedUrl = parse_url($this->map['domain']); | ||
| 206 | + $search = $parsedUrl['host'] ?? $this->map['search']; | ||
| 207 | + $ids = DomainInfo::where('domain', 'like', '%'.$search.'%')->pluck('id')->toArray(); | ||
| 208 | + $query->whereIn('gl_project_deploy_optimize.domain', $ids); | ||
| 209 | + } | ||
| 203 | if(!empty($this->map['search']) && !empty($this->map['search_type'])){ | 210 | if(!empty($this->map['search']) && !empty($this->map['search_type'])){ |
| 204 | $query->where(function ($subQuery) { | 211 | $query->where(function ($subQuery) { |
| 205 | // 搜索域名 | 212 | // 搜索域名 |
-
请 注册 或 登录 后发表评论