正在显示
1 个修改的文件
包含
6 行增加
和
3 行删除
| @@ -37,13 +37,16 @@ class GoogleSearchController extends BaseController | @@ -37,13 +37,16 @@ class GoogleSearchController extends BaseController | ||
| 37 | $searchDetailModel = new GoogleSearchDetail(); | 37 | $searchDetailModel = new GoogleSearchDetail(); |
| 38 | $this->map['project_id']= $this->user['project_id']; | 38 | $this->map['project_id']= $this->user['project_id']; |
| 39 | $data = $searchDetailModel->lists($this->map,$this->page,$this->row); | 39 | $data = $searchDetailModel->lists($this->map,$this->page,$this->row); |
| 40 | - | ||
| 41 | if($this->param['type'] == 'country'){ | 40 | if($this->param['type'] == 'country'){ |
| 42 | $country = []; | 41 | $country = []; |
| 43 | - foreach ($data as $key => $val){ | 42 | + foreach ($data as $val){ |
| 44 | $country[] = Country::getCountryNameByAlpha3($val['keys']); | 43 | $country[] = Country::getCountryNameByAlpha3($val['keys']); |
| 45 | } | 44 | } |
| 46 | - $route = Translate::tran($country, 'en'); | 45 | + $zh_country = Translate::tran($country, 'zh'); |
| 46 | + foreach ($data as $key => $val){ | ||
| 47 | + $val['zh_country'] = $zh_country[$key]; | ||
| 48 | + $data[$key] = $val; | ||
| 49 | + } | ||
| 47 | } | 50 | } |
| 48 | $this->response('success',Code::SUCCESS,$data); | 51 | $this->response('success',Code::SUCCESS,$data); |
| 49 | } | 52 | } |
-
请 注册 或 登录 后发表评论