|
|
@ -103,9 +103,8 @@ export default { |
|
|
console.log('categories计算 - pricePreviewList:', list.length) |
|
|
console.log('categories计算 - pricePreviewList:', list.length) |
|
|
|
|
|
|
|
|
// 显示所有分类,不再根据订单数据筛选 |
|
|
// 显示所有分类,不再根据订单数据筛选 |
|
|
const allCategories = list.filter(item => item.pid === '0').sort((a, b) => a.sort - b.sort) |
|
|
|
|
|
console.log('categories计算 - allCategories:', allCategories.length) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const allCategories = list.sort((a, b) => a.sort - b.sort) |
|
|
|
|
|
// const allCategories = list.filter(item => item.pid === '0').sort((a, b) => a.sort - b.sort) |
|
|
// 为每个分类计算数量 |
|
|
// 为每个分类计算数量 |
|
|
const categoriesWithCount = allCategories.map(category => { |
|
|
const categoriesWithCount = allCategories.map(category => { |
|
|
const count = this.getCategoryItemCountDirect(category.id) |
|
|
const count = this.getCategoryItemCountDirect(category.id) |
|
|
|