TypeError: Cannot read property 'MsgType' of undefined
at Object.exports.reply (/Users/admin/360/work/developer/scott/weixin.js:6:16)
------------------------
exports.reply = function*(next) {
var message = this.weixin
if (message.MsgType === 'event') {
if (message.Event === 'subscribe') {
if (message.EventKey) {
console.log('扫描二维码' + message.EventKey + ' ' + message.ticket)
}
this.body = '你订阅了公众号'
} else if (message.Event === 'unsubscribe') {
console.log('取消关注')
this.body = ''
}
yield next
}