选择多张图片
This commit is contained in:
parent
110512d9cb
commit
ccd4cdf328
@ -874,7 +874,7 @@ export struct ChatP2PPage {
|
||||
MediaUtils.showImageVideoPicker().then((results) => {
|
||||
if(results!=null&&results.length>0)
|
||||
{
|
||||
results.forEach(result=>{
|
||||
for (const result of results) {
|
||||
if (result.errorMsg == null && result.uri) {
|
||||
if (result.type === photoAccessHelper.PhotoType.IMAGE) {
|
||||
this.chatViewModel.sendImageMessage(result.uri);
|
||||
@ -882,7 +882,8 @@ export struct ChatP2PPage {
|
||||
this.chatViewModel.sendVideoMessage(result.uri, result.duration, result.width, result.height);
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
})
|
||||
@ -1027,7 +1028,7 @@ export struct ChatP2PPage {
|
||||
MediaUtils.showImageVideoPicker().then((results) => {
|
||||
if(results!=null&&results.length>0)
|
||||
{
|
||||
results.forEach(result=>{
|
||||
for (const result of results) {
|
||||
if (result.errorMsg == null && result.uri) {
|
||||
if (result.type === photoAccessHelper.PhotoType.IMAGE) {
|
||||
this.chatViewModel.sendImageMessage(result.uri);
|
||||
@ -1035,7 +1036,8 @@ export struct ChatP2PPage {
|
||||
this.chatViewModel.sendVideoMessage(result.uri, result.duration, result.width, result.height);
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
}
|
||||
// if (result.errorMsg == null && result.uri) {
|
||||
// if (result.type === photoAccessHelper.PhotoType.IMAGE) {
|
||||
|
||||
@ -72,9 +72,9 @@ export class MediaUtils {
|
||||
const uri = photoSelectResult.photoUris;
|
||||
let selectResult:SelectResult[]=[]
|
||||
// const uri = photoSelectResult.photoUris[0];
|
||||
await uri.forEach(async values=>{
|
||||
selectResult.push(await MediaUtils.getMediaInfo(context, values))
|
||||
})
|
||||
for (const indexUri of uri) {
|
||||
selectResult.push(await MediaUtils.getMediaInfo(context, indexUri))
|
||||
}
|
||||
// const selectResult = MediaUtils.getMediaInfo(context, uri)
|
||||
resolve(selectResult);
|
||||
})
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user