!111 告警处理

Merge pull request !111 from xuanzhuo/master
This commit is contained in:
openharmony_ci
2025-09-12 08:39:35 +00:00
committed by Gitee
+13 -9
View File
@@ -138,6 +138,18 @@ struct Index {
this.authType.includes(userAuth.UserAuthType.FINGERPRINT) && this.isFingerprintLocked
}
handleCmdDataObjItems(cmdDataObj: WidgetCommand): void {
cmdDataObj.cmd?.map((item) => {
if (item.payload?.lockoutDuration !== 0 && item.payload?.remainAttempts === 0) {
if (item.payload?.type === 'face') {
this.isFaceLocked = true;
} else if (item.payload?.type === 'fingerprint') {
this.isFingerprintLocked = true;
}
}
})
}
handleLocked(): boolean {
if (this.skipLockedBiometricAuth) {
if (this.isFaceLockedFn()) {
@@ -166,15 +178,7 @@ struct Index {
LogUtils.info(TAG, 'sendCommand result: ' + result);
const cmdDataObj: WidgetCommand = JSON.parse(result || '{}');
this.skipLockedBiometricAuth = cmdDataObj?.skipLockedBiometricAuth ?? false
cmdDataObj.cmd?.map((item) => {
if (item.payload?.lockoutDuration !== 0 && item.payload?.remainAttempts === 0) {
if (item.payload?.type === 'face') {
this.isFaceLocked = true;
} else if (item.payload?.type === 'fingerprint') {
this.isFingerprintLocked = true;
}
}
})
this.handleCmdDataObjItems(cmdDataObj);
if (this.handleLocked()) {
return;
}