LewinJun
Committed by GitHub

Update README.md

@@ -13,12 +13,13 @@ react-native 识别照片二维码 @@ -13,12 +13,13 @@ react-native 识别照片二维码
13 13
14 ## Usage 14 ## Usage
15 ### NOTE: 可以参考Example的App.js中的openPhoto方法 15 ### NOTE: 可以参考Example的App.js中的openPhoto方法
  16 +
16 ```javascript 17 ```javascript
17 import {readerQR} from 'react-native-lewin-qrcode' 18 import {readerQR} from 'react-native-lewin-qrcode'
18 - //path 图片文件的路径 19 +//path 图片文件的路径
19 - readerQR(path).then((data)=>{ 20 +readerQR(path).then((data)=>{
20 - Alert.alert('识别结果',data); 21 + Alert.alert('识别结果',data);
21 - }).catch((err)=>{ 22 +}).catch((err)=>{
22 - Alert.alert('识别失败'); 23 + Alert.alert('识别失败');
23 - }); 24 +});
24 -```javascript 25 +```