Skip to content

Commit

Permalink
updated README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
calidion committed Mar 3, 2016
1 parent c5df47f commit adda9ac
Showing 1 changed file with 16 additions and 7 deletions.
23 changes: 16 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# node-weixin-router [![NPM version][npm-image]][npm-url] [![Build Status][travis-image]][travis-url] [![Dependency Status][daviddm-image]][daviddm-url] [![Coverage percentage][coveralls-image]][coveralls-url]
> node weixin router for specified requests
负责路由注册,分发以及事件的回调
负责路由分发和api事件的回调与注册

## Installation

Expand All @@ -17,14 +17,23 @@ var express = require('express');

var router = express.Router;

//
nodeWeixinRouter.onCreate(function () {


//侦听订单创建
//需要调用next方法回到后继续操作中
nodeWeixinRouter.onOrderCreate(function (req, res, next) {
});
//
nodeWeixinRouter.onNotify(function () {
//侦听订单通知
//data是返回数据的json格式
nodeWeixinRouter.onOrderNotify(function (error, data) {
});
//
nodeWeixinRouter.onOauth(function () {
//侦听Oauth成功返回
//需要通过res返回页面信息
nodeWeixinRouter.onOauthSuccess(function (req, res, weixin) {
});
//侦听OAuth访问处理
//用于记录OAuth的用户信息,比如refer
nodeWeixinRouter.onOauthAccess(function (req, res) {
});
//
nodeWeixinRouter.init(router);
Expand Down

0 comments on commit adda9ac

Please sign in to comment.