|
@@ -10,6 +10,8 @@ |
|
@@ -10,6 +10,8 @@ |
|
10
|
namespace App\Http\Controllers\Bside\GoogleKeyword;
|
10
|
namespace App\Http\Controllers\Bside\GoogleKeyword;
|
|
11
|
|
11
|
|
|
12
|
use App\Enums\Common\Code;
|
12
|
use App\Enums\Common\Code;
|
|
|
|
13
|
+use App\Helper\Country;
|
|
|
|
14
|
+use App\Helper\Translate;
|
|
13
|
use App\Http\Controllers\Bside\BaseController;
|
15
|
use App\Http\Controllers\Bside\BaseController;
|
|
14
|
use App\Models\Com\NoticeLog;
|
16
|
use App\Models\Com\NoticeLog;
|
|
15
|
use App\Models\GoogleSearch\GoogleSearch;
|
17
|
use App\Models\GoogleSearch\GoogleSearch;
|
|
@@ -35,6 +37,14 @@ class GoogleSearchController extends BaseController |
|
@@ -35,6 +37,14 @@ class GoogleSearchController extends BaseController |
|
35
|
$searchDetailModel = new GoogleSearchDetail();
|
37
|
$searchDetailModel = new GoogleSearchDetail();
|
|
36
|
$this->map['project_id']= $this->user['project_id'];
|
38
|
$this->map['project_id']= $this->user['project_id'];
|
|
37
|
$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'){
|
|
|
|
42
|
+ $country = [];
|
|
|
|
43
|
+ foreach ($data as $key => $val){
|
|
|
|
44
|
+ $country[] = Country::getCountryNameByAlpha3($val['keys']);
|
|
|
|
45
|
+ }
|
|
|
|
46
|
+ $route = Translate::tran($country, 'en');
|
|
|
|
47
|
+ }
|
|
38
|
$this->response('success',Code::SUCCESS,$data);
|
48
|
$this->response('success',Code::SUCCESS,$data);
|
|
39
|
}
|
49
|
}
|
|
40
|
} |
50
|
} |