@defy/wx-jssdk

1.0.11 • Public • Published

wx-jssdk Author Build Status Downloads Version License

提取微信官方JSSDK,部分api接口使用Promise包装,后期根据使用添加. 根据微信JS-SDK说明文档在对应API后面加上Async

Installation

You can install it via npm.

$ npm i @defy/wx-jssdk -S
import Vue from 'vue';
import WxJssdk from '@defy/wx-jssdk'

Vue.prototype.$wx = 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)
    })
  }
}

License

MIT

Dependencies (0)

    Dev Dependencies (5)

    Package Sidebar

    Install

    npm i @defy/wx-jssdk

    Weekly Downloads

    2

    Version

    1.0.11

    License

    MIT

    Unpacked Size

    121 kB

    Total Files

    11

    Last publish

    Collaborators

    • defy