Authored by 郭成尧

order-delete-content-code

... ... @@ -60,9 +60,12 @@ const newGoods = (req, res, next) => {
}).catch(next);
};
/**
* 重构的新品到着页面
*/
const _newGoods = (req, res, next) => {
const channel = req.yoho.channel;
const uid = req.user.uid;
let channel = req.yoho.channel;
let uid = req.user.uid;
newModel.indexData(uid, channel).then(result => {
let shopList = _.get(result, 'shop_list', []);
... ... @@ -152,11 +155,9 @@ const recommendShop = (req, res, next) => {
const channel = req.yoho.channel;
const uid = req.user.uid;
console.log(channel)
newModel.recommendShops(uid, channel).then(data => {
res.json(data);
});
}).catch(next);
};
... ...
... ... @@ -66,7 +66,6 @@ let searchView = function() {
* see: search-process.js
*/
let searchParams = {
order: 's_t_desc',
filter: {
},
page: {
... ... @@ -176,15 +175,16 @@ let searchView = function() {
}
function renderGoods($container, data) {
let html = goodsT({
goods: data
});
let html = '<p class="no-result">未找到相关搜索结果</p>';
if (data.length > 0) {
html = goodsT({
goods: data
});
}
$container.append(html);
lazyLoad(html);
return html;
... ...
... ... @@ -28,6 +28,16 @@ body {
.goods-container {
overflow: hidden;
.goods-box {
.no-result {
text-align: center;
vertical-align: middle;
color: #ccc;
font-size: 1.2em;
margin-top: 11rem;
}
}
}
.good-info {
... ...