From 671d9a3d1e8fc9c477211ac8c18380fcbf96b7a3 Mon Sep 17 00:00:00 2001 From: xiaoyucoding Date: Fri, 12 Apr 2019 13:41:03 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E6=97=A0=E5=8D=8F?= =?UTF-8?q?=E8=AE=AE=E7=9A=84=E5=9B=BE=E7=89=87=E8=B5=84=E6=BA=90=E6=97=A0?= =?UTF-8?q?=E6=B3=95=E5=8A=A0=E8=BD=BD=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/platforms/h5/helpers/get-real-path.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/platforms/h5/helpers/get-real-path.js b/src/platforms/h5/helpers/get-real-path.js index cc1865e39..56b048645 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 -} +} -- GitLab