|
@@ -182,18 +182,22 @@ class Images |
|
@@ -182,18 +182,22 @@ class Images |
182
|
$result = json_decode(file_get_contents('http://upload.static.yohobuy.com', false, $context), true);
|
182
|
$result = json_decode(file_get_contents('http://upload.static.yohobuy.com', false, $context), true);
|
183
|
if(!empty($result['data']['imagesList']))
|
183
|
if(!empty($result['data']['imagesList']))
|
184
|
{
|
184
|
{
|
|
|
185
|
+ $imgList = array('imgList'=>array());
|
185
|
if(count($file) == 1 || !is_array($file))
|
186
|
if(count($file) == 1 || !is_array($file))
|
186
|
{
|
187
|
{
|
187
|
- return self::getSourceUrl(current($result['data']['imagesList']), 'suggest');
|
188
|
+ $imgList['imgList'][] = array('imgUrl' => self::getSourceUrl(current($result['data']['imagesList']), 'suggest'));
|
188
|
}
|
189
|
}
|
189
|
else
|
190
|
else
|
190
|
{
|
191
|
{
|
191
|
- foreach ($result['data']['imagesList'] as &$val) {
|
|
|
192
|
- $val = self::getSourceUrl($val, 'suggest');
|
192
|
+ $img = array();
|
|
|
193
|
+ foreach ($result['data']['imagesList'] as $val) {
|
|
|
194
|
+ $img = array();
|
|
|
195
|
+ $img['imgUrl'] = self::getSourceUrl($val, 'suggest');
|
|
|
196
|
+ $imgList['imgList'][] = $img;
|
193
|
}
|
197
|
}
|
194
|
-
|
|
|
195
|
- return $result['data']['imagesList'];
|
|
|
196
|
}
|
198
|
}
|
|
|
199
|
+
|
|
|
200
|
+ return $imgList;
|
197
|
}
|
201
|
}
|
198
|
else
|
202
|
else
|
199
|
{
|
203
|
{
|