Authored by yyq

fix specialsale_id

... ... @@ -157,6 +157,8 @@ exports.special = (req, res, next) => {
let specialId = params.specialsale_id || params.specialsaleId, // 专区ID
promotion = params.promotion; // 促销ID
specialId = parseInt(`0${specialId}`, 10);
if (!specialId && !promotion) {
return next();
}
... ...
... ... @@ -268,8 +268,10 @@ function getBrands4Filter(params) {
delete params.callback;
}
if (params.specialsale_id) {
return this.saleApi.getSaleSpecialAsync(params.specialsale_id).then(special => {
const specialId = parseInt(`0${params.specialsale_id || ''}`, 10);
if (specialId) {
return this.saleApi.getSaleSpecialAsync(specialId).then(special => {
if (special && special.data) {
let data = special.data;
... ...