diff --git a/README.md b/README.md
index c977ed8..251f4e6 100644
--- a/README.md
+++ b/README.md
@@ -1,4 +1,5 @@
+
@@ -88,6 +89,6 @@ npx create-react-native-module --package-identifier com.uiwjs.react.wechat --obj
## 相关连接
-- [微信(SDK):iOS SDK v1.8.7.1](https://developers.weixin.qq.com/doc/oplatform/Downloads/iOS_Resource.html)
-- [微信(SDK):iOS 接入指南](https://developers.weixin.qq.com/doc/oplatform/Mobile_App/Access_Guide/iOS.html)
+- [微信(SDK):iOS SDK v1.8.7.1](https://developers.weixin.qq.com/doc/oplatform/Downloads/iOS_Resource.html)
+- [微信(SDK):iOS 接入指南](https://developers.weixin.qq.com/doc/oplatform/Mobile_App/Access_Guide/iOS.html)
- [@uiw/react-native-alipay](https://github.com/uiwjs/react-native-alipay) 支付宝支付。
diff --git a/example/App.js b/example/App.js
index 24939b0..016cbdb 100644
--- a/example/App.js
+++ b/example/App.js
@@ -4,23 +4,30 @@ import Wechat from '@uiw/react-native-wechat';
export default class App extends Component {
state = {
- message: '--'
+ isInstall: false,
+ isWXAppSupportApi: false,
};
async componentDidMount() {
const isInstall = await Wechat.isWXAppInstalled();
- console.log(':isInstall:', isInstall);
- // RNWechat.sampleMethod('Testing', 123, (message) => {
- // this.setState({
- // message
- // });
- // });
+ const isWXAppSupportApi = await Wechat.isWXAppSupportApi();
+ this.setState({
+ isInstall, isWXAppSupportApi
+ });
}
render() {
+ const { isInstall, isWXAppSupportApi } = this.state;
return (
☆Wechat Example☆
- {this.state.message}
+
+
+ {isInstall ? '有' : '没有'}安装微信,
+
+
+ 当前微信的版本{isWXAppSupportApi ? '支持' : '不支持'} OpenApi
+
+
);