提交 615fb77d 编写于 作者: Q qiang

fix(App): getRealPath

上级 51c4b4e0
......@@ -25,7 +25,7 @@ export default function getRealPath (filePath) {
return 'https:' + filePath
}
// 平台绝对路径 安卓、iOS
if (filePath.startsWith('/storage/') || filePath.includes('/Containers/Data/Application/')) {
if (filePath.startsWith('/storage/') || filePath.startsWith('/sdcard/') || filePath.includes('/Containers/Data/Application/')) {
return 'file://' + filePath
}
return addBase(filePath.substr(1))
......
......@@ -76,7 +76,7 @@ export function getRealPath (filePath) {
// 绝对路径转换为本地文件系统路径
if (filePath.indexOf('/') === 0) {
// 平台绝对路径 安卓、iOS
if (filePath.startsWith('/storage/') || filePath.includes('/Containers/Data/Application/')) {
if (filePath.startsWith('/storage/') || filePath.startsWith('/sdcard/') || filePath.includes('/Containers/Data/Application/')) {
return 'file://' + filePath
}
return wwwPath + filePath
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册