...
|
...
|
@@ -182,18 +182,22 @@ class Images |
|
|
$result = json_decode(file_get_contents('http://upload.static.yohobuy.com', false, $context), true);
|
|
|
if(!empty($result['data']['imagesList']))
|
|
|
{
|
|
|
$imgList = array('imgList'=>array());
|
|
|
if(count($file) == 1 || !is_array($file))
|
|
|
{
|
|
|
return self::getSourceUrl(current($result['data']['imagesList']), 'suggest');
|
|
|
$imgList['imgList'][] = array('imgUrl' => self::getSourceUrl(current($result['data']['imagesList']), 'suggest'));
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
foreach ($result['data']['imagesList'] as &$val) {
|
|
|
$val = self::getSourceUrl($val, 'suggest');
|
|
|
$img = array();
|
|
|
foreach ($result['data']['imagesList'] as $val) {
|
|
|
$img = array();
|
|
|
$img['imgUrl'] = self::getSourceUrl($val, 'suggest');
|
|
|
$imgList['imgList'][] = $img;
|
|
|
}
|
|
|
|
|
|
return $result['data']['imagesList'];
|
|
|
}
|
|
|
|
|
|
return $imgList;
|
|
|
}
|
|
|
else
|
|
|
{
|
...
|
...
|
|