Ejemplo n.º 1
0
    private static RepNewsMessage SimulateNewsMessage(ReceiveMessage msg)
    {
        //图文响应
        var r = msg.GetNewsResponse();

        r.Data = new NewsMsgData
        {
            //响应3条新闻信息
            Items = new List <NewsItem>
            {
                new NewsItem
                {
                    Description = "new1",
                    Title       = "老三发了",
                    PicUrl      = "http://blog.tecd.pw/wp-content/uploads/2013/09/cropped-Desert.jpg",
                    Url         = "http://blog.tecd.pw"
                },
                new NewsItem
                {
                    Description = "new2",
                    Title       = "老大亏了",
                    PicUrl      = "http://blog.tecd.pw/wp-content/uploads/2013/09/cropped-Desert.jpg",
                    Url         = "http://blog.tecd.pw"
                },
                new NewsItem
                {
                    Description = "new2",
                    Title       = "老二霉了",
                    PicUrl      = "http://blog.tecd.pw/wp-content/uploads/2013/09/cropped-Desert.jpg",
                    Url         = "http://blog.tecd.pw"
                }
            }
        };
        return(r);
    }