...
|
...
|
@@ -78,7 +78,6 @@ const shop = { |
|
|
queryParams: req.query
|
|
|
};
|
|
|
data.products = DataHelper.handleProductList(ret.productList);
|
|
|
console.log(data);
|
|
|
res.display('shop-index', data);
|
|
|
} else {
|
|
|
shop.list(req, res, next);
|
...
|
...
|
@@ -100,7 +99,7 @@ const shop = { |
|
|
let uid = req.user.uid;
|
|
|
let shopId = req.query.shopId;
|
|
|
let q = req.query;
|
|
|
let hasBrand = !!q.brand;
|
|
|
// let hasBrand = !!q.brand;
|
|
|
|
|
|
q.order = q.order || 's_n_desc';
|
|
|
q.page = parseInt(q.page || 1, 10);
|
...
|
...
|
@@ -135,15 +134,14 @@ const shop = { |
|
|
let ret = camelCase(result.data);
|
|
|
|
|
|
if (ret.filter) {
|
|
|
if (!hasBrand) {
|
|
|
delete q.brand;
|
|
|
}
|
|
|
ret.filter.standard = ret.standard;
|
|
|
ret.filter.groupSort = DataHelper.sortConvert(allSort.data.sort);
|
|
|
ret.filter.singleBrand = true;
|
|
|
data.filter = DataHelper.filterHandle(ret.filter, q);
|
|
|
data.filter.showPrice = ret.total > 10;
|
|
|
data.filter.showInfo = (data.filter.style && data.filter.style.length > 0)
|
|
|
|| (ret.standard && ret.standard.length > 0); //eslint-disable-line
|
|
|
|
|
|
}
|
|
|
|
|
|
data.paginationData = {
|
...
|
...
|
|