// wxapp.js WxApp.prototype.reply=function(){ console.log('reply this.body:',this.body);// undefined console.log('\n'); let content=this.body; let message=this.wxMsg; let xml=util.tpl(content,message); //... }
g.js
wechat.reply.call(this);
util.js
exports.tpl=function(content,message){ console.log('contet:',content); //... type=content.type||type; // 报错 //... }