Beispiel #1
0
 /// <summary>
 /// 上报地理位置
 /// </summary>
 /// <param name="httpRequest"></param>
 /// <param name="msg"></param>
 public static void ResponseLocaltonEvent(HttpResponseBase Response, MsgModel msg, ResultCryptography ccg)
 {
     msg.TextModel = new TextModel()
     {
         Content = "上传地理位置成功!"
     };
     var remsg = XmlHelpler.GetTextXml(msg);
     //Response.Write(GetMsg(remsg, ccg));
 }
Beispiel #2
0
        /// <summary>
        /// 自定义菜单
        /// </summary>
        /// <param name="httpRequest"></param>
        /// <param name="msg"></param>
        public static void ResponseClickEvent(HttpResponseBase Response, MsgModel msg, ResultCryptography ccg)
        {
            msg.TextModel = new TextModel()
            {
                Content = "推荐注册啦!复制此链接发送给好友,点击链接填写内容即可完成注册!:http://jifenweixin.shinho.net.cn/RegistMember/NewCreate?TuiJianId=" + msg.FromUserName
            };
            var remsg = XmlHelpler.GetTextXml(msg);

            Response.Write(GetMsg(remsg, ccg));
        }
Beispiel #3
0
        /// <summary>
        /// 被动请求,接收语音Recongnition
        /// </summary>
        /// <param name="httpRequest"></param>
        /// <param name="msg"></param>
        public static void ResponseRecevieRecongnitionAudio(HttpResponseBase Response, MsgModel msg, ResultCryptography ccg)
        {
            msg.TextModel = new TextModel()
            {
                Content = "您好,开户语音识别消息已收到,这是自动回复"
            };
            var remsg = XmlHelpler.GetTextXml(msg);

            Response.Write(GetMsg(remsg, ccg));
        }
Beispiel #4
0
        /// <summary>
        /// 被动请求,接收文本消息
        /// </summary>
        /// <param name="httpRequest"></param>
        /// <param name="msg"></param>
        public static void ResponseRecevieText(HttpResponseBase Response, MsgModel msg, ResultCryptography ccg)
        {
            //var usr = wx.GetWeiXinUser();
            msg.MsgType = "text";
            var textResponse = new TextModel()
            {
                Content = "您好,你的消息已收到,这是自动回复"
            };

            if (msg.TextModel.Content != null)
            {
                if (msg.TextModel.Content == "我是欣和人")
                {
                    textResponse.Content = "欣和人的注册地址是:" + ConfigurationManager.AppSettings["RegistSalemanUrl"];
                }
                else if (msg.TextModel.Content == "积分" || msg.TextModel.Content == "积分产品")
                {
                    textResponse.Content = "您可以点击菜单【积分活动】-【积分规则】查询哦~";
                }
                else if (msg.TextModel.Content == "打开首页")
                {
                    textResponse.Content = ConfigurationManager.AppSettings["WeiXinDomain"];
                }
                else if (msg.TextModel.Content.Contains("推荐码") || msg.TextModel.Content.Contains("邀请码") || msg.TextModel.Content.Contains("注册") || msg.TextModel.Content.Contains("认证"))
                {
                    textResponse.Content = "您好,当前不需要注册码也可以注册平台会员享受会员权益哦~☺ 点击此链接注册http://jifenweixin.shinho.net.cn/#/component/register如果您需要参与扫描积分活动仍需要欣和酒店业务代表认证身份哦,仅限于酒店终端用户参加🌹,后期我们将开放平台自动认证功能,请静候佳音~";
                }
                else if (msg.TextModel.Content == "味达美")
                {
                    textResponse.Content = "1、请问您是怎么理解EC的?\r\n2、看到味达美您会联想到什么\r\n3、味达美臻品蚝油的卖点是什么?\r\n4、味达美明年山东规划的主打产品有哪些?";
                }
                //else if (msg.TextModel.Content == "乐爽泉城")
                //{
                //    textResponse.Content = "乐爽泉城报名地址:" + ConfigurationManager.AppSettings["RegistActivityUrl"];
                //}
                //else if (msg.TextModel.Content == "我要推荐")
                //{
                //    textResponse.Content = "注册地址:http://jifenweixin.shinho.net.cn/RegistMember/NewCreate?TuiJianId=" + msg.FromUserName;  //+ usr.UserId.ToString();
                //}
                //else if (msg.TextModel.Content == "我是经销商")
                //{
                //    textResponse.Content = "注册地址:http://jifenweixin.shinho.net.cn/RegistMember/DealerCreate";
                //}
            }
            msg.TextModel = textResponse;
            var result = XmlHelpler.GetTextXml(msg);

            Response.Write(GetMsg(result, ccg));
        }
Beispiel #5
0
        public static void ResponseRecomendClickEvent(HttpResponseBase Response, MsgModel msg, ResultCryptography ccg)
        {
            string remsg  = string.Empty;
            string openid = msg.FromUserName;

            //调用积分url
            //string ret = ConfigurationManager.AppSettings["TuiJianUrl"] + memberId.ToString();
            string ret = "";

            msg.TextModel = new TextModel()
            {
                Content = ret
            };
            remsg = XmlHelpler.GetTextXml(msg);
            Response.Write(GetMsg(remsg, ccg));
        }
Beispiel #6
0
        /// <summary>
        /// 扫一扫
        /// </summary>
        public static void ResponseAdvClickEvent(HttpResponseBase Response, MsgModel msg, ResultCryptography ccg)
        {
            string remsg  = string.Empty;
            string openid = msg.FromUserName;
            //LogHelper.WriteLog("lalal" + ConfigurationManager.AppSettings["ScanCodeInfoUrl"] + "?url=" + System.Web.HttpUtility.UrlEncode(msg.EventModel.ClickEventModel.ScanResult) + "&openid=" + openid);
            //调用积分url
            string ret = BasicApi.RequestCreate(ConfigurationManager.AppSettings["ScanCodeInfoUrl"] + "?url=" + System.Web.HttpUtility.UrlEncode(msg.EventModel.ClickEventModel.ScanResult) + "&openid=" + openid);

            //LogHelper.WriteLog(ConfigurationManager.AppSettings["ScanCodeInfoUrl"]);

            msg.TextModel = new TextModel()
            {
                Content = ret
            };
            remsg = XmlHelpler.GetTextXml(msg);
            Response.Write(GetMsg(remsg, ccg));
        }