作者 李宇航

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

gx



查看合并请求 !1680
@@ -37,15 +37,17 @@ class GoogleSearchController extends BaseController @@ -37,15 +37,17 @@ 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 - if($this->param['type'] == 'country'){  
41 - $country = [];  
42 - foreach ($data as $val){  
43 - $country[] = Country::getCountryNameByAlpha3($val['keys']);  
44 - }  
45 - $zh_country = Translate::tran($country, 'zh');  
46 - foreach ($data as $key => $val){  
47 - $val['zh_country'] = $zh_country[$key];  
48 - $data[$key] = $val; 40 + if(!empty($data)){
  41 + if($this->param['type'] == 'country'){
  42 + $country = [];
  43 + foreach ($data as $val){
  44 + $country[] = Country::getCountryNameByAlpha3($val['keys']);
  45 + }
  46 + $zh_country = Translate::tran($country, 'zh');
  47 + foreach ($data as $key => $val){
  48 + $val['zh_country'] = $zh_country[$key];
  49 + $data[$key] = $val;
  50 + }
49 } 51 }
50 } 52 }
51 $this->response('success',Code::SUCCESS,$data); 53 $this->response('success',Code::SUCCESS,$data);
@@ -712,6 +712,10 @@ Route::middleware(['bloginauth'])->group(function () { @@ -712,6 +712,10 @@ Route::middleware(['bloginauth'])->group(function () {
712 Route::any('/getEnterProduct', [\App\Http\Controllers\Bside\SeoSetting\EnterpriseProductController::class, 'getEnterProduct'])->name('enterprise_product_getEnterProduct'); 712 Route::any('/getEnterProduct', [\App\Http\Controllers\Bside\SeoSetting\EnterpriseProductController::class, 'getEnterProduct'])->name('enterprise_product_getEnterProduct');
713 Route::any('/del', [\App\Http\Controllers\Bside\SeoSetting\EnterpriseProductController::class, 'del'])->name('enterprise_product_del'); 713 Route::any('/del', [\App\Http\Controllers\Bside\SeoSetting\EnterpriseProductController::class, 'del'])->name('enterprise_product_del');
714 }); 714 });
  715 + //大模型会话
  716 + Route::prefix('grt')->group(function () {
  717 + Route::any('/sendMessage', [\App\Http\Controllers\Bside\Gpt\ChatController::class, 'sendMessage'])->name('gpt_sendMessage');
  718 + });
715 }); 719 });
716 //无需登录验证的路由组 720 //无需登录验证的路由组
717 Route::group([], function () { 721 Route::group([], function () {