tencent-wx-jssdk
Weixin JS-SDK
SDK Version
1.6.0
Install
npm install tencent-wechat-jssdk --save
How to Use
TypeScript
// sometime you want import this module, eg. use this with webpack; scanQRCode;
or, you could add this module in your tsconfig.json
then use it freely.
jWeixin.scanQRCode; // sometimes you must use WeixinJSBridge, like wexin payingWeixinJSBridge.invoke"getBrandWCPayRequest", ,;
javascript
You will need this only if you would like get your project packed.
const wx = ;wx;
Others
ts Error
If you get this Error:
[ts] Initializers are not allowed in ambient contexts.
Try add "skipLibCheck": true
to compilerOptions
in file tsconfig.json
.
Good luck!