Naughty Praying Mantis

    wechat-open

    1.8.8 • Public • Published

    wechat-open

    微信开放平台SDK 微信登录 补充微信登录其他接口

    Usage

    npm i wechat-open -S
    const {WechatLogin}= require('wechat-open')
    
    const wechat_login = new WechatLogin(AccessKeyId,AccessKeySecret)
    
    wechat_login.getAccessToken (code)    =>promise
    
    wechat_login.getUserInfo (accessToken, openId)   =>promise
    
    wechat_login.auth (access_token, openid)   =>promise
    
    wechat_login.refreshToken (refresh_token)   =>promise

    new WechatLogin(AccessKeyId,AccessKeySecret)

    • AccessKeyId <string> 必填,阿里云颁发给用户的访问服务所用的密钥ID。
    • AccessKeySecret <string> 必填,AccessKeySecret

    构造方法,传入配置对象。

    const {WechatLogin}= require('wechat-open')
    
    const wechat_login = new WechatLogin(AccessKeyId,AccessKeySecret)

    Install

    npm i wechat-open

    DownloadsWeekly Downloads

    5

    Version

    1.8.8

    License

    ISC

    Unpacked Size

    5.72 kB

    Total Files

    4

    Last publish

    Collaborators

    • liusai