Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
YOHOBUYPC
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
0
Merge Requests
2
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Email Patches
Plain Diff
Browse Files
Authored by
Rock Zhang
9 years ago
Commit
129cc3c719201868159a82c2d97df323640b74f0
1 parent
4f9d1574
修复意见反馈上传图片返回的图片地址不正确的bug
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
5 deletions
library/Plugin/Images.php
library/Plugin/Images.php
View file @
129cc3c
...
...
@@ -24,9 +24,6 @@ class Images
),
'yhb-head'
=>
'head.static.yhbimg.com'
);
private
static
$staticDomain
=
array
(
'bucket'
=>
''
);
private
static
$qiniuDomain
=
'yhfair.qiniudn.com'
;
/**
...
...
@@ -171,7 +168,7 @@ class Images
$stream
.=
$twoHyphens
.
$boundary
.
$end
;
$stream
.=
"Content-Disposition: form-data; "
.
"name=
\"
project
\"
"
.
$end
;
$stream
.=
$end
;
$stream
.=
"s
ns
"
;
//project sns
$stream
.=
"s
uggest
"
;
//project sns
$stream
.=
$end
;
$stream
.=
$twoHyphens
.
$boundary
.
$twoHyphens
.
$end
;
$opts
=
array
(
...
...
@@ -185,7 +182,18 @@ class Images
$result
=
json_decode
(
file_get_contents
(
'http://upload.static.yohobuy.com'
,
false
,
$context
),
true
);
if
(
!
empty
(
$result
[
'data'
][
'imagesList'
]))
{
return
count
(
$file
)
==
1
||
!
is_array
(
$file
)
?
current
(
$result
[
'data'
][
'imagesList'
])
:
$result
[
'data'
][
'imagesList'
]
;
if
(
count
(
$file
)
==
1
||
!
is_array
(
$file
))
{
return
self
::
getSourceUrl
(
current
(
$result
[
'data'
][
'imagesList'
]),
'suggest'
);
}
else
{
foreach
(
$result
[
'data'
][
'imagesList'
]
as
&
$val
)
{
$val
=
self
::
getSourceUrl
(
$val
,
'suggest'
);
}
return
$result
[
'data'
][
'imagesList'
];
}
}
else
{
...
...
Please
register
or
login
to post a comment