1.1.1 • Published 8 years ago

ytx-wechat-crm v1.1.1

Weekly downloads
2
License
ISC
Repository
-
Last release
8 years ago

wechat-crm

微信公众平台-CRM IM通讯模块

##Installation npm install git+ssh://git@gitlab.baidao.com: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)