Переглянути джерело

2023-5-22-1 新增服务区-2

yingzi 1 рік тому
батько
коміт
7f42684a1a
1 змінених файлів з 3 додано та 3 видалено
  1. 3 3
      app/api/controller/Pub.php

+ 3 - 3
app/api/controller/Pub.php

@@ -341,9 +341,9 @@ class Pub extends BaseController
                 'avatar' => $userInfo['avatar'],
                 'card_look_count' => $value['ip_count'],
                 'template' => $template,
-                'is_type_audit'=>$auth['status']==1?1:0,
-                'ancestral_place'=>$auth['ancestral_place'],
-                'auth_info' => $auth->toArray(),
+                'is_type_audit' => $auth && $auth['status'] == 1 ? 1 : 0,
+                'ancestral_place' => $auth ? $auth['ancestral_place'] : '',
+                'auth_info' => $auth ? $auth->toArray() : [],
                 'user_work_type_id' => $user_work_type_title['title'],
             ];
         }