Authored by hf

code review by fei.hong: do merge yang.yang and shaofeng.zhou fixes bugs codes

@@ -359,6 +359,7 @@ class SearchData @@ -359,6 +359,7 @@ class SearchData
359 's_n_desc' => 'sales_num:desc', 359 's_n_desc' => 'sales_num:desc',
360 'activities_id_desc' => 'activities.activity_id:desc', 360 'activities_id_desc' => 'activities.activity_id:desc',
361 'activities_id_asc' => 'activities.activity_id:asc', 361 'activities_id_asc' => 'activities.activity_id:asc',
  362 + 'brand_desc' => 'brand_weight:desc'
362 ); 363 );
363 $param = array(); 364 $param = array();
364 $param['status'] = 1; // 是否上架,1表示在架,2表示不在 365 $param['status'] = 1; // 是否上架,1表示在架,2表示不在
@@ -1413,35 +1413,11 @@ class HelperSearch @@ -1413,35 +1413,11 @@ class HelperSearch
1413 //组织静态资源数据格式 1413 //组织静态资源数据格式
1414 public static function getNodeContent($code) 1414 public static function getNodeContent($code)
1415 { 1415 {
1416 - $result = array();  
1417 $nodeContent = BrandData::getByNodeContent($code); //TODO异步 1416 $nodeContent = BrandData::getByNodeContent($code); //TODO异步
1418 1417
1419 if (isset($nodeContent['code']) && $nodeContent['code'] === 200) { 1418 if (isset($nodeContent['code']) && $nodeContent['code'] === 200) {
1420 - $result = array();  
1421 - //print_r($nodeContent['data']);  
1422 - $arr = explode('<br />', $nodeContent['data']);  
1423 - $arr = array_values($arr);  
1424 -  
1425 - $hrefPatten = "/<a href=[\'\"]?([^\'\" ]+).*?>/";  
1426 - $pattern = "/[img|IMG].*?src=['|\"](.*?(?:[.gif|.jpg]))['|\"].*?[\/]?>/";  
1427 - foreach($arr as $key => $value){  
1428 -  
1429 - preg_match($hrefPatten, $value, $href);  
1430 - preg_match($pattern, $value, $img);  
1431 - if (isset($href[1])) {  
1432 - $result[$key]['href'] = str_replace('&amp;', '&', $href[1]);  
1433 - }  
1434 - if (isset($img[1])) {  
1435 - if (strrchr($img[1], '.swf') == '.swf') {  
1436 - $result[$key]['isVedio'] = true;  
1437 - $result[$key]['src'] = $img[1];  
1438 - }else{  
1439 - $result[$key]['src'] = $img[1];  
1440 - }  
1441 - }  
1442 - }  
1443 1419
1444 - return $result; 1420 + return $nodeContent['data'];
1445 } 1421 }
1446 } 1422 }
1447 1423
@@ -88,4 +88,10 @@ @@ -88,4 +88,10 @@
88 {{/each}} 88 {{/each}}
89 </ul> 89 </ul>
90 {{/ picLink}} 90 {{/ picLink}}
  91 +
  92 + {{#if cardHtml}}
  93 + <div class="brand-card">
  94 + {{{cardHtml}}}
  95 + </div>
  96 + {{/if}}
91 {{/ leftContent}} 97 {{/ leftContent}}
@@ -33,7 +33,7 @@ class IndexController extends WebAction @@ -33,7 +33,7 @@ class IndexController extends WebAction
33 //传品牌ID参数 33 //传品牌ID参数
34 $condition = array(); 34 $condition = array();
35 $condition['brand'] = isset($result['brandId']) ? $result['brandId'] : ''; 35 $condition['brand'] = isset($result['brandId']) ? $result['brandId'] : '';
36 - 36 + $condition['order'] = 'brand_desc';
37 //品牌系列参数 37 //品牌系列参数
38 $condition['folder_id'] = $this->get('folder_id'); 38 $condition['folder_id'] = $this->get('folder_id');
39 39