diff --git a/packages/uni-app-plus/dist/index.v3.js b/packages/uni-app-plus/dist/index.v3.js index 69f567aab0eb1fe504912c4bfd0ab83d20abb9b9..cdbb895ed5cef48bf30106680f9a1f5e3cf7ffda 100644 --- a/packages/uni-app-plus/dist/index.v3.js +++ b/packages/uni-app-plus/dist/index.v3.js @@ -1630,10 +1630,13 @@ var serviceContext = (function () { function getRealPath (filePath) { if (filePath.indexOf('/') === 0) { if (filePath.indexOf('//') === 0) { - filePath = 'https:' + filePath; - } else { - return addBase(filePath.substr(1)) + return 'https:' + filePath + } + // 平台绝对路径 安卓、iOS + if (filePath.startsWith('/storage/') || filePath.includes('/Containers/Data/Application/')) { + return 'file://' + filePath } + return addBase(filePath.substr(1)) } // 网络资源或base64 if (SCHEME_RE.test(filePath) || DATA_RE.test(filePath) || filePath.indexOf('blob:') === 0) { @@ -3851,7 +3854,7 @@ var serviceContext = (function () { // 无协议的情况补全 https if (filePath.indexOf('//') === 0) { - filePath = 'https:' + filePath; + return 'https:' + filePath } // 网络资源或base64 @@ -3866,6 +3869,10 @@ var serviceContext = (function () { const wwwPath = 'file://' + _handleLocalPath('_www'); // 绝对路径转换为本地文件系统路径 if (filePath.indexOf('/') === 0) { + // 平台绝对路径 安卓、iOS + if (filePath.startsWith('/storage/') || filePath.includes('/Containers/Data/Application/')) { + return 'file://' + filePath + } return wwwPath + filePath } // 相对资源 @@ -6756,7 +6763,7 @@ var serviceContext = (function () { }, () => { resolve(tempFilePath); }); - }) : Promise.resolve(); + }) : Promise.resolve(tempFilePath); if (compressed) { plus.nativeUI.showWaiting(); } @@ -6777,7 +6784,7 @@ var serviceContext = (function () { result.height = videoInfo.height; invoke$1(callbackId, result); }, - errorCallback + fail: errorCallback }); }); }