作者 lyh

gx

@@ -219,7 +219,7 @@ class VideoTask extends Command @@ -219,7 +219,7 @@ class VideoTask extends Command
219 $data = []; 219 $data = [];
220 if (!empty($products)){ 220 if (!empty($products)){
221 foreach ($products as $item){ 221 foreach ($products as $item){
222 - $data[] = !empty($item->thumb) && $item->thumb != "[]"? getImageUrl(json_decode($item->thumb)->url) : ""; 222 + $data[] = !empty($item->thumb) && $item->thumb['url'] != "" ? getImageUrl($item->thumb['url']) : "";
223 } 223 }
224 } 224 }
225 return $data; 225 return $data;
@@ -82,16 +82,26 @@ class CreateKeywordLogic extends BaseLogic @@ -82,16 +82,26 @@ class CreateKeywordLogic extends BaseLogic
82 if(empty($this->param['keyword'])){ 82 if(empty($this->param['keyword'])){
83 return $this->success($data); 83 return $this->success($data);
84 } 84 }
85 - $prefix_keyword = $this->prefixKeyword($this->param['prefix'] ?? [],$this->param['keyword']);  
86 - $keyword_suffix = $this->keywordSuffix($this->param['suffix'] ?? [],$this->param['keyword']);  
87 - $prefix_keyword_suffix = $this->prefixKeywordSuffix($this->param['prefix'] ?? [],$this->param['suffix'] ?? [],$this->param['keyword']); 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 + $filterKeywords = [];
  87 + foreach ($this->param['keyword'] as $k=>$v){
  88 + if(in_array($v,$except_k)){
  89 + unset($this->param['keyword'][$k]);
  90 + $filterKeywords[] = $v;
  91 + }
  92 + }
  93 + $prefix_keyword = $this->prefixKeyword($this->param['prefix'] ?? [],$this->param['keyword'],$except_k);
  94 + $keyword_suffix = $this->keywordSuffix($this->param['suffix'] ?? [],$this->param['keyword'],$except_k);
  95 + $prefix_keyword_suffix = $this->prefixKeywordSuffix($this->param['prefix'] ?? [],$this->param['suffix'] ?? [],$this->param['keyword'],$except_k);
88 $data = [ 96 $data = [
89 'prefix_keyword'=>$prefix_keyword, 97 'prefix_keyword'=>$prefix_keyword,
90 'prefix_keyword_count'=>count($prefix_keyword), 98 'prefix_keyword_count'=>count($prefix_keyword),
91 'keyword_suffix'=>$keyword_suffix, 99 'keyword_suffix'=>$keyword_suffix,
92 'keyword_suffix_count'=>count($keyword_suffix), 100 'keyword_suffix_count'=>count($keyword_suffix),
93 'prefix_keyword_suffix'=>$prefix_keyword_suffix, 101 'prefix_keyword_suffix'=>$prefix_keyword_suffix,
94 - 'prefix_keyword_suffix_count'=>count($prefix_keyword_suffix) 102 + 'prefix_keyword_suffix_count'=>count($prefix_keyword_suffix),
  103 + 'filterKeywords'=>$filterKeywords,
  104 + 'filterKeywords_count'=>count($filterKeywords),
95 ]; 105 ];
96 return $this->success($data); 106 return $this->success($data);
97 } 107 }
@@ -103,7 +113,7 @@ class CreateKeywordLogic extends BaseLogic @@ -103,7 +113,7 @@ class CreateKeywordLogic extends BaseLogic
103 * @method :post 113 * @method :post
104 * @time :2023/12/19 11:11 114 * @time :2023/12/19 11:11
105 */ 115 */
106 - public function prefixKeyword($prefix,$keyword){ 116 + public function prefixKeyword($prefix,$keyword,$except_k){
107 $prefix_keyword = array(); 117 $prefix_keyword = array();
108 if(!empty($prefix)){//前缀+关键词 118 if(!empty($prefix)){//前缀+关键词
109 foreach ($keyword as $keywordItem){ 119 foreach ($keyword as $keywordItem){
@@ -96,7 +96,9 @@ class CountLogic extends BaseLogic @@ -96,7 +96,9 @@ class CountLogic extends BaseLogic
96 ]; 96 ];
97 $data = $rankDataModel->read($param,['first_num','first_page_num','first_three_pages_num','first_five_pages_num','first_ten_pages_num']); 97 $data = $rankDataModel->read($param,['first_num','first_page_num','first_three_pages_num','first_five_pages_num','first_ten_pages_num']);
98 if($data === false){ 98 if($data === false){
99 - $param['updated_date'] = Carbon::yesterday()->toDateString(); 99 + $param = [
  100 + 'project_id' => $this->user['project_id']
  101 + ];
100 $data = $rankDataModel->read($param,['first_num','first_page_num','first_three_pages_num','first_five_pages_num','first_ten_pages_num']); 102 $data = $rankDataModel->read($param,['first_num','first_page_num','first_three_pages_num','first_five_pages_num','first_ten_pages_num']);
101 if($data === false){ 103 if($data === false){
102 $data = []; 104 $data = [];