作者 lyh

gx

... ... @@ -28,7 +28,9 @@ class DomainInfoController extends BaseController
{
$domainModel = new DomainInfo();
if(isset($this->map['domain']) && !empty($this->map['domain'])){
$this->map['domain'] = ['like','%'.$this->map['domain'],'%'];
$parsedUrl = parse_url($this->map['domain']);
$this->map['domain'] = $parsedUrl['host'] ?? $this->map['domain'];
$this->map['domain'] = ['like','%'.parse_url($this->map['domain']),'%'];
}
$lists = $domainModel->lists($this->map,$this->page,$this->row,$this->order);
if(!empty($lists)){
... ...
... ... @@ -56,7 +56,7 @@ class RouteMap extends Base
if(preg_match('/[\x{4e00}-\x{9fa5}]/u', $title)){
$title = Translate::tran($title, 'en');
}else{
if(!preg_match('/^[a-zA-Z\s]+$/', $title)){
if(!preg_match('/[a-zA-Z]/', $title)){
$title = Translate::tran($title, 'en');
}
}
... ...