liugc 1 éve
szülő
commit
0b75cc5852
1 módosított fájl, 10 hozzáadás és 2 törlés
  1. 10 2
      app/common/logic/ExternalPlatformLogic.php

+ 10 - 2
app/common/logic/ExternalPlatformLogic.php

@@ -66,7 +66,11 @@ class ExternalPlatformLogic  extends BaseLogic
                     ],JSON_UNESCAPED_UNICODE)
                 ];
                 $data['sign'] = ExternalPlatform::getSign($externalPlatform['appkey'],$data);
-                $res = http_request($externalPlatform['send_url'],http_build_query($data));
+                if($externalPlatform['send_url']){
+                    $res = http_request($externalPlatform['send_url'],http_build_query($data));
+                }else{
+                    $res = '未配置接口地址';
+                }
                 Log::info('ExternalPlatform-confirmPrice:'
                     .'url:'.$externalPlatform['send_url']
                     .'|data:'.json_encode($data,JSON_UNESCAPED_UNICODE)
@@ -99,7 +103,11 @@ class ExternalPlatformLogic  extends BaseLogic
                     ],JSON_UNESCAPED_UNICODE)
                 ];
                 $data['sign'] = ExternalPlatform::getSign($externalPlatform['appkey'],$data);
-                $res = http_request($externalPlatform['send_url'],http_build_query($data));
+                if($externalPlatform['send_url']){
+                    $res = http_request($externalPlatform['send_url'],http_build_query($data));
+                }else{
+                    $res = '未配置接口地址';
+                }
                 Log::info('ExternalPlatform-serviceFinish:'
                     .'url:'.$externalPlatform['send_url']
                     .'|data:'.json_encode($data,JSON_UNESCAPED_UNICODE)