...
|
...
|
@@ -28,10 +28,21 @@ class ListController extends WebAction |
|
|
$this->setListSeo($list['seo']);
|
|
|
/// 设置头部数据
|
|
|
$this->setWebNavHeader();
|
|
|
|
|
|
//统计前三个商品
|
|
|
$skn=array();
|
|
|
if (isset($list['goods']) && !empty($list['goods'])) {
|
|
|
$arr = array_slice($list['goods'],0,3);
|
|
|
foreach ($arr as $key=>$value) {
|
|
|
$skn[] = $value['skn'];
|
|
|
}
|
|
|
}
|
|
|
|
|
|
// 渲染模板
|
|
|
$this->_view->display('list', array(
|
|
|
'productListPage' => true, // JS控制初始化
|
|
|
'list' => $list,
|
|
|
'skn' => $skn
|
|
|
));
|
|
|
}
|
|
|
|
...
|
...
|
@@ -50,9 +61,20 @@ class ListController extends WebAction |
|
|
);
|
|
|
|
|
|
$newData = NewModel::getNewSearchData($condition, $options);
|
|
|
|
|
|
//统计前三个商品
|
|
|
$skn=array();
|
|
|
if (isset($newData['goods']) && !empty($newData['goods'])) {
|
|
|
$arr = array_slice($newData['goods'],0,3);
|
|
|
foreach ($arr as $key=>$value) {
|
|
|
$skn[] = $value['skn'];
|
|
|
}
|
|
|
}
|
|
|
|
|
|
$data = array(
|
|
|
'productListPage' => true,
|
|
|
'newSale' => $newData
|
|
|
'newSale' => $newData,
|
|
|
'skn' => $skn
|
|
|
);
|
|
|
// 设置SEO信息
|
|
|
$this->setNewSeo($newData['seo']);
|
...
|
...
|
@@ -77,10 +99,21 @@ class ListController extends WebAction |
|
|
$condition['p_d'] = '0.01,0.99';
|
|
|
}
|
|
|
$list = SearchModel::getListData($condition, $option);
|
|
|
|
|
|
//统计前三个商品
|
|
|
$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(
|
|
|
//初始化js
|
|
|
'brandPage' => true,
|
|
|
'list' => $list
|
|
|
'list' => $list,
|
|
|
'skn' => $skn
|
|
|
);
|
|
|
// 设置SEO信息
|
|
|
$this->setSaleSeo($list['seo']);
|
...
|
...
|
|