durong hace 5 años
padre
commit
d2a6738df8
Se han modificado 2 ficheros con 4 adiciones y 5 borrados
  1. 3 4
      app/Repositories/Behavior/BehaviorRepository.php
  2. 1 1
      config/constants.php

+ 3 - 4
app/Repositories/Behavior/BehaviorRepository.php

@@ -22,7 +22,7 @@ class BehaviorRepository
         $this->behavior = $behavior;
         //初始化virus域名
         $this->client = new Client([
-           'base_url' => config('constants.VIRUS_URL'),
+            'base_url' => config('constants.VIRUS_URL'),
             'timeout' => 3
         ]);
     }
@@ -37,7 +37,7 @@ class BehaviorRepository
             $signKey = urldecode(http_build_query($signKey));
             $sign = md5(config('constants.VIRUS_APP_SECRET') . $signKey);
 
-            $response = $this->client->request('GET', '/behaviorList', [
+            $response = $this->client->request('GET', 'behaviorList', [
                 'headers' => [
                     'Content-Type' => 'application/json',
                     'app' => config('constants.VIRUS_APP_ID'),
@@ -53,8 +53,7 @@ class BehaviorRepository
             ];
         }
 
-       return $res;
-
+        return $res;
     }
 
     public function create($request)

+ 1 - 1
config/constants.php

@@ -7,5 +7,5 @@
 return [
     'VIRUS_APP_ID' => env('VIRUS_APP_ID', '5cfdcf97249e6a00082639d3'),
     'VIRUS_APP_SECRET' => env('VIRUS_APP_SECRET', '4f2afc9c4099ee1f39c9f551123e54bd'),
-    'VIRUS_URL' => env('VIRUS_URL', 'https://api.dev.caihongxingqiu.com/virus'),
+    'VIRUS_URL' => env('VIRUS_URL', 'https://api.dev.caihongxingqiu.com/virus/'),
 ];