Ver código fonte

修改b端接口;企业详情

15313670163 5 meses atrás
pai
commit
1be4553ed9
1 arquivos alterados com 5 adições e 0 exclusões
  1. 5 0
      app/JsonRpc/NewsService.php

+ 5 - 0
app/JsonRpc/NewsService.php

@@ -6188,6 +6188,11 @@ class NewsService implements NewsServiceInterface
   public function getCompanyInfo(array $data): array
   {
     $result = Company::where('id', $data['id'])->first();
+    $city_arr = json_decode($result['city_arr_id']);
+     $result['city_name'] = District::whereIn('id', $city_arr)
+        ->pluck('name')
+        ->implode('-');
+
     if (empty($result)) {
       return Result::error('企业不存在!');
     } else {