0.8.4 • Published 1 year ago

libwx v0.8.4

Weekly downloads
48
License
MIT
Repository
github
Last release
1 year ago

libwx

NodeJs端微信SDK

Installation

npm i libwx

Usage

import { Weixin } from 'libwx';

const wx = new Weixin({
  type: 'h5',
  appid: '',
  secret: '',
  mch_id: '',
  pay_key: '',
  // xxxx
});

let accessToken = await wx.getAccessToken(code);

API

  • setOptions(config) 设置
  • getGlobalToken() 获取公众平台全局Token
  • getTicket() 获取公众平台JSSDK ticket
  • getJsConfig(options) 获取JSSDK配置
  • getAccessToken(code) 微信登录后将用户的code转化为access_token
  • getAuthInfo(openid, accessToken) 获取网页授权用户信息,小程序平台不可用
  • getUserInfo(openid) 获取微信关注者的用户信息
  • downloadMedia(media_id) 从微信服务器上下载媒体文件
  • orderquery(orderId) 查询订单信息
  • unifiedorder(data) 统一下单
  • createPayReq(data) 创建支付参数

Contribute

Maichong Software

Liang Xingchen

License

This project is licensed under the terms of the MIT license

0.8.4

1 year ago

0.8.3

1 year ago

0.8.1

2 years ago

0.8.2

2 years ago

0.8.0

3 years ago

0.7.4

3 years ago

0.7.3

3 years ago

0.7.2

3 years ago

0.7.1

3 years ago

0.7.0

3 years ago

0.6.1

4 years ago

0.6.0

4 years ago

0.5.1

4 years ago

0.5.0

4 years ago

0.4.2

5 years ago

0.4.1

5 years ago

0.4.0

5 years ago

0.3.1

5 years ago

0.3.0

5 years ago

0.2.1

5 years ago

0.2.0

5 years ago

0.1.6

8 years ago

0.1.5

8 years ago

0.1.4

8 years ago

0.1.3

8 years ago

0.1.2

8 years ago

0.1.1

8 years ago

0.1.0

8 years ago