|
|
|
@ -1583,8 +1583,14 @@ Page({ |
|
|
|
const updatedCategories = categories.map(category => { |
|
|
|
return category === '白壳' ? '土鸡蛋' : category; |
|
|
|
}); |
|
|
|
// 确保"全部"在第一位
|
|
|
|
if (!updatedCategories.includes('全部')) { |
|
|
|
updatedCategories.unshift('全部'); |
|
|
|
} |
|
|
|
// 去除重复项
|
|
|
|
const uniqueCategories = [...new Set(updatedCategories)]; |
|
|
|
this.setData({ |
|
|
|
categories: updatedCategories |
|
|
|
categories: uniqueCategories |
|
|
|
}); |
|
|
|
} |
|
|
|
}).catch(err => { |
|
|
|
|