diff --git a/src/platforms/h5/helpers/get-real-path.js b/src/platforms/h5/helpers/get-real-path.js index cc1865e39a7a07fcd882dd6057f66d79828506e8..56b04864539eb7fa2dc1fc0991b9d2f14e7da2df 100644 --- a/src/platforms/h5/helpers/get-real-path.js +++ b/src/platforms/h5/helpers/get-real-path.js @@ -12,7 +12,11 @@ function addBase (filePath) { export default function getRealPath (filePath) { if (filePath.indexOf('/') === 0) { - return addBase(filePath.substr(1)) + if (filePath.indexOf('//') === 0) { + filePath = 'https:' + filePath + } else { + return addBase(filePath.substr(1)) + } } // 网络资源或base64 if (SCHEME_RE.test(filePath) || BASE64_RE.test(filePath) || filePath.indexOf('blob:') === 0) { @@ -25,4 +29,4 @@ export default function getRealPath (filePath) { } return filePath -} +}