/// <summary> /// 接收到客户的点击菜单按钮事件 /// </summary> /// <param name="context"></param> /// <param name="doc"></param> private void _OnEventClickMessage(HttpContext context, System.Xml.XmlDocument doc) { // <xml> //<ToUserName><![CDATA[toUser]]></ToUserName> //<FromUserName><![CDATA[FromUser]]></FromUserName> //<CreateTime>123456789</CreateTime> //<MsgType><![CDATA[event]]></MsgType> //<Event><![CDATA[CLICK]]></Event> //<EventKey><![CDATA[EVENTKEY]]></EventKey> //</xml> string toUserName = doc.GetElementsByTagName("ToUserName")[0].InnerText; string fromUserName = doc.GetElementsByTagName("FromUserName")[0].InnerText; string createTime = doc.GetElementsByTagName("CreateTime")[0].InnerText; string eventKey = doc.GetElementsByTagName("EventKey")[0].InnerText; RequestEventClick rqMsg = new RequestEventClick(); rqMsg.ToUserName = toUserName; rqMsg.FromUserName = fromUserName; rqMsg.CreateTime = new DateTime(long.Parse(createTime)); rqMsg.EventKey = eventKey; ResponseMessage rpMsg = OnEventClickMessage(rqMsg); SendResponseMessage(context, rpMsg, rqMsg); }
public override ResponseMessage OnEventClickMessage(RequestEventClick requestEventClick) { throw new NotImplementedException(); }
/// <summary> /// 接收到客户的点击菜单按钮事件 /// </summary> /// <param name="requestEventClick"></param> /// <returns></returns> public abstract ResponseMessage OnEventClickMessage(RequestEventClick requestEventClick);