ytx-wechat-crm
v1.1.1
Published
微信公众号和CRM IM通讯模块
Downloads
14
Readme
wechat-crm
微信公众平台-CRM IM通讯模块
##Installation npm install git+ssh://[email protected]:linjingxin/wechat-crm.git
##Build npm run build
##Use 基础配置 需要依赖mq,wechat配置 var Message = require('wechat-crm'); var WechatAPI = require('wechat-api'); //need version 1.7.1
var config = { mq:{ rabbitmq: { host: '192.168.19.141', port: 5672, login: 'admin', password: 'qpwoeiruty', vhost: 'crm_ng' }, rabbitqueue: 'crm.chat.message.dispatcher.out.tt.zp_wechat', exchange: 'crm.chat.message.acceptor', routing: '#', noDeclare: false }, wechat:{ appid:"wx294011eb8fdc98f9", secret:"7a5023ed7b95c077267d667cbce54cab" } }
wechatapi = new WechatAPI(config.wechat.appid,config.wechat.secret);
message = new Message(config,wechatapi);
开始监听消息,收到消息后会调用wechat-api接口发送消息给用户 message.start(); 推送微信消息给IM message.publish(info)