|
@@ -23,15 +23,15 @@ class UserService
|
|
$idCard = isset($params['id_card']) ? $params['id_card'] : '';
|
|
$idCard = isset($params['id_card']) ? $params['id_card'] : '';
|
|
$realName = isset($params['real_name']) ? $params['real_name'] : '';
|
|
$realName = isset($params['real_name']) ? $params['real_name'] : '';
|
|
$tencentConfig = config('tencent_im');
|
|
$tencentConfig = config('tencent_im');
|
|
- $sercrtId = isset($tencentConfig['secret_id']) ? $tencentConfig['secret_id'] : '';
|
|
|
|
- $sercrtKey = isset($tencentConfig['secret_key']) ? $tencentConfig['secret_key'] : '';
|
|
|
|
|
|
+ $sercrtId = isset($tencentConfig['SecretId']) ? $tencentConfig['SecretId'] : '';
|
|
|
|
+ $sercrtKey = isset($tencentConfig['SecretKey']) ? $tencentConfig['SecretKey'] : '';
|
|
//获取token
|
|
//获取token
|
|
$token_url = 'https://miniprogram-kyc.tencentcloudapi.com/api/oauth2/access_token?app_id='.$sercrtId.'&secret='.$sercrtKey.'&grant_type=client_credential&version=1.0.0';
|
|
$token_url = 'https://miniprogram-kyc.tencentcloudapi.com/api/oauth2/access_token?app_id='.$sercrtId.'&secret='.$sercrtKey.'&grant_type=client_credential&version=1.0.0';
|
|
$token_result = file_get_contents($token_url);
|
|
$token_result = file_get_contents($token_url);
|
|
if (!$token_result) {
|
|
if (!$token_result) {
|
|
throw new Exception('您的网络开小差啦1~');
|
|
throw new Exception('您的网络开小差啦1~');
|
|
}
|
|
}
|
|
- $token_result = json_decode($token_result, true);
|
|
|
|
|
|
+ $token_result = json_decode($token_result, true);echo '<pre>';var_dump($token_result);exit;
|
|
if ($token_result['code'] != 0) {
|
|
if ($token_result['code'] != 0) {
|
|
throw new Exception('您的网络开小差啦2~');
|
|
throw new Exception('您的网络开小差啦2~');
|
|
}
|
|
}
|