Authored by yangyang

加skn三个统计代码

... ... @@ -11,13 +11,25 @@ class SearchController extends WebAction
$this->setWebNavHeader();
$list = SearchModel::searchData(array(), array(
'controller' => 'Search',
'action' => 'index',
'reviewNum' => 7, //浏览记录数
));
//统计前三个商品
$skn=array();
if (isset($list['goods']) && !empty($list['goods'])) {
$arr = array_slice($list['goods'],0,3);
foreach ($arr as $key=>$value) {
$skn[] = $value['skn'];
}
}
$data = array(
'productListPage' => true, //初始化js
'list' => SearchModel::searchData(array(), array(
'controller' => 'Search',
'action' => 'index',
'reviewNum' => 7, //浏览记录数
))
'list' => $list,
'skn' => $skn
);
$data['list']['searchPage'] = true; //设置搜素页面标识,区分列表页-->特有的搜索页导航样式
if (isset($data['list']['goods']) && empty($data['list']['goods'])) {
... ...