...
|
...
|
@@ -9,7 +9,6 @@ const channels = { |
|
|
|
|
|
exports.productLst = function(req, res, next) {
|
|
|
let keys = ['sort', 'misort', 'msort', 'gender', 'brand'],
|
|
|
enumParam = {},
|
|
|
params = {
|
|
|
uid: req.query.uid,
|
|
|
udid: req.query.udid,
|
...
|
...
|
@@ -29,21 +28,17 @@ exports.productLst = function(req, res, next) { |
|
|
|
|
|
if (params.specified_sort) {
|
|
|
if (params.brand) {
|
|
|
enumParam.brands = params.brand.split(',');
|
|
|
params.limit = enumParam.brands.length;
|
|
|
params.limit = params.brand.split(',').length;
|
|
|
} else if (params.sort) {
|
|
|
enumParam.sorts = params.sort.split(',');
|
|
|
params.limit = enumParam.sorts.length;
|
|
|
params.limit = params.sort.split(',').length;
|
|
|
} else if (params.misort) {
|
|
|
enumParam.misorts = params.misort.split(',');
|
|
|
params.limit = enumParam.misorts.length;
|
|
|
params.limit = params.misort.split(',').length;
|
|
|
} else if (params.msort) {
|
|
|
enumParam.msorts = params.msort.split(',');
|
|
|
params.limit = enumParam.msorts.length;
|
|
|
params.limit = params.msort.split(',').length;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
model.productLst(params, enumParam).then((result) => {
|
|
|
model.productLst(params).then((result) => {
|
|
|
res.jsonp(result);
|
|
|
}).catch(next);
|
|
|
}; |
|
|
\ No newline at end of file |
...
|
...
|
|