Skip to content

Commit 4a6b4a1

Browse files
committed
bugfix: check if it is fingerPrint mode
1 parent 6a32411 commit 4a6b4a1

File tree

1 file changed

+17
-5
lines changed

1 file changed

+17
-5
lines changed

Diff for: page/API/pages/soter-authentication/soter-authentication.js

+17-5
Original file line numberDiff line numberDiff line change
@@ -51,18 +51,30 @@ Page({
5151
})
5252
}
5353

54+
const notSupported = () => {
55+
wx.showModal({
56+
title: '错误',
57+
content: '您的设备不支持指纹识别',
58+
showCancel: false
59+
})
60+
}
61+
5462
wx.checkIsSupportSoterAuthentication({
5563
success: (res) => {
5664
console.log(res)
65+
if (
66+
!res ||
67+
res.supportMode.length === 0 ||
68+
res.supportMode.indexOf('fingerPrint') < 0
69+
) {
70+
notSupported()
71+
return
72+
}
5773
checkIsEnrolled()
5874
},
5975
fail: (err) => {
6076
console.error(err)
61-
wx.showModal({
62-
title: '错误',
63-
content: '您的设备不支持指纹识别',
64-
showCancel: false
65-
})
77+
notSupported()
6678
}
6779
})
6880
}

0 commit comments

Comments
 (0)