Authored by 王水玲

品类重构

... ... @@ -11,7 +11,7 @@ const searchModel = require(`${mRoot}/search`);
const _ = require('lodash');
const helpers = global.yoho.helpers;
// 搜索落地页
const list = (req, res, next) => {
let params = Object.assign({}, req.query);
let title = '';
... ... @@ -106,6 +106,22 @@ const list = (req, res, next) => {
}).catch(next);
};
// 分类落地页
const category = (req, res) => {
let params = Object.assign({}, req.query);
res.render('search/goods-list', {
module: 'product',
page: 'search-list',
pageHeader: headerModel.setNav({
navTitle: req.query.title
}),
goodList: params,
showDownloadApp: true,
pageFooter: true
});
};
const search = (req, res, next) => {
let params = Object.assign({}, req.query);
... ... @@ -138,5 +154,6 @@ let filter = (req, res, next) => {
module.exports = {
list,
filter,
search
search,
category
};
... ...
... ... @@ -58,5 +58,6 @@ router.get('/recommend-for-you/cart', recommendForYou.cart);
router.get('/search/list', search.list);
router.get('/search/filter', search.filter);
router.get('/search/search', search.search);
router.get('/index/index', search.category);
module.exports = router;
... ...
<div class="good-list-page yoho-page">
{{> search/list}}
</div>
... ...
... ... @@ -37,6 +37,7 @@
{{> footer}}
</div>
{{> download-app}}
{{#wechatShare}}
<script type="text/javascript" src="//res.wx.qq.com/open/js/jweixin-1.1.0.js"></script>
{{/wechatShare}}
... ...
{{#showDownloadApp}}
<div class="float-layer hide" id="float-layer-app">
<div class="float-layer-left">
<span class="yoho-icon iconfont">&#xe60d;</span>
<p>新用户送惊喜礼包</p>
</div>
<a href="javascript:void(0);" id="float-layer-close" >
<i class="close-icon iconfont">&#xe623;</i>
<div class="circle-rightbottom"></div>
</a>
<a href="javascript:void(0);" id="float-layer-btn">
立即下载
</a>
</div>
{{/showDownloadApp}}
\ No newline at end of file
... ...