未验证 提交 85c1601a 编写于 作者: O openharmony_ci 提交者: Gitee

!22322 modify getPhotoIndex message

Merge pull request !22322 from shenshensun/message_getPhotoIndex
......@@ -1277,7 +1277,7 @@ async function example() {
### getPhotoIndex
getPhotoIndex(photoUri: string, albumUri: string, options: FetchOptions, callback: AsyncCallback<number>): void;
getPhotoIndex(photoUri: string, albumUri: string, options: FetchOptions, callback: AsyncCallback&lt;number&gt;): void
获取相册中图片或视频的位置,使用callback方式返回结果。
......@@ -1331,7 +1331,7 @@ async function example() {
let albumFetchResult = await helper.getAlbums(photoAccessHelper.AlbumType.SYSTEM, photoAccessHelper.AlbumSubtype.FAVORITE, fetchOp);
let album = await albumFetchResult.getFirstObject();
let photoFetchResult = await album.getAssets(fetchOpForGetIndex);
let photoFetchResult = await album.getAssets(fetchOptions);
let expectIndex = 1;
//Obtain the uri of the second file
let photoAsset = await photoFetchResult.getObjectByPosition(expectIndex);
......@@ -1352,7 +1352,7 @@ async function example() {
### getPhotoIndex
getPhotoIndex(photoUri: string, albumUri: string, options: FetchOptions): Promise<number>;
getPhotoIndex(photoUri: string, albumUri: string, options: FetchOptions): Promise&lt;number&gt;
获取相册中图片或视频的位置,使用Promise方式返回结果。
......@@ -1406,7 +1406,7 @@ async function example() {
let albumFetchResult = await helper.getAlbums(photoAccessHelper.AlbumType.SYSTEM, photoAccessHelper.AlbumSubtype.FAVORITE, fetchOp);
let album = await albumFetchResult.getFirstObject();
let photoFetchResult = await album.getAssets(fetchOpForGetIndex);
let photoFetchResult = await album.getAssets(fetchOptions);
let expectIndex = 1;
//Obtain the uri of the second file
let photoAsset = await photoFetchResult.getObjectByPosition(expectIndex);
......
......@@ -1395,7 +1395,7 @@ async function example() {
### getPhotoIndex
getPhotoIndex(photoUri: string, albumUri: string, options: FetchOptions, callback: AsyncCallback<number>): void;
getPhotoIndex(photoUri: string, albumUri: string, options: FetchOptions, callback: AsyncCallback&lt;number&gt;): void
获取相册中图片或视频的位置,使用callback方式返回结果。
......@@ -1446,10 +1446,10 @@ async function example() {
predicates: predicatesForGetAsset
};
//Obtain the uri of the album
let albumFetchResult = await mgr.getAlbums(photoAccessHelper.AlbumType.SYSTEM, photoAccessHelper.AlbumSubtype.FAVORITE, fetchOp);
let albumFetchResult = await mgr.getAlbums(userFileManager.AlbumType.SYSTEM, userFileManager.AlbumSubtype.FAVORITE, fetchOp);
let album = await albumFetchResult.getFirstObject();
let photoFetchResult = await album.getPhotoAssets(fetchOpForGetIndex);
let photoFetchResult = await album.getPhotoAssets(fetchOptions);
let expectIndex = 1;
//Obtain the uri of the second file
let photoAsset = await photoFetchResult.getPositionObject(expectIndex);
......@@ -1470,7 +1470,7 @@ async function example() {
### getPhotoIndex
getPhotoIndex(photoUri: string, albumUri: string, options: FetchOptions): Promise<number>;
getPhotoIndex(photoUri: string, albumUri: string, options: FetchOptions): Promise&lt;number&gt;
获取相册中图片或视频的位置,使用Promise方式返回结果。
......@@ -1521,10 +1521,10 @@ async function example() {
predicates: predicatesForGetAsset
};
//Obtain the uri of the album
let albumFetchResult = await mgr.getAlbums(photoAccessHelper.AlbumType.SYSTEM, photoAccessHelper.AlbumSubtype.FAVORITE, fetchOp);
let albumFetchResult = await mgr.getAlbums(userFileManager.AlbumType.SYSTEM, userFileManager.AlbumSubtype.FAVORITE, fetchOp);
let album = await albumFetchResult.getFirstObject();
let photoFetchResult = await album.getPhotoAssets(fetchOpForGetIndex);
let photoFetchResult = await album.getPhotoAssets(fetchOptions);
let expectIndex = 1;
//Obtain the uri of the second file
let photoAsset = await photoFetchResult.getPositionObject(expectIndex);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册