/// <summary> /// 微信消息接口对接;wxinxinapi/WxRequest /// </summary> public void WxRequest() { if (IsHttpPost) { try { Stream s = Context.Request.InputStream; string responseDoc = WxHelper.WxRequest(s); Write(responseDoc); } catch (Exception ex) { Log.WriteLogToTxt("异常微信接口对接:" + ex.Message, LogType.Error); } } else { string signature = Query <string>("signature"); string nonce = Query <string>("nonce"); string timestamp = Query <string>("timestamp"); string echostr = Query <string>("echostr"); Write(WxHelper.Check(signature, timestamp, nonce, echostr)); } }