1.4.7 • Published 2 months ago
tencent-wx-jssdk v1.4.7
tencent-wx-jssdk
Weixin JS-SDK
This is lib not maintain anymore, please use [@types/jweixin](https://www.npmjs.com/package/@types/jweixin)
instead.
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
import { scanQRCode } from 'tencent-wx-jssdk';
scanQRCode({
needResult: 0,
scanType: ['qrCode'],
success(res) {
console.log(res);
}
});
or, you could add this module in your tsconfig.json
{
"compilerOptions": {
"types": [
"tencent-wx-jssdk"
]
}
}
then use it freely.
jWeixin.scanQRCode({
needResult: 0,
scanType: ['qrCode'],
success(res) {
console.log(res);
}
});
// sometimes you must use WeixinJSBridge, like wexin paying
WeixinJSBridge.invoke("getBrandWCPayRequest", {}, (res) => {
});
javascript
You will need this only if you would like get your project packed.
const wx = require('tencent-wx-jssdk');
wx.scanQRCode({
needResult: 0,
scanType: ['qrCode'],
success(res) {
console.log(res);
}
});
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!
1.4.6
2 months ago
1.4.5
2 months ago
1.4.7
2 months ago
1.4.4
2 months ago
1.4.1
2 months ago
1.0.4
2 months ago
1.4.0-201811101109
5 years ago
1.3.2-201807261207
6 years ago
1.3.2
6 years ago
1.3.1-201712141554
6 years ago
1.3.1-201712131608
6 years ago
1.3.0-201711130920
6 years ago
1.2.1-dev.201710161516
7 years ago
1.2.1-dev.201708161655
7 years ago
1.2.1-dev.201708161028
7 years ago
1.2.1-dev.201708101520
7 years ago
1.2.0-dev.201708101425
7 years ago
1.1.0-dev.201708101424
7 years ago
1.0.0-dev.201708101422
7 years ago
1.2.1-dev.201708101419
7 years ago
1.1.1
7 years ago
1.2.1
7 years ago
1.2.0
7 years ago
1.1.0
7 years ago
1.0.1
7 years ago
1.0.0
7 years ago