无网络情况下进入加密分享页面,确定按钮置灰

Signed-off-by: li-li-wang <wangliliang5@huawei.com>
This commit is contained in:
li-li-wang 2024-08-10 15:04:31 +08:00
parent ddff41d2f4
commit e0d4b98cff
3 changed files with 8 additions and 6 deletions

View File

@ -2,8 +2,8 @@
"app": { "app": {
"bundleName": "com.ohos.dlpmanager", "bundleName": "com.ohos.dlpmanager",
"vendor": "example", "vendor": "example",
"versionCode": 1000103, "versionCode": 1000105,
"versionName": "1.0.1.03", "versionName": "1.0.1.05",
"icon": "$media:app_icon", "icon": "$media:app_icon",
"label": "$string:app_name", "label": "$string:app_name",
"minAPIVersion": 12, "minAPIVersion": 12,

View File

@ -16,8 +16,8 @@
"app": { "app": {
"bundleName": "com.ohos.dlpmanager", "bundleName": "com.ohos.dlpmanager",
"vendor": "example", "vendor": "example",
"versionCode": 1000103, "versionCode": 1000105,
"versionName": "1.0.1.03", "versionName": "1.0.1.05",
"icon": "$media:app_icon", "icon": "$media:app_icon",
"label": "$string:app_name", "label": "$string:app_name",
"minAPIVersion": 12, "minAPIVersion": 12,

View File

@ -137,6 +137,7 @@ struct encryptedSharing {
} }
private async beginShareEncrypt() { private async beginShareEncrypt() {
HiLog.info(TAG, `begin Share Encrypt start`);
if (this.checkCloudPhone(this.inputValue)) { if (this.checkCloudPhone(this.inputValue)) {
this.enabledFocus = false; this.enabledFocus = false;
this.isConfirmButtonEnabled = false; this.isConfirmButtonEnabled = false;
@ -369,13 +370,13 @@ struct encryptedSharing {
HiLog.error(TAG, `getOsAccountInfo failed: ${JSON.stringify(err)}`); HiLog.error(TAG, `getOsAccountInfo failed: ${JSON.stringify(err)}`);
this.showToast($r('app.string.Share_File_Encrypted_Failed')); this.showToast($r('app.string.Share_File_Encrypted_Failed'));
this.enabledFocus = true; this.enabledFocus = true;
this.isConfirmButtonEnabled = true; this.isConfirmButtonEnabled = this.inputValue.length > 0;
return; return;
} }
} catch { } catch {
this.showToast($r('app.string.network_invalid')); this.showToast($r('app.string.network_invalid'));
this.enabledFocus = true; this.enabledFocus = true;
this.isConfirmButtonEnabled = true; this.isConfirmButtonEnabled = this.inputValue.length > 0;
} }
} }
@ -613,6 +614,7 @@ struct encryptedSharing {
.onReceive((data) => { .onReceive((data) => {
HiLog.info(TAG, `data.status: ${JSON.stringify(data.status)}`); HiLog.info(TAG, `data.status: ${JSON.stringify(data.status)}`);
let res = data.result as Record<string, string>; let res = data.result as Record<string, string>;
HiLog.info(TAG, `res.code: ${JSON.stringify(res.code)}`);
if (data.status) { if (data.status) {
this.ownerAccount = res.uid; this.ownerAccount = res.uid;
this.ownerAccountID = res.uid; this.ownerAccountID = res.uid;