...
|
...
|
@@ -43,6 +43,7 @@ const helpers = { |
|
|
},
|
|
|
|
|
|
colorConvert(colors) {
|
|
|
if (colors) {
|
|
|
return colors.map((c) => {
|
|
|
return {
|
|
|
id: c.colorId,
|
...
|
...
|
@@ -50,6 +51,9 @@ const helpers = { |
|
|
rgb: c.colorValue ? `url(${c.colorValue})` : '#' + c.colorCode
|
|
|
};
|
|
|
});
|
|
|
} else {
|
|
|
return [];
|
|
|
}
|
|
|
},
|
|
|
|
|
|
getChannelNav() {
|
...
|
...
|
@@ -119,6 +123,7 @@ const helpers = { |
|
|
|
|
|
let matchPrice = false;
|
|
|
|
|
|
if (priceRange) {
|
|
|
priceRange = Object.keys(priceRange).map((k) => {
|
|
|
let prices = k.split(',');
|
|
|
let p = {
|
...
|
...
|
@@ -129,6 +134,7 @@ const helpers = { |
|
|
if (k === q.price) {
|
|
|
p.checked = true;
|
|
|
matchPrice = true;
|
|
|
filters.push(this.newFilter('price', q.price, `¥${prices[0]}-¥${prices[1]}`));
|
|
|
}
|
|
|
return p;
|
|
|
}).sort((a, b) => {
|
...
|
...
|
@@ -137,14 +143,23 @@ const helpers = { |
|
|
|
|
|
if (!matchPrice && q.price) {
|
|
|
let prices = q.price.split(',');
|
|
|
let priceTxt = `¥${prices[0]}-¥${prices[1]}`;
|
|
|
|
|
|
filters.push(this.newFilter('price', q.price, `¥${prices[0]}-¥${prices[1]}`));
|
|
|
customPriceLow = prices[0];
|
|
|
customPriceHigh = prices[1];
|
|
|
|
|
|
if (prices[1] === Number.MAX_SAFE_INTEGER.toString()) {
|
|
|
priceTxt = `大于¥${prices[0]}`;
|
|
|
customPriceHigh = '';
|
|
|
}
|
|
|
|
|
|
filters.push(this.newFilter('price', q.price, priceTxt));
|
|
|
|
|
|
}
|
|
|
}
|
|
|
|
|
|
|
|
|
if (!_.isArray(sizeInfo)) {
|
|
|
if (!_.isArray(sizeInfo) && sizeInfo) {
|
|
|
sizeInfo.checked = true;
|
|
|
sizeInfo = [sizeInfo];
|
|
|
}
|
...
|
...
|
@@ -197,6 +212,7 @@ const helpers = { |
|
|
customPriceLow: customPriceLow,
|
|
|
customPriceHigh: customPriceHigh,
|
|
|
showSize: !!q.sort,
|
|
|
showPrice: true,
|
|
|
nav: this.getSortNav(q.sort, sorts)
|
|
|
};
|
|
|
},
|
...
|
...
|
|