Authored by biao

update

... ... @@ -14,12 +14,12 @@ const renderData = {
exports.index = (req, res) => {
outletModel.getContent().then(result => {
res.render('outlet', Object.assign({}, renderData, result));
res.render('outlet', Object.assign(renderData, result));
});
};
exports.getGoodsList = (req, res) => {
var queryParam = req.query;
res.send(queryParam);
exports.activity = (req, res) => {
outletModel.getActivity().then(result => {
res.render('outlet/activity', Object.assign(renderData, result));
});
};
... ...
... ... @@ -91,6 +91,19 @@ const getGoodsList = () => {
});
};
const getActivityDetail = () => {
var params = {
method: 'app.outlet.activityGet',
limit: 50,
page: 1,
outlets: 1
};
return api.get('', sign.apiSign(params)).then(res => {
console.log(res);
});
};
exports.getContent = () => {
let floorsData = {};
... ... @@ -106,3 +119,8 @@ exports.getContent = () => {
return floorsData;
});
};
exports.getActivity = () => {
return getActivityDetail();
};
... ...
... ... @@ -35,7 +35,7 @@ router.get('/sale/search', sale.search);
router.get('/sale/filter', sale.filter);
router.get('/outlet', outlet.index);
router.get('/outlet/activity', outlet.activity);
// router.get('/outlet', sale.outlet);
module.exports = router;
... ...
... ... @@ -6,6 +6,4 @@
{{/data}}
</ul>
</nav>
{{# ../../goods}}
{{> product/sale/common}}
{{/ ../../goods}}
... ...
... ... @@ -4,7 +4,7 @@ var $ = require('yoho-jquery'),
require('./outlet/home');
// require('./sale/search');
require('./sale/search');
if ($('.swiper-container .swiper-slide').length > 1) {
new Swiper('.swiper-container', {
... ...