Authored by hf

fixes bug to home page login show status

@@ -36,7 +36,7 @@ class NewSaleProcess @@ -36,7 +36,7 @@ class NewSaleProcess
36 } 36 }
37 37
38 // 处理Filter 38 // 处理Filter
39 - if(isset($products['filter'])) { 39 + if (isset($products['filter'])) {
40 $result['filter'] = ListProcess::getFilterData($products['filter']); 40 $result['filter'] = ListProcess::getFilterData($products['filter']);
41 } 41 }
42 42
@@ -50,15 +50,15 @@ class NewSaleProcess @@ -50,15 +50,15 @@ class NewSaleProcess
50 return $result; 50 return $result;
51 } 51 }
52 52
53 - /**  
54 - * 处理热销排行榜数据  
55 - *  
56 - * @param array $products 接口传回的数据  
57 - * @param boolean $notab 是否传回tab数据  
58 - * @param int $limit 查询返回的最大限制数  
59 - * @param int $page 分页第几页  
60 - * @return array 处理之后的数据  
61 - */ 53 + /**
  54 + * 处理热销排行榜数据
  55 + *
  56 + * @param array $products 接口传回的数据
  57 + * @param boolean $notab 是否传回tab数据
  58 + * @param int $limit 查询返回的最大限制数
  59 + * @param int $page 分页第几页
  60 + * @return array 处理之后的数据
  61 + */
62 public static function topData($products, $notab, $limit, $page) 62 public static function topData($products, $notab, $limit, $page)
63 { 63 {
64 $result = array(); 64 $result = array();
@@ -80,21 +80,21 @@ class NewSaleProcess @@ -80,21 +80,21 @@ class NewSaleProcess
80 // 处理商品 80 // 处理商品
81 if (isset($products['product_list'])) { 81 if (isset($products['product_list'])) {
82 82
83 - $count = count($products['product_list']);  
84 - $one = array(); 83 + $count = count($products['product_list']);
  84 + $one = array();
85 foreach ($products['product_list'] as $key => $single) { 85 foreach ($products['product_list'] as $key => $single) {
86 - if (!isset($single['goods_list'])) {  
87 - continue;  
88 - } 86 + if (!isset($single['goods_list'])) {
  87 + continue;
  88 + }
89 89
90 - // 重置键值  
91 - $single['goods_list'] = array_values($single['goods_list']); 90 + // 重置键值
  91 + $single['goods_list'] = array_values($single['goods_list']);
92 92
93 $one = Helpers::formatProduct($single, true, false, false, 75, 114); 93 $one = Helpers::formatProduct($single, true, false, false, 75, 114);
94 - $one['rank'] = $limit * ($page -1) + $key + 1;  
95 - !empty($single['sales_phrase']) && $one['sales_phrase'] = $single['sales_phrase']; 94 + $one['rank'] = $limit * ($page - 1) + $key + 1;
  95 + !empty($single['sales_phrase']) && $one['sales_phrase'] = $single['sales_phrase'];
96 96
97 - $result['goods'][] = $one; 97 + $result['goods'][] = $one;
98 } 98 }
99 } 99 }
100 100