diff --git a/lib/api_common.js b/lib/api_common.js index c16c616b..f49fe7c2 100644 --- a/lib/api_common.js +++ b/lib/api_common.js @@ -32,6 +32,10 @@ AccessToken.prototype.isValid = function () { * 1. 调用用户传入的获取token的异步方法,获得token之后使用 * 2. 使用appid/appsecret获取token。并调用用户传入的保存token方法保存 * + * Tips: + * + * - 如果跨机器运行wechat模块,需要注意同步机器之间的系统时间。 + * * Examples: * ``` * var API = require('wechat').API; diff --git a/lib/oauth.js b/lib/oauth.js index 08a82c42..5cf36525 100644 --- a/lib/oauth.js +++ b/lib/oauth.js @@ -107,11 +107,13 @@ OAuth.prototype.getAuthorizeURL = function (redirect, state, scope) { * Result: * ``` * { - * "access_token": "ACCESS_TOKEN", - * "expires_in": 7200, - * "refresh_token": "REFRESH_TOKEN", - * "openid": "OPENID", - * "scope": "SCOPE" + * data: { + * "access_token": "ACCESS_TOKEN", + * "expires_in": 7200, + * "refresh_token": "REFRESH_TOKEN", + * "openid": "OPENID", + * "scope": "SCOPE" + * } * } * ``` * @param {String} code 授权获取到的code @@ -146,11 +148,13 @@ OAuth.prototype.getAccessToken = function (code, callback) { * Result: * ``` * { - * "access_token": "ACCESS_TOKEN", - * "expires_in": 7200, - * "refresh_token": "REFRESH_TOKEN", - * "openid": "OPENID", - * "scope": "SCOPE" + * data: { + * "access_token": "ACCESS_TOKEN", + * "expires_in": 7200, + * "refresh_token": "REFRESH_TOKEN", + * "openid": "OPENID", + * "scope": "SCOPE" + * } * } * ``` * @param {Function} callback 回调函数