From 3941e6272eeee928564672919fbc697d48d2803b Mon Sep 17 00:00:00 2001 From: ifeiteng Date: Mon, 8 Dec 2014 21:02:42 -0800 Subject: [PATCH] fix reply music type's xml --- README.md | 11 +++++++---- lib/wechat.js | 1 + 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 6b017b64..3a54ea8a 100644 --- a/README.md +++ b/README.md @@ -55,7 +55,8 @@ app.use('/wechat', wechat('some token', function (req, res, next) { title: "来段音乐吧", description: "一无所有", musicUrl: "http://mp3.com/xx.mp3", - hqMusicUrl: "http://mp3.com/xx.mp3" + hqMusicUrl: "http://mp3.com/xx.mp3", + thumbMediaId: "thisThumbMediaId" } }); } else { @@ -105,8 +106,9 @@ res.reply({ res.reply({ type: "video", content: { - mediaId: 'mediaId', - thumbMediaId: 'thumbMediaId' + title: '来段视频吧', + description: '女神与高富帅', + mediaId: 'mediaId' } }); ``` @@ -116,7 +118,8 @@ res.reply({ title: "来段音乐吧", description: "一无所有", musicUrl: "http://mp3.com/xx.mp3", - hqMusicUrl: "http://mp3.com/xx.mp3" + hqMusicUrl: "http://mp3.com/xx.mp3", + thumbMediaId: "thisThumbMediaId" }); ``` #### 回复图文 diff --git a/lib/wechat.js b/lib/wechat.js index 45bed7b8..c3f89ba0 100644 --- a/lib/wechat.js +++ b/lib/wechat.js @@ -46,6 +46,7 @@ var tpl = ['', ']]>', ']]>', ']]>', + ']]>', '', '<% } else if (msgType === "voice") { %>', '',