We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
undefined is not a function (evaluating 'Camera.checkDeviceAuthorizationStatus()')
1 parent 1db4fdf commit 925a10cCopy full SHA for 925a10c
src/layouts/Login.js
@@ -25,17 +25,17 @@ class Login extends Component {
25
const {ui, router, actions} = this.props
26
if (ui.checkTokenPending) { return }
27
if (Platform.OS !== 'web') {
28
- Camera.checkDeviceAuthorizationStatus()
29
- .then((isAuth) => {
30
- if (isAuth) {
31
- router.toQRCode()
32
- } else {
33
- actions.toast('请在设置中开启Noder对相机的访问')
34
- }
35
-})
36
- .catch((err) => {
37
- actions.toast('获取相机访问权错误')
38
+ Platform.OS === 'android' ? router.toQRCode() : Camera.checkDeviceAuthorizationStatus()
+ .then((isAuth) => {
+ if (isAuth) {
+ router.toQRCode()
+ } else {
+ actions.toast('请在设置中开启Noder对相机的访问')
+ }
+ })
+ .catch(() => {
+ actions.toast('获取相机访问权错误')
39
}
40
41
0 commit comments