作者 lyh

gx

... ... @@ -219,7 +219,7 @@ class VideoTask extends Command
$data = [];
if (!empty($products)){
foreach ($products as $item){
$data[] = !empty($item->thumb) && $item->thumb != "[]"? getImageUrl(json_decode($item->thumb)->url) : "";
$data[] = !empty($item->thumb) && $item->thumb['url'] != "" ? getImageUrl($item->thumb['url']) : "";
}
}
return $data;
... ...
... ... @@ -82,16 +82,26 @@ class CreateKeywordLogic extends BaseLogic
if(empty($this->param['keyword'])){
return $this->success($data);
}
$prefix_keyword = $this->prefixKeyword($this->param['prefix'] ?? [],$this->param['keyword']);
$keyword_suffix = $this->keywordSuffix($this->param['suffix'] ?? [],$this->param['keyword']);
$prefix_keyword_suffix = $this->prefixKeywordSuffix($this->param['prefix'] ?? [],$this->param['suffix'] ?? [],$this->param['keyword']);
$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'];
$filterKeywords = [];
foreach ($this->param['keyword'] as $k=>$v){
if(in_array($v,$except_k)){
unset($this->param['keyword'][$k]);
$filterKeywords[] = $v;
}
}
$prefix_keyword = $this->prefixKeyword($this->param['prefix'] ?? [],$this->param['keyword'],$except_k);
$keyword_suffix = $this->keywordSuffix($this->param['suffix'] ?? [],$this->param['keyword'],$except_k);
$prefix_keyword_suffix = $this->prefixKeywordSuffix($this->param['prefix'] ?? [],$this->param['suffix'] ?? [],$this->param['keyword'],$except_k);
$data = [
'prefix_keyword'=>$prefix_keyword,
'prefix_keyword_count'=>count($prefix_keyword),
'keyword_suffix'=>$keyword_suffix,
'keyword_suffix_count'=>count($keyword_suffix),
'prefix_keyword_suffix'=>$prefix_keyword_suffix,
'prefix_keyword_suffix_count'=>count($prefix_keyword_suffix)
'prefix_keyword_suffix_count'=>count($prefix_keyword_suffix),
'filterKeywords'=>$filterKeywords,
'filterKeywords_count'=>count($filterKeywords),
];
return $this->success($data);
}
... ... @@ -103,7 +113,7 @@ class CreateKeywordLogic extends BaseLogic
* @method :post
* @time :2023/12/19 11:11
*/
public function prefixKeyword($prefix,$keyword){
public function prefixKeyword($prefix,$keyword,$except_k){
$prefix_keyword = array();
if(!empty($prefix)){//前缀+关键词
foreach ($keyword as $keywordItem){
... ...
... ... @@ -96,7 +96,9 @@ class CountLogic extends BaseLogic
];
$data = $rankDataModel->read($param,['first_num','first_page_num','first_three_pages_num','first_five_pages_num','first_ten_pages_num']);
if($data === false){
$param['updated_date'] = Carbon::yesterday()->toDateString();
$param = [
'project_id' => $this->user['project_id']
];
$data = $rankDataModel->read($param,['first_num','first_page_num','first_three_pages_num','first_five_pages_num','first_ten_pages_num']);
if($data === false){
$data = [];
... ...