Exemplo n.º 1
0
 private ResponseMessageNews Approval_PaymentRequest_News(DBEntity.User u, string fromUserName)
 {
     ResponseMessageNews news = new ResponseMessageNews();
     Article art = new Article();
     //art.Description = "您有" + _praSvc.GetPaymentRequestApprovalsByName(u.LoginName).Count + "个要审批的付款申请,点击进入审批列表";
     art.Title = "上海益润微信公众号审批中心 - 待审付款申请";
     art.PicUrl = "http://180.169.11.53/senlan2.weixin/images/approval.jpg";
     art.Url = "http://180.169.11.53/senlan2.weixin/pages/approval_paymentrequest.html?openid=" + fromUserName;
     news.Articles.Add(art);
     return news;
 }
Exemplo n.º 2
0
        /// <summary>
        /// 菜单事件处理
        /// </summary>
        /// <param name="requestMessage"></param>
        /// <returns></returns>
        public override IResponseMessageBase OnEvent_ClickRequest(RequestMessageEvent_Click requestMessage)
        {
            IResponseMessageBase reponseMessage = null;

            //菜单点击,需要跟创建菜单时的Key匹配
            //JULONG.CAFTS.Weixin.Models.WxDBContext db = new Models.WxDBContext();
            //WeixinArtcle wa = db.WeixinArtcle.FirstOrDefault(d => d.Name == requestMessage.EventKey);

            //var responseMessage = this.CreateResponseMessage<ResponseMessageText>();
            if (requestMessage.EventKey == "QR")
            {
                var accessToken = AccessTokenContainer.TryGetToken(WeixinConfig.AppId, WeixinConfig.AppSecret);
                List <Senparc.Weixin.MP.Entities.Article> lst     = new List <Senparc.Weixin.MP.Entities.Article>();
                Senparc.Weixin.MP.Entities.Article        article = new Senparc.Weixin.MP.Entities.Article()
                {
                    Title       = "我们的二维码 !",
                    PicUrl      = "http://weixin.afc-t.com/content/imgs/qr.gif",
                    Description = "",
                    Url         = "http://weixin.afc-t.com/content/imgs/qr.gif"
                };
                lst.Add(article);
                //debug.print("SendNews", requestMessage.FromUserName);
                Senparc.Weixin.MP.AdvancedAPIs.Custom.CustomApi.SendNews(accessToken, requestMessage.FromUserName, lst);
            }
            else
            {
                using (WxDBContext db = new WxDBContext())
                {
                    var msg = db.WeixinArtcle.FirstOrDefault(d => d.Name == requestMessage.EventKey);
                    if (msg != null)
                    {
                        var            accessToken = AccessTokenContainer.TryGetToken(WeixinConfig.AppId, WeixinConfig.AppSecret);
                        List <Article> arts        = new List <Article>();
                        arts.Add(ArticleHelper.StringToArticle(msg.Description));
                        Senparc.Weixin.MP.AdvancedAPIs.Custom.CustomApi.SendNews(accessToken, requestMessage.FromUserName, arts, 5000);
                    }
                }
            }



            return(reponseMessage);
        }
        public override IResponseMessageBase OnEvent_ClickRequest(RequestMessageEvent_Click requestMessage)
        {
            IResponseMessageBase reponseMessage = null;
            switch (requestMessage.EventKey)
            {
                case "BeginOrderClick":
                    {
                        var strongResponseMessage = CreateResponseMessage<ResponseMessageNews>();
                        strongResponseMessage.Articles.Add(new Article
                        {
                            Title = "开始预定",
                            Description = "通过微信预订点餐",
                            PicUrl = ImgUrl + "wxbeginorder.jpg",
                            Url = string.Format(Constants.HostDomain + "/order/begin/" + Constants.CompanyId + "/{0}?type=Quick", requestMessage.FromUserName)
                        });
                        reponseMessage = strongResponseMessage;
                    }
                    break;
                case "ActivityClick":
                    {
                        var strongResponseMessage = CreateResponseMessage<ResponseMessageNews>();
                        string picUrl = Constants.HostDomain + "/NewContent/images/w.png";
                        string uid = "";

                        try
                        {
                            CrmMemberModel model = new CrmMemberModel();
                            uid = model.getCrmMemberListInfoData(requestMessage.FromUserName).FirstOrDefault().Uid;
                            var prepayAccount = model.GetPrepayAccount(uid);
                            if (prepayAccount != null && prepayAccount.AccountMoney > 0)
                            {
                                picUrl = Constants.HostDomain + "/NewContent/images/chu.png";
                            }
                        }
                        catch (Exception ex)
                        {
                            LogException(ex);
                            uid = ex.StackTrace;
                        }
                        Article article = new Article();

                        article.Title = "小场合活动·微观时代";
                        article.Description = "小场合活动·微观时代";
                        article.PicUrl = picUrl;
                        article.Url = string.Format(Constants.HostDomain + "/Jump/To?fromUserName={0}&url=/Activity/Index?activityState=1", requestMessage.FromUserName);

                        strongResponseMessage.Articles.Add(article);

                        reponseMessage = strongResponseMessage;
                    }
                    break;
                case "AccountInfoClick":
                    {
                        var strongResponseMessage = CreateResponseMessage<ResponseMessageNews>();
                        string uid = string.Empty;
                        string picUrl = Constants.HostDomain + "/NewContent/images/w.png"; ;
                        try
                        {
                            CrmMemberModel model = new CrmMemberModel();
                            uid = model.getCrmMemberListInfoData(requestMessage.FromUserName).FirstOrDefault().Uid;
                            var prepayAccount = model.GetPrepayAccount(uid);
                            if (prepayAccount != null && prepayAccount.AccountMoney > 0)
                            {
                                picUrl = Constants.HostDomain + "/NewContent/images/chu.png";
                            }
                        }
                        catch (Exception ex)
                        {
                            LogException(ex);
                            uid = ex.StackTrace;
                        }
                        strongResponseMessage.Articles.Add(new Article
                        {
                            Title = "会员信息",
                            Description = "您的会员号:" + uid,
                            PicUrl = picUrl,
                            Url = string.Format(Constants.HostDomain + "/Member/Info/" + Constants.CompanyId + "/{0}", requestMessage.FromUserName)
                        });
                        reponseMessage = strongResponseMessage;
                    }
                    break;
                case "VipPay":
                    {
                        string picUrl = Constants.HostDomain + "/NewContent/images/w.png";
                        string uid = "";

                        try
                        {
                            CrmMemberModel model = new CrmMemberModel();
                            uid = model.getCrmMemberListInfoData(requestMessage.FromUserName).FirstOrDefault().Uid;
                            var prepayAccount = model.GetPrepayAccount(uid);
                            if (prepayAccount != null && prepayAccount.AccountMoney > 0)
                            {
                                picUrl = Constants.HostDomain + "/NewContent/images/chu.png";
                            }
                        }
                        catch (Exception ex)
                        {
                            LogException(ex);
                        }
                        var strongResponseMessage = CreateResponseMessage<ResponseMessageNews>();

                        DateTime dt = DateTime.Now.AddMinutes(-15);
                        PrepayRecord rec = new PrepayRecordModel().GetUserLastUnPaidComsumingPrepayRecordWithin5Minutes(requestMessage.FromUserName);
                        string description = string.Empty;
                        string title = string.Empty;
                        string url = "";

                        if (rec != null)
                        {
                            title = "支付确认";
                            description = "您本次的消费:现金¥" + (0 - rec.PrepayMoney.Value).ToString() +
                                 "/赠送¥" + (0 - rec.PresentMoney.Value).ToString() +
                                 (rec.PayByScore > 0 ? "/积分" + rec.PayByScore.ToString() : "") +
                                 (rec.DiscountlMoeny > 0 ? ",本次优惠:" + rec.DiscountlMoeny.ToString() : "") +
                                  ",账单时间:" + rec.PrepayDate.Value.ToString("yyyy-MM-dd HH:mm:ss") + ",点击本条消息,完成支付!";
                            url = string.Format(Constants.HostDomain + "/pay/payview/?id={0}&value={1}", requestMessage.FromUserName, rec.RecordId + "|" + DateTime.Now.Ticks);

                            strongResponseMessage.Articles.Add(new Article
                            {
                                Title = title,
                                Description = description,
                                PicUrl = picUrl,
                                Url = url
                            });
                            reponseMessage = strongResponseMessage;
                        }
                        else
                        {
                            description = "未查询到未结账单,可能原因为:\n1.您没有未结账单。\n2.您的账单还未生成。\n3.为保护您账号安全,您的生成的账单已经超期!";

                            var result = CreateResponseMessage<ResponseMessageText>();
                            result.Content = description;

                            reponseMessage = result;
                        }
                    }
                    break;
                case "MyOrder"://我的订单
                    {
                        var strongResponseMessage = CreateResponseMessage<ResponseMessageNews>();
                        string picUrl = Constants.HostDomain + "/NewContent/images/w.png";
                        string uid = "";

                        try
                        {
                            CrmMemberModel model = new CrmMemberModel();
                            uid = model.getCrmMemberListInfoData(requestMessage.FromUserName).FirstOrDefault().Uid;
                            var prepayAccount = model.GetPrepayAccount(uid);
                            if (prepayAccount != null && prepayAccount.AccountMoney > 0)
                            {
                                picUrl = Constants.HostDomain + "/NewContent/images/chu.png";
                            }
                        }
                        catch (Exception ex)
                        {
                            LogException(ex);
                            uid = ex.StackTrace;
                        }

                        strongResponseMessage.Articles.Add(new Article
                        {
                            Title = "我的订单",
                            Description = "我的订单:",
                            PicUrl = picUrl,
                            Url = string.Format(Constants.HostDomain + "/NewOrder/My/" + Constants.CompanyId + "/{0}", requestMessage.FromUserName)
                        });
                        reponseMessage = strongResponseMessage;
                    }
                    break;
                case "CompanyInfo"://成都印象餐饮有限公司
                    {
                        //TODO
                    }
                    break;
                case "Xiaochanghe"://成都印象小场合
                    {
                        //TODO
                    }
                    break;
                case "Culture"://小场合文化
                    {
                        //TODO
                    }
                    break;
                default:
                    {
                        var strongResponseMessage = CreateResponseMessage<ResponseMessageText>();
                        strongResponseMessage.Content = "您点击了按钮,EventKey:" + requestMessage.EventKey;
                        reponseMessage = strongResponseMessage;
                    }
                    break;
            }

            return reponseMessage;
        }
