...
|
...
|
@@ -2,6 +2,10 @@ |
|
|
use Action\WebAction;
|
|
|
use LibModels\Web\Product\BrandData;
|
|
|
|
|
|
use LibModels\Web\Product\HotrankData;
|
|
|
use product\HotrankModel;
|
|
|
use LibModels\Web\Home\IndexData;
|
|
|
|
|
|
class IndexController extends WebAction
|
|
|
{
|
|
|
/**
|
...
|
...
|
@@ -47,5 +51,240 @@ class IndexController extends WebAction |
|
|
//渲染模板
|
|
|
$this->_view->display('list',$data);
|
|
|
}
|
|
|
|
|
|
public function hotrankAction() {
|
|
|
$this->setWebNavHeader(\Index\HomeModel::COOKIE_NAME_LIFESTYLE);
|
|
|
$data = array(
|
|
|
'hotrankPage' => true,
|
|
|
'hotrank' => array(
|
|
|
array(
|
|
|
'slide' => array(
|
|
|
'list' => array(
|
|
|
array(
|
|
|
'href' => '/?gender=1,3',
|
|
|
'img' => 'http://img10.static.yhbimg.com/taobaocms/2015/11/26/12/01c3b99f554ad50d9e5a9900719715c94c.jpg'
|
|
|
),
|
|
|
array(
|
|
|
'href' => '/?gender=1,3',
|
|
|
'img' => 'http://img12.static.yhbimg.com/taobaocms/2015/11/27/09/02a4f1c10e1e81574520e5c0239741a076.jpg'
|
|
|
),
|
|
|
array(
|
|
|
'href' => '/?gender=1,3',
|
|
|
'img' => 'http://img10.static.yhbimg.com/taobaocms/2015/11/26/12/01c3b99f554ad50d9e5a9900719715c94c.jpg'
|
|
|
),
|
|
|
array(
|
|
|
'href' => '/?gender=1,3',
|
|
|
'img' => 'http://img12.static.yhbimg.com/taobaocms/2015/11/27/09/02a4f1c10e1e81574520e5c0239741a076.jpg'
|
|
|
),
|
|
|
array(
|
|
|
'href' => '/?gender=1,3',
|
|
|
'img' => 'http://img10.static.yhbimg.com/taobaocms/2015/11/26/12/01c3b99f554ad50d9e5a9900719715c94c.jpg'
|
|
|
),
|
|
|
array(
|
|
|
'href' => '/?gender=1,3',
|
|
|
'img' => 'http://img12.static.yhbimg.com/taobaocms/2015/11/27/09/02a4f1c10e1e81574520e5c0239741a076.jpg'
|
|
|
),
|
|
|
array(
|
|
|
'href' => '/?gender=1,3',
|
|
|
'img' => 'http://img10.static.yhbimg.com/taobaocms/2015/11/26/12/01c3b99f554ad50d9e5a9900719715c94c.jpg'
|
|
|
),
|
|
|
array(
|
|
|
'href' => '/?gender=1,3',
|
|
|
'img' => 'http://img12.static.yhbimg.com/taobaocms/2015/11/27/09/02a4f1c10e1e81574520e5c0239741a076.jpg'
|
|
|
)
|
|
|
)
|
|
|
)
|
|
|
),
|
|
|
array(
|
|
|
'popular' => array(
|
|
|
'name' => '人气单品',
|
|
|
'list' => array(
|
|
|
array(
|
|
|
'href' => '',
|
|
|
'img' => 'http://img13.static.yhbimg.com/goodsimg/2014/09/16/07/027e03e45e3e88db0adbf6255671546a0b.jpg?imageMogr2/thumbnail/378x504/extent/378x504/background/d2hpdGU=/position/center/quality/90',
|
|
|
'title' => 'YYYOHOOD 黄伟文Wyman X yohood联名商品 圆领卫衣',
|
|
|
'price' => '399',
|
|
|
'sPrice' => '199',
|
|
|
'rank' => '1'
|
|
|
),
|
|
|
array(
|
|
|
'href' => '',
|
|
|
'img' => 'http://img13.static.yhbimg.com/goodsimg/2014/09/16/07/027e03e45e3e88db0adbf6255671546a0b.jpg?imageMogr2/thumbnail/378x504/extent/378x504/background/d2hpdGU=/position/center/quality/90',
|
|
|
'title' => 'YYYOHOOD 黄伟文Wyman X yohood联名商品 圆领卫衣',
|
|
|
'price' => '399',
|
|
|
'sPrice' => '199',
|
|
|
'rank' => '2'
|
|
|
),
|
|
|
array(
|
|
|
'href' => '',
|
|
|
'img' => 'http://img13.static.yhbimg.com/goodsimg/2014/09/16/07/027e03e45e3e88db0adbf6255671546a0b.jpg?imageMogr2/thumbnail/378x504/extent/378x504/background/d2hpdGU=/position/center/quality/90',
|
|
|
'title' => 'YYYOHOOD 黄伟文Wyman X yohood联名商品 圆领卫衣',
|
|
|
'price' => '399',
|
|
|
'sPrice' => '199',
|
|
|
'rank' => '3'
|
|
|
),
|
|
|
array(
|
|
|
'href' => '',
|
|
|
'img' => 'http://img13.static.yhbimg.com/goodsimg/2014/09/16/07/027e03e45e3e88db0adbf6255671546a0b.jpg?imageMogr2/thumbnail/378x504/extent/378x504/background/d2hpdGU=/position/center/quality/90',
|
|
|
'title' => 'YYYOHOOD 黄伟文Wyman X yohood联名商品 圆领卫衣',
|
|
|
'price' => '399',
|
|
|
'sPrice' => '199',
|
|
|
'rank' => '4'
|
|
|
),
|
|
|
array(
|
|
|
'href' => '',
|
|
|
'img' => 'http://img13.static.yhbimg.com/goodsimg/2014/09/16/07/027e03e45e3e88db0adbf6255671546a0b.jpg?imageMogr2/thumbnail/378x504/extent/378x504/background/d2hpdGU=/position/center/quality/90',
|
|
|
'title' => 'YYYOHOOD 黄伟文Wyman X yohood联名商品 圆领卫衣',
|
|
|
'price' => '399',
|
|
|
'sPrice' => '199',
|
|
|
'rank' => '5'
|
|
|
),
|
|
|
array(
|
|
|
'href' => '',
|
|
|
'img' => 'http://img13.static.yhbimg.com/goodsimg/2014/09/16/07/027e03e45e3e88db0adbf6255671546a0b.jpg?imageMogr2/thumbnail/378x504/extent/378x504/background/d2hpdGU=/position/center/quality/90',
|
|
|
'title' => 'YYYOHOOD 黄伟文Wyman X yohood联名商品 圆领卫衣',
|
|
|
'price' => '399',
|
|
|
'sPrice' => '199',
|
|
|
'rank' => '6'
|
|
|
),
|
|
|
array(
|
|
|
'href' => '',
|
|
|
'img' => 'http://img13.static.yhbimg.com/goodsimg/2014/09/16/07/027e03e45e3e88db0adbf6255671546a0b.jpg?imageMogr2/thumbnail/378x504/extent/378x504/background/d2hpdGU=/position/center/quality/90',
|
|
|
'title' => 'YYYOHOOD 黄伟文Wyman X yohood联名商品 圆领卫衣',
|
|
|
'price' => '399',
|
|
|
'sPrice' => '199',
|
|
|
'rank' => '7'
|
|
|
),
|
|
|
array(
|
|
|
'href' => '',
|
|
|
'img' => 'http://img13.static.yhbimg.com/goodsimg/2014/09/16/07/027e03e45e3e88db0adbf6255671546a0b.jpg?imageMogr2/thumbnail/378x504/extent/378x504/background/d2hpdGU=/position/center/quality/90',
|
|
|
'title' => 'YYYOHOOD 黄伟文Wyman X yohood联名商品 圆领卫衣',
|
|
|
'price' => '399',
|
|
|
'sPrice' => '199',
|
|
|
'rank' => '8'
|
|
|
),
|
|
|
array(
|
|
|
'href' => '',
|
|
|
'img' => 'http://img13.static.yhbimg.com/goodsimg/2014/09/16/07/027e03e45e3e88db0adbf6255671546a0b.jpg?imageMogr2/thumbnail/378x504/extent/378x504/background/d2hpdGU=/position/center/quality/90',
|
|
|
'title' => 'YYYOHOOD 黄伟文Wyman X yohood联名商品 圆领卫衣',
|
|
|
'price' => '399',
|
|
|
'sPrice' => '199',
|
|
|
'rank' => '9'
|
|
|
),
|
|
|
array(
|
|
|
'href' => '',
|
|
|
'img' => 'http://img13.static.yhbimg.com/goodsimg/2014/09/16/07/027e03e45e3e88db0adbf6255671546a0b.jpg?imageMogr2/thumbnail/378x504/extent/378x504/background/d2hpdGU=/position/center/quality/90',
|
|
|
'title' => 'YYYOHOOD 黄伟文Wyman X yohood联名商品 圆领卫衣',
|
|
|
'price' => '399',
|
|
|
'sPrice' => '199',
|
|
|
'rank' => '10'
|
|
|
)
|
|
|
)
|
|
|
|
|
|
)
|
|
|
),
|
|
|
array(
|
|
|
'hotBrands' => array(
|
|
|
'name' => '热门品牌',
|
|
|
)
|
|
|
),
|
|
|
array(
|
|
|
'hotWeek' => array(
|
|
|
'name' => '一周热卖',
|
|
|
'nav' => array(
|
|
|
array(
|
|
|
'textCn' => 'TOP100',
|
|
|
'url' => '',
|
|
|
'sid' => 1
|
|
|
),
|
|
|
array(
|
|
|
'textCn' => '上装',
|
|
|
'url' => '',
|
|
|
'sid' => 2
|
|
|
),
|
|
|
array(
|
|
|
'textCn' => '男生测试',
|
|
|
'url' => '',
|
|
|
'sid' => 3
|
|
|
),
|
|
|
array(
|
|
|
'textCn' => '配饰',
|
|
|
'url' => '',
|
|
|
'sid' => 4
|
|
|
)
|
|
|
),
|
|
|
'list' => array(
|
|
|
array(
|
|
|
'thumb' => 'http://img13.static.yhbimg.com/goodsimg/2015/11/24/10/020dce58a189f3fbfc071b3d5dc7ccc4e9.jpg?imageMogr2/thumbnail/280x373/extent/280x373/background/d2hpdGU=/position/center/quality/90',
|
|
|
'url' => 'http://item.yohobuy.com/product/pro_294497_377385.html',
|
|
|
'name' => 'MARtube马克图布 暖手宝移动电源萌兔',
|
|
|
'marketPrice' => '109',
|
|
|
'salePrice' => '129'
|
|
|
),
|
|
|
array(
|
|
|
'thumb' => 'http://img13.static.yhbimg.com/goodsimg/2015/11/24/10/020dce58a189f3fbfc071b3d5dc7ccc4e9.jpg?imageMogr2/thumbnail/280x373/extent/280x373/background/d2hpdGU=/position/center/quality/90',
|
|
|
'url' => 'http://item.yohobuy.com/product/pro_294497_377385.html',
|
|
|
'name' => 'MARtube马克图布 暖手宝移动电源萌兔',
|
|
|
'marketPrice' => '109',
|
|
|
'salePrice' => '129'
|
|
|
),
|
|
|
array(
|
|
|
'thumb' => 'http://img13.static.yhbimg.com/goodsimg/2015/11/24/10/020dce58a189f3fbfc071b3d5dc7ccc4e9.jpg?imageMogr2/thumbnail/280x373/extent/280x373/background/d2hpdGU=/position/center/quality/90',
|
|
|
'url' => 'http://item.yohobuy.com/product/pro_294497_377385.html',
|
|
|
'name' => 'MARtube马克图布 暖手宝移动电源萌兔',
|
|
|
'marketPrice' => '109',
|
|
|
'salePrice' => '129'
|
|
|
),
|
|
|
array(
|
|
|
'thumb' => 'http://img13.static.yhbimg.com/goodsimg/2015/11/24/10/020dce58a189f3fbfc071b3d5dc7ccc4e9.jpg?imageMogr2/thumbnail/280x373/extent/280x373/background/d2hpdGU=/position/center/quality/90',
|
|
|
'url' => 'http://item.yohobuy.com/product/pro_294497_377385.html',
|
|
|
'name' => 'MARtube马克图布 暖手宝移动电源萌兔',
|
|
|
'marketPrice' => '109',
|
|
|
'salePrice' => '129'
|
|
|
),
|
|
|
array(
|
|
|
'thumb' => 'http://img13.static.yhbimg.com/goodsimg/2015/11/24/10/020dce58a189f3fbfc071b3d5dc7ccc4e9.jpg?imageMogr2/thumbnail/280x373/extent/280x373/background/d2hpdGU=/position/center/quality/90',
|
|
|
'url' => 'http://item.yohobuy.com/product/pro_294497_377385.html',
|
|
|
'name' => 'MARtube马克图布 暖手宝移动电源萌兔',
|
|
|
'marketPrice' => '109',
|
|
|
'salePrice' => '129'
|
|
|
),
|
|
|
array(
|
|
|
'thumb' => 'http://img13.static.yhbimg.com/goodsimg/2015/11/24/10/020dce58a189f3fbfc071b3d5dc7ccc4e9.jpg?imageMogr2/thumbnail/280x373/extent/280x373/background/d2hpdGU=/position/center/quality/90',
|
|
|
'url' => 'http://item.yohobuy.com/product/pro_294497_377385.html',
|
|
|
'name' => 'MARtube马克图布 暖手宝移动电源萌兔',
|
|
|
'marketPrice' => '109',
|
|
|
'salePrice' => '129'
|
|
|
),
|
|
|
)
|
|
|
)
|
|
|
)
|
|
|
)
|
|
|
);
|
|
|
$data = array( 'hotrankPage' => true,
|
|
|
'footerTop'=> true,
|
|
|
'hotrank' => array()
|
|
|
);
|
|
|
//焦点图 热门品牌
|
|
|
$focus = \Index\HomeModel::getChannelResource('lifestyle', 'd131aba83a84a6977eee3a7403a713de');
|
|
|
//print_r($focus);
|
|
|
$data['hotrank']['slide'] = $focus[0]['slide'];
|
|
|
$data['hotrank']['hotBrands'] = $focus[1]['hotBrands'];
|
|
|
|
|
|
//人气单品 一周热卖
|
|
|
$page = 1;
|
|
|
$param = array('order'=>'s_n_desc','viewNum'=>60,'page'=>1,'stocknumber'=>1,'status'=>1,'gender'=>'','attribute_not'=>2);
|
|
|
$publiclist = \product\HotrankModel::getSearchData($param,$page);
|
|
|
$data['hotrank']['popular'] = $publiclist['popular'];
|
|
|
$data['hotrank']['hotWeek'] = $publiclist['hotWeek'];
|
|
|
//print_r($publiclist);
|
|
|
|
|
|
//分类标签
|
|
|
$classes = array('gender' => 2);
|
|
|
$nav = \product\HotrankModel::getHotranktag($classes);
|
|
|
$data['hotrank']['hotWeek']['nav'] = $nav;
|
|
|
//print_r($data);
|
|
|
$this->_view->display('hotrank', $data);
|
|
|
}
|
|
|
}
|
|
|
?> |
|
|
\ No newline at end of file |
...
|
...
|
|