Authored by 梁志锋

Merge branch 'develop' of http://git.dev.yoho.cn/web/yohobuy into develop

@@ -29,9 +29,9 @@ class SearchData @@ -29,9 +29,9 @@ class SearchData
29 defined('APPLICATION_ENV') || define('APPLICATION_ENV', 'developer'); 29 defined('APPLICATION_ENV') || define('APPLICATION_ENV', 'developer');
30 switch (APPLICATION_ENV) { 30 switch (APPLICATION_ENV) {
31 case 'release': 31 case 'release':
  32 + return 'http://100.98.132.63/yohosearch/search.json';
32 case 'test': 33 case 'test':
33 case 'preview': 34 case 'preview':
34 - return 'http://100.98.132.63/yohosearch/search.json';  
35 case 'developer': 35 case 'developer':
36 default: 36 default:
37 return 'http://101.200.31.165/yohosearch/search.json'; 37 return 'http://101.200.31.165/yohosearch/search.json';
@@ -148,7 +148,7 @@ class SearchData @@ -148,7 +148,7 @@ class SearchData
148 if (!isset($condition['order'])) { 148 if (!isset($condition['order'])) {
149 $param['order'] = $orderMaps['s_t_desc']; 149 $param['order'] = $orderMaps['s_t_desc'];
150 } else { 150 } else {
151 - $param['order'] = $orderMaps[ $condition['order'] ]; 151 + $param['order'] = $orderMaps[$condition['order']];
152 } 152 }
153 if (!isset($condition['page'])) { 153 if (!isset($condition['page'])) {
154 $param['page'] = 1; 154 $param['page'] = 1;
@@ -9,6 +9,7 @@ use Plugin\Helpers; @@ -9,6 +9,7 @@ use Plugin\Helpers;
9 */ 9 */
10 class FloorProcess 10 class FloorProcess
11 { 11 {
  12 +
12 /** 13 /**
13 * 频道参数 14 * 频道参数
14 * 15 *
@@ -207,7 +208,7 @@ class FloorProcess @@ -207,7 +208,7 @@ class FloorProcess
207 foreach ($data['list'] as &$one) { 208 foreach ($data['list'] as &$one) {
208 if (isset($one['url'])) { 209 if (isset($one['url'])) {
209 $one['url'] = Helpers::getFilterUrl($one['url']); 210 $one['url'] = Helpers::getFilterUrl($one['url']);
210 - isset(self::$channel[$type]) && $one['url'] .= '?gender='.self::$channel[$type]; 211 + isset(self::$channel[$type]) && $one['url'] .= '?gender=' . self::$channel[$type];
211 } 212 }
212 $one['img'] = Helpers::getImageUrl($one['src'], 158, 174); 213 $one['img'] = Helpers::getImageUrl($one['src'], 158, 174);
213 unset($one['src']); 214 unset($one['src']);
@@ -159,7 +159,7 @@ class DetailModel @@ -159,7 +159,7 @@ class DetailModel
159 $colorId = intval($value['colorId']); 159 $colorId = intval($value['colorId']);
160 // 商品按颜色进行分类分组 160 // 商品按颜色进行分类分组
161 foreach ($value['goodsImagesList'] as $goods) { 161 foreach ($value['goodsImagesList'] as $goods) {
162 - $goodsList[ $goods['goodsId'] ] = $colorId; 162 + $goodsList[$goods['goodsId']] = $colorId;
163 $goodsGroup[$colorId][] = array( 163 $goodsGroup[$colorId][] = array(
164 'goodsId' => $goods['goodsId'], 164 'goodsId' => $goods['goodsId'],
165 'img' => $goods['imageUrl'], 165 'img' => $goods['imageUrl'],
@@ -172,7 +172,7 @@ class DetailModel @@ -172,7 +172,7 @@ class DetailModel
172 } 172 }
173 // 商品的尺码列表 173 // 商品的尺码列表
174 foreach ($value['goodsSizeBoList'] as $size) { 174 foreach ($value['goodsSizeBoList'] as $size) {
175 - $sizeGroup[ $colorId ] = array( 175 + $sizeGroup[$colorId] = array(
176 'sizeName' => $size['sizeName'], 176 'sizeName' => $size['sizeName'],
177 'sizeSku' => $size['goodsSizeSkuId'], 177 'sizeSku' => $size['goodsSizeSkuId'],
178 'sizeStorage' => $size['goodsSizeStorageNum'], 178 'sizeStorage' => $size['goodsSizeStorageNum'],
@@ -275,15 +275,15 @@ class DetailModel @@ -275,15 +275,15 @@ class DetailModel
275 'enTitle' => 'SIZE INFO', 275 'enTitle' => 'SIZE INFO',
276 'detail' => array('list' => array()), 276 'detail' => array('list' => array()),
277 ); 277 );
278 - $sizeNameList = array(0 => array('param' => '吊牌尺码')) ; // 尺码名称 278 + $sizeNameList = array(0 => array('param' => '吊牌尺码')); // 尺码名称
279 $sizeBoGroup = array(); // 尺码按ID分组 279 $sizeBoGroup = array(); // 尺码按ID分组
280 foreach ($sizeInfo['sizeInfoBo']['sizeAttributeBos'] as $attr) { 280 foreach ($sizeInfo['sizeInfoBo']['sizeAttributeBos'] as $attr) {
281 - $sizeBoGroup[ $attr['id'] ][0] = array('param' => $attr['attributeName']); 281 + $sizeBoGroup[$attr['id']][0] = array('param' => $attr['attributeName']);
282 } 282 }
283 foreach ($sizeInfo['sizeInfoBo']['sizeBoList'] as $value) { 283 foreach ($sizeInfo['sizeInfoBo']['sizeBoList'] as $value) {
284 $sizeNameList[] = array('param' => $value['sizeName']); 284 $sizeNameList[] = array('param' => $value['sizeName']);
285 foreach ($value['sortAttributes'] as $attr) { 285 foreach ($value['sortAttributes'] as $attr) {
286 - $sizeBoGroup[ $attr['id'] ][] = array('param' => $attr['sizeValue']); 286 + $sizeBoGroup[$attr['id']][] = array('param' => $attr['sizeValue']);
287 } 287 }
288 } 288 }
289 289
@@ -384,7 +384,6 @@ class DetailModel @@ -384,7 +384,6 @@ class DetailModel
384 ); 384 );
385 } 385 }
386 } 386 }
387 -  
388 } 387 }
389 388
390 return $result; 389 return $result;
@@ -184,12 +184,12 @@ class NewsaleModel @@ -184,12 +184,12 @@ class NewsaleModel
184 $newsale = NewsaleData::getNewsaleFocus($codeKey); 184 $newsale = NewsaleData::getNewsaleFocus($codeKey);
185 185
186 // 调用接口获取数据并封装 186 // 调用接口获取数据并封装
187 - if (isset($newsale['code']) && isset($newsale['data'][0]['data'])) {  
188 - if(count($newsale['data'][0]['data']) === 1) {  
189 - $result = Helpers::formatBanner($newsale['data'][0]['data'][0], 640, 240); 187 + if (isset($newsale['code']) && isset($newsale['data']['list'])) {
  188 + if(count($newsale['data']['list']) === 1) {
  189 + $result = Helpers::formatBanner($newsale['data']['list'][0]['data'][0], 640, 240);
190 } else { 190 } else {
191 - foreach ($newsale['data'][0]['data'] as $one) {  
192 - $result['list'][] = Helpers::formatBanner($one, 640, 240); 191 + foreach ($newsale['data']['list'] as $one) {
  192 + $result['list'][] = Helpers::formatBanner($one['data'], 640, 240);
193 } 193 }
194 } 194 }
195 } 195 }