|
...
|
...
|
@@ -4,11 +4,13 @@ namespace App\Models\Inquiry; |
|
|
|
|
|
|
|
|
|
|
|
use App\Helper\Arr;
|
|
|
|
use App\Helper\Translate;
|
|
|
|
use App\Models\Base;
|
|
|
|
use App\Utils\HttpUtils;
|
|
|
|
use GuzzleHttp\Exception\GuzzleException;
|
|
|
|
use Illuminate\Support\Facades\Cache;
|
|
|
|
use Illuminate\Support\Facades\Http;
|
|
|
|
use Illuminate\Support\Str;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Class InquiryRelateDomain
|
|
...
|
...
|
@@ -59,6 +61,22 @@ class InquiryRelateDomain extends Base |
|
|
|
}
|
|
|
|
Cache::put($list_cache_key, $data, 3600);
|
|
|
|
}
|
|
|
|
if(empty($data[$domain])){
|
|
|
|
$domainPrefix = explode(".",$domain);
|
|
|
|
if (!empty($domainPrefix)){
|
|
|
|
if($domainPrefix[0] == 'm'){
|
|
|
|
$domain = "www.".$domainPrefix[1].".".$domainPrefix[2];
|
|
|
|
}else{
|
|
|
|
$isLang = Translate::getTls($domainPrefix[0]);
|
|
|
|
if ($isLang) {
|
|
|
|
$domain = "www.".$domainPrefix[1].".".$domainPrefix[2];
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if(!Str::startsWith($domain, 'www')){
|
|
|
|
$domain = 'www.' . $domain;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return $data[$domain]??'';
|
|
|
|
}
|
|
|
|
} |
...
|
...
|
|