예제 #1
0
        /// <summary>
        /// 取消绑定
        /// </summary>
        /// <param name="data"></param>
        /// <returns></returns>
        private string ClickQXBD(WeChatData data)
        {
            if (!CheckIsBind(data.FromUserName))
            {
                return data.ToQuicklyReplayWeChatData("您还没有绑定平台账号!");
            }

            var msg = new WeChatData();
            msg.CreateTime = DateTime.Now.ToFileTime().ToString();
            msg.ToUserName = data.FromUserName;
            msg.FromUserName = data.ToUserName;
            msg.MsgType = "text";
            if (UnBind(data.FromUserName))
            {
                msg.Content = "取消绑定成功!";
            }
            else
            {
                msg.Content = "取消绑定失败!";
            }
            return msg.ToXml();
        }
예제 #2
0
        public string Excute(WeChatConfig config, WeChatData data)
        {
            if (!ModelFacade.WeChat.WeChatModel.CheckIsBind(data.FromUserName))
            {
                return data.ToQuicklyReplayWeChatData("您还没有绑定魔方账号,请您先绑定账号!");
            }

            var msg = new WeChatData();
            msg.CreateTime = DateTime.Now.ToFileTime().ToString();
            msg.ToUserName = data.FromUserName;
            msg.FromUserName = data.ToUserName;
            msg.MsgType = "text";
            if (ModelFacade.WeChat.WeChatModel.UnBind(data.FromUserName))
            {
                msg.Content = "取消绑定成功!";
            }
            else
            {
                msg.Content = "取消绑定失败!";
            }
            return msg.ToXml();
        }