duqinya пре 5 година
родитељ
комит
19aaeccd20
1 измењених фајлова са 7 додато и 6 уклоњено
  1. 7 6
      app/Repositories/BeanRepository.php

+ 7 - 6
app/Repositories/BeanRepository.php

@@ -142,8 +142,8 @@ class BeanRepository
             }
         }
         $user_ids = array_column($excellent_residents,'content_author_id');
-       $request['content_author_id'] = array_unique($user_ids);
-        $author_data = $this->followDetail($request);
+       $content_author_id = array_unique($user_ids);
+        $author_data = $this->followDetail($content_author_id);
         if (count($author_data)>0){
             foreach ($author_data as $key=>$val){
                 foreach ($excellent_residents as $k=>$v){
@@ -175,14 +175,15 @@ class BeanRepository
 
     }
 
-   function followDetail($request)
+   function followDetail($content_author_id)
     {
         try {
-            $url = config("customer.app_service_url") . '/user/v2/member/getMemberIds';
+            $sign = generateSign([], config('customer.app_secret'));
+            $url = config("customer.app_service_url").'/user/v2/member/getMemberIds';
             $array = [
-                'json' => ['uids' => $request['content_author_id']], 'query' => [], 'http_errors' => false, 'headers' => ['Authorization' => "Bearer " . JWTAuth::getToken()]
+                'json' => ['sign' => $sign, 'uids' => $content_author_id], 'query' => [], 'http_errors' => false,'headers'=>['Authorization'=>"Bearer ".JWTAuth::getToken()]
             ];
-            return http($url, $array, 'get');
+            return http($url,$array,'get');
         } catch (\Exception $e) {
             Log::debug("followDetail:".$e->getMessage());
             return [];