Exemplo n.º 4
0
        /// <summary>
        /// 从数据库里取图文类型的值
        /// </summary>
        /// <param name="wid">微帐号主键id</param>
        /// <param name="Indexid"></param>
        /// <param name="openid"></param>
        /// <param name="token"></param>
        /// <returns></returns>
        public List<Article> getDataPicTxtComm(int wid, int Indexid, string openid, string token)
        {
            List<Article> retlist = new List<Article>();
            string website = MyCommFun.getWebSite();

            IList<Model.wx_requestRuleContent> twList = rcBll.GetTuWenContent(Indexid);

            Article article = new Article();
            for (int i = 0; i < twList.Count(); i++)
            {
                article = new Article();
                article.Title = ProcTitle(twList[i].rContent, openid);
                article.Description = twList[i].rContent2;
                article.Url = getWXApiUrl(twList[i].detailUrl, token, openid) + rcBll.cardnoStr(wid, openid) + getWxUrl_suffix();
                if (twList[i].picUrl == null || twList[i].picUrl.ToString().Trim() == "")
                {
                    article.PicUrl = "";
                }
                else
                {
                    if (twList[i].picUrl.Contains("http://"))
                    {
                        article.PicUrl = twList[i].picUrl;

                    }
                    else
                    {
                        article.PicUrl = website + twList[i].picUrl;
                    }
                }
                retlist.Add(article);
            }

            return retlist;
        }
