zilong 4 лет назад
Родитель
Сommit
34f710f060
1 измененных файлов с 6 добавлено и 0 удалено
  1. 6 0
      app/Http/Controllers/Api/V1/DocterController.php

+ 6 - 0
app/Http/Controllers/Api/V1/DocterController.php

xqd xqd
@@ -16,6 +16,7 @@ use App\Models\Organization;
 use App\Models\Schedule;
 use App\Models\SchedulePeriod;
 use App\Models\ServicePack;
+use App\Models\SystemConfig;
 use App\Models\Team;
 use DB;
 
@@ -35,6 +36,11 @@ class DocterController extends AuthController
         ]);
         $user = $this->user;
 
+        $is_show = SystemConfig::get('docter_config', 'is_show');
+        if ($is_show == 0) {
+            return out();
+        }
+
         $distance_field = get_user_distance_field($user);
 
         $builder = Docter::with('office', 'qualification')->select(['id', 'type', 'name', 'phone', 'sex', 'birthday', 'avatar', 'status', 'label', 'sign', 'intro', 'office_id', 'qualification_id', 'score', 'service_persons', 'eva_num', 'service_days', 'phone_minutes', 'chat_price', 'phone_price', 'appoint_price', 'is_chat', 'is_phone', 'is_appoint', 'latitude', 'longitude', DB::raw($distance_field)])->where('status', 1)->where('is_then', 1)->where('phone', '<>', '');