|
@@ -182,17 +182,19 @@ class Images |
|
@@ -182,17 +182,19 @@ 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
|
+ $imgExtra = '?imageMogr2/thumbnail/130x130/extent/130x130/background/d2hpdGU=/position/center/quality/90';
|
185
|
$imgList = array('imgList'=>array());
|
186
|
$imgList = array('imgList'=>array());
|
|
|
187
|
+
|
186
|
if(count($file) == 1 || !is_array($file))
|
188
|
if(count($file) == 1 || !is_array($file))
|
187
|
{
|
189
|
{
|
188
|
- $imgList['imgList'][] = array('imgUrl' => self::getSourceUrl(current($result['data']['imagesList']), 'suggest'));
|
190
|
+ $imgList['imgList'][] = array('imgUrl' => self::getSourceUrl(current($result['data']['imagesList']), 'suggest') . $imgExtra);
|
189
|
}
|
191
|
}
|
190
|
else
|
192
|
else
|
191
|
{
|
193
|
{
|
192
|
$img = array();
|
194
|
$img = array();
|
193
|
foreach ($result['data']['imagesList'] as $val) {
|
195
|
foreach ($result['data']['imagesList'] as $val) {
|
194
|
$img = array();
|
196
|
$img = array();
|
195
|
- $img['imgUrl'] = self::getSourceUrl($val, 'suggest');
|
197
|
+ $img['imgUrl'] = self::getSourceUrl($val, 'suggest') . $imgExtra;
|
196
|
$imgList['imgList'][] = $img;
|
198
|
$imgList['imgList'][] = $img;
|
197
|
}
|
199
|
}
|
198
|
}
|
200
|
}
|