Exemplo n.º 5
0
        /// <summary>
        /// 模块功能回复【请求为‘事件’类型】
        /// </summary>
        /// <param name="requestMessage"></param>
        /// <param name="modelFunctionName"></param>
        /// <param name="modelFunctionId"></param>
        /// <param name="apiid"></param>
        /// <returns></returns>
        public IResponseMessageBase GetModuleResponse(RequestMessageEventBase requestMessage, string modelFunctionName, int modelFunctionId, int apiid)
        {
            string openid = requestMessage.FromUserName;
            string token = ConvertDateTimeInt(DateTime.Now).ToString();

            IList<Model.ResponseContentEntity> responselist = new List<Model.ResponseContentEntity>();

               responselist= PanDuanMoudle( modelFunctionName,  modelFunctionId, openid,  apiid);
               if (responselist == null || responselist.Count <= 0)
               {
               var responseMessage = ResponseMessageBase.CreateFromRequestMessage<ResponseMessageText>(requestMessage);
               responseMessage.Content = "【" + modelFunctionName + "】功能模块未获得到数据";
               return responseMessage;
               }

               Model.ReponseContentType responseType = responselist[0].rcType;

               if (responseType == Model.ReponseContentType.text)
            {
                var responseMessage = ResponseMessageBase.CreateFromRequestMessage<ResponseMessageText>(requestMessage);

                responseMessage.Content = responselist[0].rContent.ToString();
                return responseMessage;
            }
               else if (responseType == Model.ReponseContentType.txtpic)
            {
                  var responseMessage = ResponseMessageBase.CreateFromRequestMessage<ResponseMessageNews>(requestMessage);
                IList<Article> rArticlelist = new List<Article>();
                Article article = new Article();
                foreach (Model.ResponseContentEntity response in responselist)
                {
                    article = new Article();
                    article.Title = response.rContent;
                    article.Description = response.rContent2;
                    article.Url = getWXApiUrl(response.detailUrl, token, openid) + getWxUrl_suffix();
                    if (response.picUrl == null || response.picUrl.ToString().Trim() == "")
                    {
                        article.PicUrl = "";
                    }
                    else
                    {
                        if (!response.picUrl.Contains("http://"))
                        {
                            article.PicUrl = MyCommFun.getWebSite() + response.picUrl;
                        }
                        else
                        {
                            article.PicUrl = response.picUrl;
                        }
                    }
                    rArticlelist.Add(article);

                }
                responseMessage.Articles.AddRange(rArticlelist);
                return responseMessage;
            }
            else
            {
                return null;
            }
        }
        public override IResponseMessageBase OnEvent_ClickRequest(RequestMessageEvent_Click requestMessage)
        {
            IResponseMessageBase reponseMessage = null;
            //菜单点击,需要跟创建菜单时的Key匹配
            switch (requestMessage.EventKey)
            {
                case "OneClick":
                    {
                        //这个过程实际已经在OnTextOrEventRequest中完成,这里不会执行到。
                        var strongResponseMessage = CreateResponseMessage<ResponseMessageText>();
                        reponseMessage = strongResponseMessage;
                        strongResponseMessage.Content = "您点击了底部按钮。\r\n为了测试微信软件换行bug的应对措施,这里做了一个——\r\n换行";
                    }
                    break;
                case "SubClickRoot_Text":
                    {
                        var strongResponseMessage = CreateResponseMessage<ResponseMessageText>();
                        reponseMessage = strongResponseMessage;
                        strongResponseMessage.Content = "您点击了子菜单按钮。";
                    }
                    break;
                case "SubClickRoot_News":
                    {
                        var strongResponseMessage = CreateResponseMessage<ResponseMessageNews>();
                        reponseMessage = strongResponseMessage;
                        strongResponseMessage.Articles.Add(new Article()
                        {
                            Title = "您点击了子菜单图文按钮",
                            Description = "您点击了子菜单图文按钮,这是一条图文信息。",
                            PicUrl = "http://weixin.senparc.com/Images/qrcode.jpg",
                            Url = "http://weixin.senparc.com"
                        });
                    }
                    break;
                case "SubClickRoot_Music":
                    {
                        //上传缩略图
                        //var accessToken = CommonAPIs.AccessTokenContainer.TryGetAccessToken(appId, appSecret);
                        //var uploadResult = AdvancedAPIs.MediaApi.UploadTemporaryMedia(accessToken, UploadMediaFileType.thumb,
                        //                                             Server.GetMapPath("~/Images/Logo.jpg"));
                        ////设置音乐信息
                        //var strongResponseMessage = CreateResponseMessage<ResponseMessageMusic>();
                        //reponseMessage = strongResponseMessage;
                        //strongResponseMessage.Music.Title = "天籁之音";
                        //strongResponseMessage.Music.Description = "真的是天籁之音";
                        //strongResponseMessage.Music.MusicUrl = "http://weixin.senparc.com/Content/music1.mp3";
                        //strongResponseMessage.Music.HQMusicUrl = "http://weixin.senparc.com/Content/music1.mp3";
                        //strongResponseMessage.Music.ThumbMediaId = uploadResult.thumb_media_id;
                    }
                    break;
                case "SubClickRoot_Image":
                    {
                        //上传图片
                        //var accessToken = CommonAPIs.AccessTokenContainer.TryGetAccessToken(appId, appSecret);
                        //var uploadResult = AdvancedAPIs.MediaApi.UploadTemporaryMedia(accessToken, UploadMediaFileType.image,
                        //                                             Server.GetMapPath("~/Images/Logo.jpg"));
                        ////设置图片信息
                        //var strongResponseMessage = CreateResponseMessage<ResponseMessageImage>();
                        //reponseMessage = strongResponseMessage;
                        //strongResponseMessage.Image.MediaId = uploadResult.media_id;
                    }
                    break;
                case "SubClickRoot_Agent"://代理消息
                    {
                        //获取返回的XML
                        DateTime dt1 = DateTime.Now;
                        reponseMessage = MessageAgent.RequestResponseMessage(this, agentUrl, agentToken, RequestDocument.ToString());
                        //上面的方法也可以使用扩展方法:this.RequestResponseMessage(this,agentUrl, agentToken, RequestDocument.ToString());

                        DateTime dt2 = DateTime.Now;

                        if (reponseMessage is ResponseMessageNews)
                        {
                            (reponseMessage as ResponseMessageNews)
                                .Articles[0]
                                .Description += string.Format("\r\n\r\n代理过程总耗时:{0}毫秒", (dt2 - dt1).Milliseconds);
                        }
                    }
                    break;
                case "Member"://托管代理会员信息
                    {
                        //原始方法为:MessageAgent.RequestXml(this,agentUrl, agentToken, RequestDocument.ToString());//获取返回的XML
                        reponseMessage = this.RequestResponseMessage(agentUrl, agentToken, RequestDocument.ToString());
                    }
                    break;
                case "OAuth"://OAuth授权测试
                    {
                        var strongResponseMessage = CreateResponseMessage<ResponseMessageNews>();
                        strongResponseMessage.Articles.Add(new Article()
                        {
                            Title = "OAuth2.0测试",
                            Description = "点击【查看全文】进入授权页面。\r\n注意:此页面仅供测试(是专门的一个临时测试账号的授权,并非Senparc.Weixin.MP SDK官方账号,所以如果授权后出现错误页面数正常情况),测试号随时可能过期。请将此DEMO部署到您自己的服务器上,并使用自己的appid和secret。",
                            Url = "http://weixin.senparc.com/oauth2",
                            PicUrl = "http://weixin.senparc.com/Images/qrcode.jpg"
                        });
                        reponseMessage = strongResponseMessage;
                    }
                    break;
                case "Description":
                    {
                        var strongResponseMessage = CreateResponseMessage<ResponseMessageText>();
                        strongResponseMessage.Content = GetWelcomeInfo();
                        reponseMessage = strongResponseMessage;
                    }
                    break;
                case "SubClickRoot_PicPhotoOrAlbum":
                    {
                        var strongResponseMessage = CreateResponseMessage<ResponseMessageText>();
                        reponseMessage = strongResponseMessage;
                        strongResponseMessage.Content = "您点击了【微信拍照】按钮。系统将会弹出拍照或者相册发图。";
                    }
                    break;
                case "SubClickRoot_ScancodePush":
                    {
                        var strongResponseMessage = CreateResponseMessage<ResponseMessageText>();
                        reponseMessage = strongResponseMessage;
                        strongResponseMessage.Content = "您点击了【微信扫码】按钮。";
                    }
                    break;
                case "Click_Zan":
                    {
                        var strongResponse = CreateResponseMessage<ResponseMessageNews>();
                        strongResponse.Articles = new System.Collections.Generic.List<Article>();
                        Article a1 = new Article() { Title= "中国学术论文腐败全景图",Description= "在中国学术界,有一个奇怪的现象,即学术论文不是通过能力发表的",Url= "http://51science.cn/EKTodayArticle.aspx?articleID=5382",PicUrl= @"http://51science.cn/File/UploadFile/20151206111546910R275.jpg" };
                        Article a2 = new Article() { Title = @"国内十所排行“第一”的大学", Description = "国内十所排行“第一”的大学", Url = @"http://51science.cn/EKTodayArticle.aspx?articleID=5413", PicUrl = "http://51science.cn/File/UploadFile/20151209105901427R5947.jpg" };
                        strongResponse.Articles.Add(a1);strongResponse.Articles.Add(a2);
                        strongResponse.ArticleCount = 2;
                        //var strongResponseMessage = CreateResponseMessage<ResponseMessageText>();
                        //strongResponseMessage.Content = "您点击了按钮,EventKey:" + requestMessage.EventKey;
                        //strongResponseMessage.Content += " OPID:" + RequestMessage.FromUserName;
                        reponseMessage = strongResponse;
                    }
                    break;
                default:
                    {
                        var strongResponseMessage = CreateResponseMessage<ResponseMessageText>();
                        strongResponseMessage.Content = "您点击了按钮,EventKey:" + requestMessage.EventKey;
                        reponseMessage = strongResponseMessage;
                    }
                    break;
            }

            return reponseMessage;
        }
