@bluenest/wx-jssdk
TypeScript icon, indicating that this package has built-in type declarations

0.1.0 • Public • Published

wx-jssdk

微信h5开发工具库集合

createWxJssdk

基于wx-jssdk-ts微信公众平台SDK

  • [x] updateAppMessageShareData
  • [x] updateTimelineShareData
  • [x] scanQRCode
// wxJssdk.ts
import { createWxJssdk } from "@bluenest/wx-jssdk";

const wxJssdk = createWxJssdk({
  config: async (current) => {
    // your getConfig method
    const config = await getConfig();
    return config;
  },
});

export default wxJssdk;

// how to use
wxJssdk.updateAppMessageShareData(options)
wxJssdk.updateTimelineShareData(options)

createWxOauth

微信网页开发 /网页授权

// wxOauth.ts
import { createWxOauth } from "@bluenest/wx-jssdk";

const wxOauth = createWxOauth({
  appId: "YOUR_APPID",
  scope: "snsapi_userinfo",
  accessToken: async (code) => {
    // your accessToken method
    const { data } = await accessToken(options);
    // handle openId/unionId/userInfo
  },
});

export default wxOauth;

// how to use
wxOauth.oauth()

ShareGuide组件

微信h5引导分享组件

  • [x] 组件
  • [x] 测试用例

Readme

Keywords

none

Package Sidebar

Install

npm i @bluenest/wx-jssdk

Weekly Downloads

0

Version

0.1.0

License

none

Unpacked Size

200 kB

Total Files

14

Last publish

Collaborators

  • ntla123