Пример #1
0
 /********************   下面的代码仅仅是测试用了,实际并不需要 ********************/
 private static RepMusicMessage SimulateMusicMessage(ReceiveMessage msg)
 {
     //音乐响应
     var r = msg.GetMusicResponse();
     r.Data = new MusicMsgData
     {
         Description = "说明信息",
         Title = "听首歌吧",
         MusicUrl = WebConfigurationManager.AppSettings["music"],
         HQMusicUrl = WebConfigurationManager.AppSettings["hqmusic"]
     };
     return r;
 }
Пример #2
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;
 }
Пример #3
0
 public void OnAfterMessage(ReceiveMessage msg, ResponseMessage repMsg)
 {
     //LogHelper.Log(msg.ToString(), repMsg.ToString());
 }