Exemplo n.º 7
0
        /// <summary>
        /// 推送多图文
        /// </summary>
        public IResponseMessageBase GetResponseMessageNews(RequestMessageEventBase requestMessage, int ruleId, int accountId)
        {
            var responseMessage = ResponseMessageBase.CreateFromRequestMessage<ResponseMessageNews>(requestMessage);
            string openid = requestMessage.FromUserName;
            string token = ConvertDateTimeInt(DateTime.Now).ToString();

            Article article;
            List<Article> artList = new List<Article>();
            IList<Model.weixin_request_content> twList = new BLL.weixin_request_content().GetModelList(10, ruleId, string.Empty);
            foreach (Model.weixin_request_content modelt in twList)
            {
                article = new Article();
                article.Title = modelt.title;
                article.Description = modelt.content;
                article.Url = GetWXApiUrl(modelt.link_url, token, openid);
                if (string.IsNullOrEmpty(modelt.img_url))
                {
                    article.PicUrl = string.Empty;
                }
                else
                {
                    if (modelt.img_url.Contains("http://"))
                    {
                        article.PicUrl = modelt.img_url;

                    }
                    else
                    {
                        //因为安装目录是以/开头,所以去掉,以免出现双斜杆
                        article.PicUrl = siteConfig.weburl + "/" + siteConfig.webpath.Replace("/", "") + modelt.img_url;
                    }
                }
                artList.Add(article);
            }

            string EventName = "";
            if (requestMessage.Event.ToString().Trim() != "")
            {
                EventName = requestMessage.Event.ToString();
            }
            else if (requestMessage.EventKey != null)
            {
                EventName += requestMessage.EventKey.ToString();
            }

            if (artList.Count == 0)
            {
                new BLL.weixin_response_content().Add(accountId, requestMessage.FromUserName, requestMessage.MsgType.ToString(), EventName, "txtpic", "-1", requestMessage.ToUserName);
            }
            else
            {
                new BLL.weixin_response_content().Add(accountId, requestMessage.FromUserName, requestMessage.MsgType.ToString(), EventName, "txtpic", "这次发了" + artList.Count + "条图文", requestMessage.ToUserName);
            }
            responseMessage.Articles.AddRange(artList);
            return responseMessage;
        }
