Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
_onLoginPress () {
const {ui, router, actions} = this.props
if (ui.checkTokenPending) { return }
if (Platform.OS !== 'web') {
Platform.OS === 'android' ? router.toQRCode() : Camera.checkDeviceAuthorizationStatus()
.then((isAuth) => {
if (isAuth) {
router.toQRCode()
} else {
actions.toast('请在设置中开启Noder对相机的访问')
}
})
.catch(() => {
actions.toast('获取相机访问权错误')
})
}
}