$authUrl], 'GetSessionKeyTrace'); $response = HttpService::httpGet($authUrl); Log::info('登录凭证响应结果:', ['response' => $response], 'GetSessionKeyTrace'); $responseData = json_decode($response, true); if(!$response || (isset($responseData['errcode']) && $responseData['errcode'])) { // 返回结果异常 EmailQueue::rPush('小程序登录凭证校验失败', '错误码:'.$responseData['errcode'] , ['xiaohua.hou@kuxuan-inc.com'], '小程序登录凭证校验失败'); Log::error('小程序登录凭证校验失败', [ 'response' => $responseData ], 'GetSessionKeyFail'); $errno = 1001; return []; } $errno = 0; return [ 'session_key' => $responseData['session_key'], 'union_id' => $responseData['unionid'] ?? '', 'openid' => $responseData['openid'] ]; } }