作者 lyh

gx

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