|
@@ -26,7 +26,7 @@ class GoogleKeywordInsightDetail extends Base |
|
@@ -26,7 +26,7 @@ class GoogleKeywordInsightDetail extends Base |
|
26
|
public function saveInsightDetail($project_id,$keyword,$data){
|
26
|
public function saveInsightDetail($project_id,$keyword,$data){
|
|
27
|
$saveData = [];
|
27
|
$saveData = [];
|
|
28
|
$textArr = array_column($data, 'text');
|
28
|
$textArr = array_column($data, 'text');
|
|
29
|
- $transData = $this->translateZh($textArr);
|
29
|
+ $transData = Translate::tran($textArr, 'zh');
|
|
30
|
foreach ($data as $key => $val){
|
30
|
foreach ($data as $key => $val){
|
|
31
|
$saveData[] = [
|
31
|
$saveData[] = [
|
|
32
|
'search'=>$keyword,
|
32
|
'search'=>$keyword,
|
|
@@ -43,15 +43,4 @@ class GoogleKeywordInsightDetail extends Base |
|
@@ -43,15 +43,4 @@ class GoogleKeywordInsightDetail extends Base |
|
43
|
}
|
43
|
}
|
|
44
|
return $this->insertAll($saveData);
|
44
|
return $this->insertAll($saveData);
|
|
45
|
}
|
45
|
}
|
|
46
|
-
|
|
|
|
47
|
- /**
|
|
|
|
48
|
- * @remark :翻译中文
|
|
|
|
49
|
- * @name :translateZh
|
|
|
|
50
|
- * @author :lyh
|
|
|
|
51
|
- * @method :post
|
|
|
|
52
|
- * @time :2025/3/25 17:21
|
|
|
|
53
|
- */
|
|
|
|
54
|
- public function translateZh($data){
|
|
|
|
55
|
- return Translate::tran($data, 'zh');
|
|
|
|
56
|
- }
|
|
|
|
57
|
} |
46
|
} |