|
@@ -266,7 +266,13 @@ class OPPOPushCommon
|
|
$body = $response->getBody();
|
|
$body = $response->getBody();
|
|
$this->logPush(__FUNCTION__, 'body', compact('body'));
|
|
$this->logPush(__FUNCTION__, 'body', compact('body'));
|
|
$result = json_decode($body, true);
|
|
$result = json_decode($body, true);
|
|
- $authToken = getProp($result['data'], 'auth_token');
|
|
|
|
|
|
+ if(isset($result['data']) && !empty($result['data'])){
|
|
|
|
+ $authToken = getProp($result['data'], 'auth_token');
|
|
|
|
+ }else{
|
|
|
|
+ $authToken = '';
|
|
|
|
+ $this->logPush(__FUNCTION__, 'result', $result);
|
|
|
|
+ }
|
|
|
|
+
|
|
if (!$authToken) {
|
|
if (!$authToken) {
|
|
throw new Exception('获取auth token失败');
|
|
throw new Exception('获取auth token失败');
|
|
}
|
|
}
|