作者 lyh

gx

@@ -42,6 +42,8 @@ class Wechat @@ -42,6 +42,8 @@ class Wechat
42 $client = new Client(); 42 $client = new Client();
43 $response = $client->get($url); 43 $response = $client->get($url);
44 $data = json_decode($response->getBody(), true); 44 $data = json_decode($response->getBody(), true);
  45 + value($data);
  46 + die();
45 $accessToken = $data['access_token']; 47 $accessToken = $data['access_token'];
46 // 将accessToken缓存起来,避免多次请求 48 // 将accessToken缓存起来,避免多次请求
47 Cache::put($cacheKey, $accessToken, $data['expires_in'] / 60); 49 Cache::put($cacheKey, $accessToken, $data['expires_in'] / 60);