|
|
|
@ -123,8 +123,8 @@ class Server |
|
|
|
|
$data['component_appid'] = self::APPID; |
|
|
|
|
$data['authorization_code'] = $authorization_code; |
|
|
|
|
$result = $this->curlPost($url, json_encode($data)); |
|
|
|
|
Db::table('yoshop_wx_server')->insertGetId(['content' => $result, 'created_at' => date('Y-m-d H:i:s')]); |
|
|
|
|
$result = json_decode($result, true); |
|
|
|
|
Db::table('yoshop_wx_server')->insertGetId(['content' => json_encode($result), 'created_at' => date('Y-m-d H:i:s')]); |
|
|
|
|
if ($result && !empty($result['authorization_info']) && !empty($result['authorization_info']['authorizer_appid'])) { |
|
|
|
|
Db::table('yoshop_wx_server')->insertGetId(['content' => '获取详情' . $authorization_code, 'created_at' => date('Y-m-d H:i:s')]); |
|
|
|
|
$url = 'https://api.weixin.qq.com/cgi-bin/component/api_get_authorizer_info?component_access_token=' . $this->getComponentAccessToken(); |
|
|
|
@ -132,8 +132,8 @@ class Server |
|
|
|
|
$data['component_appid'] = self::APPID; |
|
|
|
|
$data['authorizer_appid'] = $result['authorization_info']['authorizer_appid']; |
|
|
|
|
$res = $this->curlPost($url, json_encode($data)); |
|
|
|
|
Db::table('yoshop_wx_server')->insertGetId(['content' => $res, 'created_at' => date('Y-m-d H:i:s')]); |
|
|
|
|
$res = json_decode($res, true); |
|
|
|
|
Db::table('yoshop_wx_server')->insertGetId(['content' => json_encode($res), 'created_at' => date('Y-m-d H:i:s')]); |
|
|
|
|
if ($res && !empty($res['authorizer_info']) && !empty($res['authorization_info'])) { |
|
|
|
|
$authorizer_info = $res['authorizer_info']; |
|
|
|
|
$authorization_info = $res['authorization_info']; |
|
|
|
|