作者 lyh

gx

@@ -83,12 +83,13 @@ class CreateKeywordLogic extends BaseLogic @@ -83,12 +83,13 @@ class CreateKeywordLogic extends BaseLogic
83 return $this->success($data); 83 return $this->success($data);
84 } 84 }
85 $except_k = ['Quality','Philippines','USA','UK','America','China','Wholesale','Hot Sale','Cheap','cheap','price','pricelist','hot sale','Price','Pricelist','With ','For ','And ','Oem','Odm','Supplier','Manufacturer','CE Certification','Factory','Exporters','Company','Companies','Suppliers','Manufacturers','Factories','Company','Companies','Exporters','Exporter','Buy ',' Buy','Where ','What ','When ','How ','Which ','Producer','Producers','Best Selling','Hot Selling','Near','Chinese','India','use','high quality','discount','online','custom','customized','Enterprise','Agent','Plant','Refinery','Foundry','Maker','Distributor']; 85 $except_k = ['Quality','Philippines','USA','UK','America','China','Wholesale','Hot Sale','Cheap','cheap','price','pricelist','hot sale','Price','Pricelist','With ','For ','And ','Oem','Odm','Supplier','Manufacturer','CE Certification','Factory','Exporters','Company','Companies','Suppliers','Manufacturers','Factories','Company','Companies','Exporters','Exporter','Buy ',' Buy','Where ','What ','When ','How ','Which ','Producer','Producers','Best Selling','Hot Selling','Near','Chinese','India','use','high quality','discount','online','custom','customized','Enterprise','Agent','Plant','Refinery','Foundry','Maker','Distributor'];
86 - $except_k = array_map('strtolower', $except_k);  
87 $filterKeywords = []; 86 $filterKeywords = [];
88 - foreach ($this->param['keyword'] as $k=>$v){  
89 - if(in_array(strtolower($v),$except_k)){  
90 - unset($this->param['keyword'][$k]);  
91 - $filterKeywords[] = $v; 87 + foreach ($this->param['keyword'] as $k=>$keyword){
  88 + foreach ($except_k as $exc_k){
  89 + if(strpos(strtolower($keyword),strtolower($exc_k)) !== false){
  90 + unset($this->param['keyword'][$k]);
  91 + $filterKeywords[] = $keyword;
  92 + }
92 } 93 }
93 } 94 }
94 $prefix_keyword = $this->prefixKeyword($this->param['prefix'] ?? [],$this->param['keyword'],$except_k); 95 $prefix_keyword = $this->prefixKeyword($this->param['prefix'] ?? [],$this->param['keyword'],$except_k);