para-bridge-demo
Version:
a bridge api for js-ios/andriod rest
25 lines (21 loc) • 480 B
Markdown
``` tsx
interface IScanParam {
scanType: 'qrCode'; // 'qrCode',
// 扫描结果, needResult='1',才有返回内容
needResult: '0' | '1';
}
interface IScanResult {
// 扫描结果, needResult='1',才有返回内容
resultStr: string; // 'https://domain.com'
}
private scan = () => {
scanWithResult();
}
private scanWithResult = () => {
scanWithResult().then((result) => {
alert(result);
}).catch((err) => {
alert(JSON.stringify(err));
});
}
```