Merge branch 'master' of gitee.com:xuanzhuo/applications_auth_widget

This commit is contained in:
sizhenzhen
2025-09-05 14:48:49 +08:00
+8 -9
View File
@@ -161,29 +161,28 @@ struct Index {
try {
userAuthWidgetMgr = userAuth.getUserAuthWidgetMgr(Constants.userAuthWidgetMgrVersion);
LogUtils.info(TAG, 'getUserAuthWidgetMgr success');
let that = this;
userAuthWidgetMgr.on('command', {
sendCommand(result) {
sendCommand: (result) => {
LogUtils.info(TAG, 'sendCommand result: ' + result);
const cmdDataObj: WidgetCommand = JSON.parse(result || '{}');
that.skipLockedBiometricAuth = cmdDataObj?.skipLockedBiometricAuth ?? false
this.skipLockedBiometricAuth = cmdDataObj?.skipLockedBiometricAuth ?? false
cmdDataObj.cmd?.map((item) => {
if (item.payload?.lockoutDuration !== 0 && item.payload?.remainAttempts === 0) {
if (item.payload?.type === 'face') {
that.isFaceLocked = true;
this.isFaceLocked = true;
} else if (item.payload?.type === 'fingerprint') {
that.isFingerprintLocked = true;
this.isFingerprintLocked = true;
}
}
})
if (that.handleLocked()) {
if (this.handleLocked()) {
return;
}
that.cmdData = cmdDataObj?.cmd || [];
this.cmdData = cmdDataObj?.cmd || [];
if (cmdDataObj?.pinSubType !== null && cmdDataObj?.pinSubType !== undefined) {
that.pinSubType = cmdDataObj?.pinSubType;
this.pinSubType = cmdDataObj?.pinSubType;
}
that.handleIsUnder(cmdDataObj?.cmd || []);
this.handleIsUnder(cmdDataObj?.cmd || []);
}
});
} catch (error) {