Exemplo n.º 8
0
        private List<Article> ConstructArticles(List<Demand> demands)
        {
            List<Article> articles = new List<Article>();

            if (demands.Count > 7)
            {
                // Construct view more item
                var viewMore = new Article()
                {
                    Description = "查看更多需求信息",
                    PicUrl = "http://" + Witbird.SHTS.Web.Public.StaticUtility.Config.Domain + "/content/images/subscribed.jpg",
                    Title = "您有新的" + demands.Count + "条需求推荐信息,以下共显示7条。点击查看今日所有推荐",
                    Url = "http://" + Witbird.SHTS.Web.Public.StaticUtility.Config.Domain + "/wechat/subscribe/viewall/?ticks=" + DateTime.Today.Ticks.ToString()
                };

                articles.Add(viewMore);
            }
            else
            {
                // Construct view more item
                var viewMore = new Article()
                {
                    Description = "",
                    PicUrl = "http://" + Witbird.SHTS.Web.Public.StaticUtility.Config.Domain + "/content/images/subscribed.jpg",
                    Title = "您有新的" + demands.Count + "条需求推荐信息。点击查看今日所有推荐",
                    Url = "http://" + Witbird.SHTS.Web.Public.StaticUtility.Config.Domain + "/wechat/subscribe/viewall/?ticks=" + DateTime.Today.Ticks.ToString()
                };

                articles.Add(viewMore);
            }

            for (int i = 0; i < demands.Count; i++)
            {
                // The wechat articles limited to 8 item in total.
                if (i >= 7)
                {
                    break;
                }

                var demand = demands[i];

                var article = new Article()
                {
                    Description = demand.Description,
                    PicUrl = string.Empty,
                    Title = demand.Title,
                    Url = "http://" + Witbird.SHTS.Web.Public.StaticUtility.Config.Domain + "/wechat/demand/show/" + demand.Id + "?showwxpaytitle=1"
                };

                articles.Add(article);
            }

            return articles;
        }