Ready to take your JavaScript development to the next level? Meet npm Enterprise - the ultimate in enterprise JavaScript. Learn more »

weixinjssdk

1.1.0 • Public • Published

Weixin Jssdk

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

Install

# via npm 
$ npm install weixinjssdk --save
 
# or via yarn 
$ yarn add weixinjssdk

Use

const WxJssdk = require('weixinjssdk');
 
let 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 weixinjssdk

Downloadsweekly downloads

1

version

1.1.0

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability