getInput(); } foreach ($postData as $k => $v) { $log_postdata .= $k . ':' . $v . ' '; } } catch (\Exception $e) { $log_postdata = json_encode($postData); } log_message('请求:'.request()->url().' '.$log_postdata,'log',LOG_PATH . 'complex/SpecialParam/'); $prefix = strtolower(input('channel_mark')); // 渠道标识 $channelModel = new ComplexChannelModel; if(!($channel_id=$channelModel->where(['status'=>1,'mark'=>$prefix])->value('id'))) { $this->jsonResult('',0,'渠道信息不存在'); } if(!$polyChannelGame = (new PolychannelGame())->where(['channel_id'=>$channel_id,'game_id'=>$postData['gameid']])->find()){ $this->jsonResult('',0,'渠道游戏不存在'); } // 判断是否有做登录验证的渠道 if (in_array($prefix,$this->_neekCheckChannel)){ try { $sentence = ucfirst($prefix); $className = 'app\api\complex\\' . $sentence; $model = new $className; $result = $model->getSpecialParam(input(),$polyChannelGame); if($result){ $this->jsonResultTrue(['cuserid'=>$result],1,'获取成功'); }else{ $this->jsonResultTrue('',0,'二次登录验证失败 '); } }catch (Exception $e){ curlDD( '渠道支付回调:'. $e->getMessage(),Env::get('dingtalk.warning_url')); $this->jsonResultTrue('',0,'二次登录验证失败'); } }else{ $this->jsonResultTrue('', 1, ''); } } public function jsonResultTrue($data, $code = 0, $msg = '',$isExit=true) { $result = [ 'code' => $code, 'msg' => $msg, 'time' => request()->server('REQUEST_TIME'), 'data' => $data, ]; //debug模式下返回明文 echo json_encode($result); //为了使用fastcgi_finish_request等函数时,后续的执行能够继续生效 if($isExit) exit; } }