From 033cf16ae7b5b493a0f6600a0db218c1157c8d1c Mon Sep 17 00:00:00 2001 From: wangyifeng <812766448@qq.com> Date: Mon, 28 Apr 2025 19:13:16 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E8=B0=83=E7=94=A8=E5=8E=9F?= =?UTF-8?q?=E7=94=9F=E5=AE=89=E5=8D=93=E8=A7=86=E9=A2=91=E5=A4=9A=E9=80=89?= =?UTF-8?q?=E6=8F=92=E4=BB=B6=E5=B9=B6=E8=8E=B7=E5=8F=96=E5=AF=B9=E5=BA=94?= =?UTF-8?q?=E5=9C=B0=E5=9D=80=E7=9A=84=E6=96=B9=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main.js | 11 +++++++++++ src/pages/dialog/components/filePanel.vue | 12 ++++++++++-- 2 files changed, 21 insertions(+), 2 deletions(-) diff --git a/src/main.js b/src/main.js index 650fc8b..8372b00 100644 --- a/src/main.js +++ b/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') { diff --git a/src/pages/dialog/components/filePanel.vue b/src/pages/dialog/components/filePanel.vue index faab8ed..b1130df 100644 --- a/src/pages/dialog/components/filePanel.vue +++ b/src/pages/dialog/components/filePanel.vue @@ -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('') - } + }, }) } })