作者 李宇航

合并分支 'lyh-server' 到 'master'

gx数据



查看合并请求 !1569
... ... @@ -25,11 +25,13 @@ class GoogleKeywordInsightDetail extends Base
*/
public function saveInsightDetail($project_id,$keyword,$data){
$saveData = [];
$transData = $this->translateZh($data);
foreach ($data as $val){
$textArr = array_column($data, 'text');
$transData = $this->translateZh($textArr);
foreach ($data as $key => $val){
$saveData[] = [
'search'=>$keyword,
'text'=>$val['text'],
'zh_text'=>$transData[$key] ?? $val['text'],
'project_id'=>$project_id,
'volume'=>$val['volume'],
'competition_level'=>$val['competition_level'],
... ...