Ejemplo n.º 1
0
        public static string DoClick(PubRecEventClick instanse)
        {
            string strResult = string.Empty;

            if ("31".Equals(instanse.EventKey))
            {
                try
                {
                    PubResMsgText msg  = new PubResMsgText();
                    string        flag = HTTPHelper.GetRequest(logoutURL + "?openid=" + instanse.FromUserName);
                    if (bool.Parse(flag))
                    {
                        msg.Content      = "解除绑定成功!";
                        msg.CreateTime   = instanse.CreateTime;
                        msg.FromUserName = instanse.ToUserName;
                        msg.ToUserName   = instanse.FromUserName;
                        strResult        = pubCore.AutoResponse(msg);
                    }
                }
                catch (Exception e)
                {
                    log.Error("PubWeChatSta DoClick Logout Err:", e);
                }
            }
            else
            {
                PubResMsgText msg = new PubResMsgText();
                msg.Content      = "功能正在开发,敬请期待!";
                msg.CreateTime   = instanse.CreateTime;
                msg.FromUserName = instanse.ToUserName;
                msg.ToUserName   = instanse.FromUserName;
                strResult        = pubCore.AutoResponse(msg);
            }
            return(strResult);
        }
Ejemplo n.º 2
0
        public static string DoMsgText(PubRecMsgText instanse)
        {
            PubResMsgText msg       = new PubResMsgText();
            string        strResult = string.Empty;

            if ("createmenu".Equals(instanse.Content.ToLower()))
            {
                CreateMenu();
            }

            //log.Info("DoMsgText");
            return(strResult);
        }
Ejemplo n.º 3
0
        public static string DoMsgText(PubRecMsgText instanse)
        {
            if ("createmenu".Equals(instanse.Content.ToLower()))
            {
                CreateMenu();
            }

            if ("kf".Equals(instanse.Content.ToLower()))
            {
                return(pubCore.TransferCustomerService(instanse));
            }
            if ("zdhf".Equals(instanse.Content.ToLower()))
            {
                PubResMsgText msg = new PubResMsgText(instanse);
                msg.Content = "开发中,敬请期待!";
                return(pubCore.AutoResponse(msg));
            }
            return("");
        }
Ejemplo n.º 4
0
        public static string DoClick(PubRecEventClick instanse)
        {
            string strResult = string.Empty;

            if ("32".Equals(instanse.EventKey))
            {
                return(pubCore.TransferCustomerService(instanse));
            }
            else if ("31".Equals(instanse.EventKey))
            {
                try
                {
                    PubResMsgText msg  = new PubResMsgText();
                    string        flag = HTTPHelper.GetRequest(logoutURL + "?openid=" + instanse.FromUserName);
                    if (bool.Parse(flag))
                    {
                        msg.Content      = "解除绑定成功!";
                        msg.CreateTime   = instanse.CreateTime;
                        msg.FromUserName = instanse.ToUserName;
                        msg.ToUserName   = instanse.FromUserName;
                        strResult        = pubCore.AutoResponse(msg);
                    }
                }
                catch (Exception e)
                {
                    log.Error("PubWeChatSues DoClick Logout Err:", e);
                }
            }
            else
            {
                //PubResMsgText msg = new PubResMsgText();
                //msg.Content = "开发中,敬请期待!";
                //msg.CreateTime = instanse.CreateTime;
                //msg.FromUserName = instanse.ToUserName;
                //msg.ToUserName = instanse.FromUserName;
                //strResult = pubCore.AutoResponse(msg);
                PubSendMsgText msg = new PubSendMsgText("开发中,敬请期待!", instanse.FromUserName);
                pubCore.SendMsg(msg);
                return("success");
            }
            return(strResult);
        }