Kaynağa Gözat

请求调试

duqinya 5 yıl önce
ebeveyn
işleme
22928a16c8

+ 5 - 5
app/Repositories/BeanRepository.php

@@ -144,11 +144,12 @@ class BeanRepository
             }
         }
         $content_author_id = array_column($excellent_residents,'content_author_id');
-        $uids = array_unique($content_author_id);
-        $author_data = $this->getFollowMembersStatus(implode(',', $uids));
+        $content_author_id = array_unique($content_author_id);
+        $uids = implode(',', $content_author_id);
+        $author_data = $this->getFollowMembersStatus($uids);
 
-        if (isset($author_data)){
-            foreach ($excellent_residents as $k=>$v){var_dump($k);var_dump($v);
+        if ($author_data){
+            foreach ($excellent_residents as $k=>$v){
                 if(!isset($author_data[$v['content_author_id']])) continue;
                         $excellent_residents[$k]['follow_status'] = $author_data[$v['content_author_id']]['follow_status'];
                         $excellent_residents[$k]['username'] = $author_data[$v['content_author_id']]['username'];
@@ -156,7 +157,6 @@ class BeanRepository
             }
         }
         var_dump($uids);
-        var_dump(implode(',', $uids));
         var_dump($author_data);die;
 
         return $excellent_residents;

+ 2 - 2
app/Traits/UserTrait.php

@@ -40,7 +40,7 @@ trait UserTrait
 
     }
 
-    public function getFollowMembersStatus($uids) {
+    public function getFollowMembersStatus($uids) {var_dump($uids);
         try {
             $sign = generateSign([], config('customer.app_secret'));
             $url = config("customer.app_service_url").'/user/v2/member/getMemberIds';
@@ -48,7 +48,7 @@ trait UserTrait
                 'json' => ['sign' => $sign, 'uids' => $uids], 'query' => [], 'http_errors' => false,'headers'=>['Authorization'=>"Bearer ".JWTAuth::getToken()]
             ];
             return http($url,$array,'get');
-        } catch (\Exception $e) {
+        } catch (\Exception $e) {var_dump('1'.$e);
             return [];
         }