...
|
...
|
@@ -61,6 +61,10 @@ const shop = { |
|
|
data.showEditorial = editorial && editorial.length === 3;
|
|
|
data.editorial = editorial;
|
|
|
|
|
|
_.forEach(editorial, (e) => {
|
|
|
e.title = e.title.length > 40 ? (e.title.substring(0, 40) + '...') : e.title;
|
|
|
});
|
|
|
|
|
|
if (productData && productData.code === 200 && productData.data) {
|
|
|
let ret = camelCase(productData.data);
|
|
|
|
...
|
...
|
@@ -89,9 +93,9 @@ const shop = { |
|
|
};
|
|
|
let nav = [DataHelper.getChannelNav()];
|
|
|
let domain = req.params.domain;
|
|
|
|
|
|
let uid = req.user.uid;
|
|
|
let q = req.query;
|
|
|
let hasBrand = !!q.brand;
|
|
|
|
|
|
q.order = q.order || 's_n_desc';
|
|
|
q.page = parseInt(q.page || 1, 10);
|
...
|
...
|
@@ -125,9 +129,11 @@ const shop = { |
|
|
let ret = camelCase(result.data);
|
|
|
|
|
|
if (ret.filter) {
|
|
|
delete q.brand;
|
|
|
if (!hasBrand) {
|
|
|
delete q.brand;
|
|
|
}
|
|
|
ret.filter.groupSort = DataHelper.sortConvert(allSort.data.sort);
|
|
|
data.filter = DataHelper.filterHandle(ret.filter, req.query);
|
|
|
data.filter = DataHelper.filterHandle(ret.filter, q);
|
|
|
data.filter.showPrice = ret.total > 10;
|
|
|
}
|
|
|
|
...
|
...
|
|