提交 d83b31de authored 作者: 吴强's avatar 吴强

测试硬件读取

上级 94d78b15
...@@ -7,6 +7,7 @@ import { View, ScrollView } from 'react-native'; ...@@ -7,6 +7,7 @@ import { View, ScrollView } from 'react-native';
import { List, InputItem, Button, Toast } from 'antd-mobile'; import { List, InputItem, Button, Toast } from 'antd-mobile';
import { connect } from 'react-redux'; import { connect } from 'react-redux';
import { createAction } from '../../../utils'; import { createAction } from '../../../utils';
import {scan} from "../../../services/idcard";
@connect(({ DSRInfoDetail }) => ({ DSRInfoDetail })) @connect(({ DSRInfoDetail }) => ({ DSRInfoDetail }))
class DSRInfoDetailScreen extends React.Component { class DSRInfoDetailScreen extends React.Component {
...@@ -38,6 +39,9 @@ class DSRInfoDetailScreen extends React.Component { ...@@ -38,6 +39,9 @@ class DSRInfoDetailScreen extends React.Component {
const { getFieldProps } = this.props.form; const { getFieldProps } = this.props.form;
return ( return (
<ScrollView> <ScrollView>
<Button onClick={() => {
scan().then(res => console.log(res)).catch(err => console.error(err));
}}></Button>
<List> <List>
{ {
metas.map((m) => { metas.map((m) => {
...@@ -88,6 +92,7 @@ class DSRInfoDetailScreen extends React.Component { ...@@ -88,6 +92,7 @@ class DSRInfoDetailScreen extends React.Component {
} }
</List> </List>
</ScrollView> </ScrollView>
); );
} }
} }
......
...@@ -133,4 +133,3 @@ export async function tryIt(times, cb, delay) { ...@@ -133,4 +133,3 @@ export async function tryIt(times, cb, delay) {
throw err; throw err;
} }
}; };
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论