/// <summary> /// 获取RequestMessage中ToUserName中的信息(这条信息由微微嗨平台向APP发出) /// </summary> /// <param name="toUserName">RequestMessage中的ToUserName属性</param> /// <returns></returns> public static WeixinRequestInfo GetWeixinRequestInfo(string toUserName) { var info = new WeixinRequestInfo(); try { var data = toUserName.Split('_'); info.WeixinId = int.Parse(data[1]); info.AppId = int.Parse(data[2]); } catch { } return info; }
/// <summary> /// 获取RequestMessage中ToUserName中的信息(这条信息由微微嗨平台向APP发出) /// </summary> /// <param name="toUserName">RequestMessage中的ToUserName属性</param> /// <returns></returns> public static WeixinRequestInfo GetWeixinRequestInfo(string toUserName) { var info = new WeixinRequestInfo(); try { var data = toUserName.Split('_'); info.WeixinId = int.Parse(data[1]); info.AppId = int.Parse(data[2]); } catch { } return(info); }