!322 修复网络异常提示语不对

Merge pull request !322 from 何钱贝/master
This commit is contained in:
openharmony_ci 2024-10-31 12:06:22 +00:00 committed by Gitee
commit d46efd89de
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -147,6 +147,7 @@ struct encryptedSharing {
this.enabledFocus = true;
this.isConfirmButtonEnabled = true;
this.showToast($r('app.string.Share_File_Encrypted_Failed'));
return;
}
try {
let commandGetAccountInfoCallBack = JSON.parse(this.commandGetAccountInfo) as Record<string, object>;
@ -160,7 +161,6 @@ struct encryptedSharing {
this.enabledFocus = true;
this.isConfirmButtonEnabled = true;
this.recordHashUid = '';
storage.setOrCreate('commandGetAccountInfo', '');
if ([
Constants.ERR_CODE_NETWORK_ERROR,
Constants.ERR_CODE_CONNECTION_FAIL,
@ -173,7 +173,7 @@ struct encryptedSharing {
}
} catch (error) {
HiLog.error(TAG, `get account info failed: ${JSON.stringify(error)}`);
this.showToast($r('app.string.network_invalid'));
this.showToast($r('app.string.Share_File_Encrypted_Failed'));
this.enabledFocus = true;
this.isConfirmButtonEnabled = this.inputValue.length > 0;
}