1.1.6 • Published 6 years ago

wxconfig v1.1.6

Weekly downloads
4
License
MIT
Repository
github
Last release
6 years ago

wxconfig

one step config WeChat JS-SDK

HOW TO USE

1. import wxconfig

yarn add wxconfig

then

import wxconfig from 'wxconfig'

2. config & reRegist

const wxcInstance = wxconfig({
  authAPI: WX_GET_JS_API_SIGN,
  share: {
    dest: ['Timeline', 'AppMessage', 'QQ', 'Weibo', 'QZone'],
    title: 'share title',
    desc: 'share subtitle',
    link: location.href,
    imgUrl: '/share300x300.jpg',
    // success fn & cancle fn are optional
    success: () => {},
    cancle: () => {}
  },
  jsApiList: ['onMenuShareTimeline', 'orSomeOtherAPI']
})

// re-regist, for some reason you'll need it
wxcInstance.reRegist({
  title: 'another title',
  desc: 'another subtitle',
  link: location.href,
  imgUrl: '/anotherShare300x300.jpg'
})
1.1.6

6 years ago

1.1.4

6 years ago

1.1.2

6 years ago

1.1.0

6 years ago

1.0.8

6 years ago

1.0.6

6 years ago

1.0.4

6 years ago