param(); $signature = $param['signature'] ?? '';// 签名 $timestamp = $param['timestamp'] ?? '';// 时间戳 $nonce = $param['nonce'] ?? '';// 随机数 $echostr = $param['echostr'] ?? '0'; // 随机字符串 $checkRes = (new WechatService())->wechatChekToken($signature,$timestamp,$nonce); $param['res_error'] = $checkRes; if ($checkRes) { echo $echostr;die; } return $this->buildFailed(400,'微信认证失败!'); } }