Showing
1 changed file
with
21 additions
and
36 deletions
@@ -48,21 +48,6 @@ class ShopModel | @@ -48,21 +48,6 @@ class ShopModel | ||
48 | $data['newArrivel']['navs'] = $list['new']; | 48 | $data['newArrivel']['navs'] = $list['new']; |
49 | } | 49 | } |
50 | break; | 50 | break; |
51 | - case 'brandBrowse': | ||
52 | - $data['brandBrowse'] = array('title' => '品牌集合', 'list'=> $list); | ||
53 | - break; | ||
54 | - case 'recommend': | ||
55 | - $data['recommend'] = array( | ||
56 | - 'title' => isset($list[0]['title']) ? $list[0]['title'] : '经典推荐', | ||
57 | - 'list'=> $list | ||
58 | - ); | ||
59 | - break; | ||
60 | - case 'hotRecommend': | ||
61 | - $data['hotRecommend'] = array( | ||
62 | - 'title' => isset($list[0]['title']) ? $list[0]['title'] : '热销推荐', | ||
63 | - 'list'=> $list | ||
64 | - ); | ||
65 | - break; | ||
66 | default : | 51 | default : |
67 | $data[$fun] = $list; | 52 | $data[$fun] = $list; |
68 | } | 53 | } |
@@ -148,21 +133,6 @@ class ShopModel | @@ -148,21 +133,6 @@ class ShopModel | ||
148 | $data['newArrivel']['navs'] = $list['new']; | 133 | $data['newArrivel']['navs'] = $list['new']; |
149 | } | 134 | } |
150 | break; | 135 | break; |
151 | - case 'brandBrowse': | ||
152 | - $data['brandBrowse'] = array('title' => '品牌集合', 'list'=> $list); | ||
153 | - break; | ||
154 | - case 'recommend': | ||
155 | - $data['recommend'] = array( | ||
156 | - 'title' => isset($list[0]['title']) ? $list[0]['title'] : '经典推荐', | ||
157 | - 'list'=> $list | ||
158 | - ); | ||
159 | - break; | ||
160 | - case 'hotRecommend': | ||
161 | - $data['hotRecommend'] = array( | ||
162 | - 'title' => isset($list[0]['title']) ? $list[0]['title'] : '热销推荐', | ||
163 | - 'list'=> $list | ||
164 | - ); | ||
165 | - break; | ||
166 | default : | 136 | default : |
167 | $data[$fun] = $list; | 137 | $data[$fun] = $list; |
168 | } | 138 | } |
@@ -399,8 +369,14 @@ class ShopModel | @@ -399,8 +369,14 @@ class ShopModel | ||
399 | 'url'=> $resource['url'], | 369 | 'url'=> $resource['url'], |
400 | ); | 370 | ); |
401 | } | 371 | } |
402 | - | ||
403 | - return $result; | 372 | + if (empty($result)) { |
373 | + return $result; | ||
374 | + } | ||
375 | + | ||
376 | + return array( | ||
377 | + 'title' => isset($result[0]['title']) ? $result[0]['title'] : '经典推荐', | ||
378 | + 'list'=> $result | ||
379 | + ); | ||
404 | } | 380 | } |
405 | 381 | ||
406 | /** | 382 | /** |
@@ -419,8 +395,14 @@ class ShopModel | @@ -419,8 +395,14 @@ class ShopModel | ||
419 | 'url'=> $resource['url'], | 395 | 'url'=> $resource['url'], |
420 | ); | 396 | ); |
421 | } | 397 | } |
422 | - | ||
423 | - return $result; | 398 | + if (empty($result)) { |
399 | + return $result; | ||
400 | + } | ||
401 | + | ||
402 | + return array( | ||
403 | + 'title' => isset($result[0]['title']) ? $result[0]['title'] : '热销推荐', | ||
404 | + 'list'=> $result | ||
405 | + ); | ||
424 | } | 406 | } |
425 | 407 | ||
426 | /** | 408 | /** |
@@ -475,8 +457,8 @@ class ShopModel | @@ -475,8 +457,8 @@ class ShopModel | ||
475 | 'cur' => ($brand === strval($resource['id'])) | 457 | 'cur' => ($brand === strval($resource['id'])) |
476 | ); | 458 | ); |
477 | } | 459 | } |
478 | - | ||
479 | - return $result; | 460 | + |
461 | + return array('title' => '品牌集合', 'list'=> $result); | ||
480 | } | 462 | } |
481 | /** | 463 | /** |
482 | * 商品标签栏 | 464 | * 商品标签栏 |
@@ -612,6 +594,9 @@ class ShopModel | @@ -612,6 +594,9 @@ class ShopModel | ||
612 | public static function getArticle($tag = '') | 594 | public static function getArticle($tag = '') |
613 | { | 595 | { |
614 | $result = array(); | 596 | $result = array(); |
597 | + if (empty($tag)) { | ||
598 | + return $result; | ||
599 | + } | ||
615 | 600 | ||
616 | $article = GuangListData::article('1,2,3', 0, 0, '', 0, $tag, '', 3); | 601 | $article = GuangListData::article('1,2,3', 0, 0, '', 0, $tag, '', 3); |
617 | if (empty($article['data']['list']['artList'])) { | 602 | if (empty($article['data']['list']['artList'])) { |
-
Please register or login to post a comment