exports.tpl = function(content, message) {
var info = {}
var type = 'text'
var fromUserName = message.ToUserName //注意这里,ToUserName和
var toUserName = message.FromUserName //FromUserName对调一下
if (Array.isArray(content)) {
type = 'news'
}
if (!content) {
content = 'Empty news.'
}
type = content.type || type
info.content = content
info.createTime = new Date().getTime()
info.msgType = type
info.fromUserName = fromUserName
info.toUserName = toUserName
return tpl.compiled(info)
}