@cycjimmy/weixin-jssdk
v2.1.0
Published
weixin jssdk for node.js
Downloads
1
Readme
Weixin Jssdk
Install
# via npm
$ npm install @cycjimmy/weixin-jssdk --save
# or via yarn
$ yarn add @cycjimmy/weixin-jssdk
Use
const WxJssdk = require('@cycjimmy/weixin-jssdk');
const wxJssdk = new WxJssdk()
.setWxConfig({
appid: 'your appid',
secret: 'your secret',
})
[.setHook({
getAccessTokenSuccess: new Promise...,
getAccessTokenFromCustom: new Promise...,
})];
wxJssdk.wxshare({
url: 'whole url'
})
.then(data => {
// Do something
// ...
});
More
wxJssdk.setHook
: [Object] Set Hook Functions.getAccessTokenSuccess
: [Promise] Run Hook when get Access_Token success. Please resolve Access_Token.getAccessTokenFromCustom
: [Promise] Run custom task Before get Access_Token from wechat. Please resolve Access_Token.