修复备忘录插入不同图片显示同一张图片

Signed-off-by: zwx1126739 <zhanghong121@huawei.com>
This commit is contained in:
zwx1126739 2024-06-13 10:24:08 +08:00
parent bb1913cec8
commit 22fc3e6f9c

View File

@ -15,6 +15,7 @@
import {LogUtil} from './LogUtil'
import {MediaLibraryAccess} from '../access/MediaLibraryAccess';
import dataSharePredicates from '@ohos.data.dataSharePredicates';
import fileio from '@ohos.fileio';
const TAG = "OperationUtils"
@ -113,10 +114,10 @@ export class OperationUtils {
async getFileAssetById(imagePath, context){
LogUtil.info(TAG, 'getFileAssetById', imagePath);
let predicates: dataSharePredicates.DataSharePredicates = new dataSharePredicates.DataSharePredicates();
let fetchOpt = {
selections : '',
selectionArgs : [],
uri:imagePath
fetchColumns: [],
predicates: predicates.equalTo('uri',imagePath)
}
try {