Skip to content

Commit 216be48

Browse files
author
wangcuijuan
committed
在getImageInfo中增加path
1 parent a002c6a commit 216be48

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

packages/api-proxy/src/platform/api/image/index.ios.js

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,18 @@ const getImageInfo = function (options = {}) {
2222
failHandle(result, fail, complete)
2323
return
2424
}
25+
let path = ''
26+
if (src.toLowerCase().startsWith("http")) {
27+
path = src
28+
}
2529
Image.getSize(src, (width, height) => {
2630
const result = {
2731
errMsg: 'getImageInfo:ok',
2832
width,
29-
height
33+
height,
34+
path
3035
}
31-
defineUnsupportedProps(result, ['path', 'orientation', 'type'])
36+
defineUnsupportedProps(result, ['orientation', 'type'])
3237
successHandle(result, success, complete)
3338
}, (err) => {
3439
const result = {

0 commit comments

Comments
 (0)