vue-wechat
Wechat sdk for Vue.js.
install
npm i vue-wechat -s
Import vue-wechat before create Vue
instance:
; Vue; // ... ;
Import specific version of wechat sdk:
; Vue; // ... ;
Import original wechat sdk object:
;// import { wx } from 'vue-wechat';// import { wechat } from 'vue-wechat/1.2.0'; wechat;
usage
Global use.
; Vuewechat;
Use inside component.
// ... { this$wechat;}methods: { if window__wxjs_is_wkwebview let i = 0; const infos = ; const next = { if i < localIdslength this$wechat; else this; }; ; else this; } { console; }// ...