Authored by Rock Zhang

修改意见反馈上传图片返回的数据格式,修复js中merge错误的bug

@@ -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 {
@@ -15,13 +15,8 @@ var $nav = $('.category-nav'), @@ -15,13 +15,8 @@ var $nav = $('.category-nav'),
15 15
16 var $curContent = $contents.not('.hide'); 16 var $curContent = $contents.not('.hide');
17 17
18 -<<<<<<< HEAD  
19 -// $curClickSubLevel;  
20 18
21 -var navHammer, ccHammer;  
22 -=======  
23 var navHammer; 19 var navHammer;
24 ->>>>>>> master  
25 20
26 //初始化container高度 21 //初始化container高度
27 (function() { 22 (function() {