access_token(); $url = 'https://miniprogram-kyc.tencentcloudapi.com/api/oauth2/api_ticket?app_id='.$appid.'&access_token='.$token.'&type=NONCE&version=1.0.0&user_id='.$this->auth->id; $tickets = ''; $result = curl_get($url); // dump($result); if($result){ $result = json_decode($result,true); if($result['code'] == 0 && isset($result['tickets'][0]['value'])){ $tickets = $result['tickets'][0]['value']; } } $this->success('success',$tickets); } public function sdksign(){ $config = config('renlian'); $appid = $config['appid']; $secret = $config['secret']; } }