加密分享传递文件类型

Signed-off-by: li-li-wang <wangliliang5@huawei.com>
This commit is contained in:
li-li-wang 2024-10-09 15:36:28 +08:00
parent ea6742fb69
commit a1bba2f4f4
3 changed files with 8 additions and 7 deletions

View File

@ -2,8 +2,8 @@
"app": {
"bundleName": "com.ohos.dlpmanager",
"vendor": "example",
"versionCode": 1000110,
"versionName": "1.0.1.10",
"versionCode": 1000111,
"versionName": "1.0.1.11",
"icon": "$media:app_icon",
"label": "$string:app_name",
"minAPIVersion": 12,

View File

@ -16,8 +16,8 @@
"app": {
"bundleName": "com.ohos.dlpmanager",
"vendor": "example",
"versionCode": 1000110,
"versionName": "1.0.1.10",
"versionCode": 1000111,
"versionName": "1.0.1.11",
"icon": "$media:app_icon",
"label": "$string:app_name",
"minAPIVersion": 12,

View File

@ -96,6 +96,7 @@ struct encryptedSharing {
@State recordHashUid: string = '';
@State osVersion: ResourceStr = '';
@State textBoxIsFocused: boolean = false;
@State generalType: string = 'general.file';
@Builder
contactsPicker() {
@ -247,6 +248,7 @@ struct encryptedSharing {
AppStorage.setOrCreate('hiFileType', srcFileMsg.fileType);
let res: string = '';
Object.keys(abilityPickerRecords).forEach(key => {
this.generalType = key;
res = abilityPickerRecords[key][0]?.['4'];
});
if (res === undefined) {
@ -273,9 +275,8 @@ struct encryptedSharing {
'4': dlpFileName
}
];
let generalFile: Record<string, Test[]> = {
'general.file': arr,
}
let generalFile: Record<string, Test[]> = {};
generalFile[this.generalType] = arr;
this.actionWant.parameters['ability.picker.records'] = generalFile;
setTimeout(() => {
this.session!.terminateSelfWithResult({