Miss any of our Open RFC calls?Watch the recordings here! »

@cycjimmy/weixin-jssdk

2.1.0 • Public • Published

Weixin Jssdk

NPM version build status David deps devDependencies Status npm download npm license

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.

Install

npm i @cycjimmy/weixin-jssdk

DownloadsWeekly Downloads

1

Version

2.1.0

License

MIT

Unpacked Size

18.5 kB

Total Files

14

Last publish

Collaborators

  • avatar