新增调用原生安卓视频多选插件并获取对应地址的方法
This commit is contained in:
parent
f19660c03c
commit
033cf16ae7
11
src/main.js
11
src/main.js
@ -109,6 +109,17 @@ export function createApp() {
|
||||
})
|
||||
}
|
||||
|
||||
//获取从base传来的多选视频列表
|
||||
window.getBaseMulVideo = (videoList) => {
|
||||
const videos = JSON.parse(decodeURIComponent(videoList))
|
||||
console.error('=====videos', videos)
|
||||
if(videos.length > 0){
|
||||
const videoUri = videos[0]
|
||||
console.error('=====videoUri', videoUri)
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
window.message = ['success', 'error', 'warning'].reduce((acc, type) => {
|
||||
acc[type] = (message) => {
|
||||
if (typeof message === 'string') {
|
||||
|
@ -162,6 +162,12 @@ const photoActionsSelect = (index) => {
|
||||
)
|
||||
}
|
||||
} else {
|
||||
// let OAWebView = plus.webview.all()
|
||||
// OAWebView.forEach((webview, index) => {
|
||||
// if (webview.id === 'webviewId1') {
|
||||
// webview.evalJS(`getPlusVideoPicker()`)
|
||||
// }
|
||||
// })
|
||||
uni.chooseVideo({
|
||||
sourceType: ['album'],
|
||||
compressed: true,
|
||||
@ -317,7 +323,9 @@ const onUploadImageVideo = async (file, type = 'image', fileUrl) => {
|
||||
virtualList.value.unshift(newItem)
|
||||
|
||||
try {
|
||||
const result = await uploadImg(form, (e) => onProgressFn(e, randomId))
|
||||
const result = await uploadImg(form, (e) =>
|
||||
onProgressFn(e, randomId),
|
||||
)
|
||||
console.log('视频上传完成,结果:', result)
|
||||
|
||||
if (result.status === 0) {
|
||||
@ -369,7 +377,7 @@ const onUploadImageVideo = async (file, type = 'image', fileUrl) => {
|
||||
uploadsStore.updateUploadStatus(false)
|
||||
message.error('获取视频信息失败')
|
||||
resolve('')
|
||||
}
|
||||
},
|
||||
})
|
||||
}
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user