1
0
Code Issues Pull Requests Packages Projects Releases Wiki Activity GitHub Gitee

feat: Add openWXApp props.

This commit is contained in:
jaywcjlove
2020-08-05 12:42:05 +08:00
parent 864d940513
commit edd515f42b
6 changed files with 67 additions and 17 deletions

View File

@@ -6,7 +6,7 @@ export default class Wechat {
* @param appid 通过微信开放平台,[获取appid](https://open.weixin.qq.com/)
* @param universalLink 参数在 iOS 中有效Universal Link(通用链接)是苹果在 iOS9 推出的,一种能够方便的通过传统 HTTPS 链接来启动 APP 的功能,可以使用相同的网址打开网址和 APP。
*/
static registerApp(appid, universalLink) {
static registerApp(appid, universalLink = '') {
if (Platform.OS === 'ios') {
return NativeModules.RNWechat.registerApp(appid, universalLink);
}
@@ -21,11 +21,17 @@ export default class Wechat {
return NativeModules.RNWechat.isWXAppInstalled();
}
/**
* 判断当前微信的版本是否支持OpenApi支持返回 true不支持返回 false
* 判断当前微信的版本是否支持 OpenApi支持返回 true不支持返回 false
*/
static isWXAppSupportApi() {
return NativeModules.RNWechat.isWXAppSupportApi();
}
/**
* 打开微信,成功返回 true不支持返回 失败返回 false
*/
static openWXApp() {
return NativeModules.RNWechat.openWXApp();
}
/**
* 获取当前微信SDK的版本号
*/