para-bridge-demo
Version:
a bridge api for js-ios/andriod rest
29 lines (24 loc) • 569 B
Markdown
``` tsx
type permissionNames = 'location' | 'storage' | 'telephone' | 'camera' | 'sms' | 'contacts';
type QueryPermissionItems = {
[]: boolean;
};
interface IQueryPermissionParam {
names?: string[];
}
interface IQueryPermissionResult {
// NTV 版本号 6.0.1
version: string;
// 返回的权限列表+状态
// {
// 'storage': true,
// 'telephone': false,
// }
permissions: QueryPermissionItems;
}
queryPermission('camera', 'storage').then(result => {
this.setState({
value: JSON.stringify(result),
});
});
```