@defy/vue-wx-jssdk
v0.1.2
Published
vue 微信jssdk插件
Downloads
20
Readme
vue-wx-jssdk
Installation
You can install it via npm.
$ npm i @defy/vue-wx-jssdk -S
import Vue from 'vue';
import WxJssdk from '@defy/wx-jssdk'
import VueWxJssdk from '@defy/vue-wx-jssdk';
Vue.use(VueWxJssdk, WxJssdk);
Usage
// ...
mounted() {
this.$wx.configAsync({debug = false, appId:'', timestamp:'', nonceStr:'', signature:'', jsApiList = []}).then(res => {
console.log(res);
}).catch(e => {
console.log(e);
)
}
Trigger
// ...
methods: {
scanQRCode() {
this.$wx.scanQRCodeAsync().then(res=>{
console.log(res)
})
}
}