37 Star 90 Fork 50

夏悸 / wechat For Node.js

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
defaultMsgHandler.js 963 Bytes
一键复制 编辑 原始数据 按行查看 历史
夏悸 提交于 2013-08-04 12:14 . 修改描述
/*
* 微信公众平台开发模式 Node.js SDK 1.0.0
* (c) 2012-2013 ____′↘夏悸 <wmails@126.cn>, MIT Licensed
* http://www.jeasyuicn.com/wechat
*
* 默认的消息处理器,可以直接修改本默认处理器,如果自定义请保证结构.
*/
/*
* 文字消息
*/
exports.textTypeMsg = function (outPut) {
outPut.text("这是文字消息");
};
/*
* 地理位置消息
*/
exports.locationTypeMsg = function (outPut) {
outPut.text("这是地理位置消息");
};
/*
* 链接消息
*/
exports.linkTypeMsg = function (outPut) {
outPut.text( "这是链接消息");
};
/*
* 图片消息
*/
exports.imageTypeMsg = function (outPut) {
outPut.text("这是图片消息");
};
/*
* 语音消息
*/
exports.voiceTypeMsg = function (outPut) {
outPut.text("这是语音消息");
};
/*
* 事件
*/
exports.eventTypeMsg = function (outPut) {
var event = this.Event;
//订阅
if (event == "subscribe") {
outPut.text("订阅成功!");
}
};
NodeJS
1
https://gitee.com/gson/wechat-for-node-js.git
git@gitee.com:gson/wechat-for-node-js.git
gson
wechat-for-node-js
wechat For Node.js
master

搜索帮助