feat(record): 实现啤酒品牌分组标签和搜索功能
- 为啤酒类别添加分组tab(全部/国产/国际/麦啤/精酿) - 实现啤酒品牌的两级筛选结构:分组tab + 组内品牌标签 - 添加啤酒品牌实时搜索功能,支持按名称和产品搜索 - 优化品牌标签显示逻辑,同品牌多产品时显示品牌·产品格式 - 添加搜索无结果提示信息 - 更新输入框占位符文字为"搜索或输入其他品牌" - 修复啤酒类别下不应显示"更多"按钮的问题 - 添加啤酒分组标签的样式和交互效果
This commit is contained in:
+43
-34
@@ -39,43 +39,43 @@ export const BRANDS = {
|
||||
],
|
||||
beer: [
|
||||
// 国产主流
|
||||
{ name: '青岛啤酒', product: '经典', degree: 4.3 },
|
||||
{ name: '青岛啤酒', product: '全麦白啤', degree: 4.7 },
|
||||
{ name: '青岛啤酒', product: '黑啤', degree: 5.5 },
|
||||
{ name: '雪花', product: '勇闯天涯', degree: 3.3 },
|
||||
{ name: '雪花', product: '纯生', degree: 3.6 },
|
||||
{ name: '雪花', product: 'superX', degree: 4.0 },
|
||||
{ name: '百威', product: '经典', degree: 5.0 },
|
||||
{ name: '百威', product: '锦兔', degree: 5.0 },
|
||||
{ name: '哈尔滨', product: '冰纯', degree: 4.5 },
|
||||
{ name: '哈尔滨', product: '小麦王', degree: 3.6 },
|
||||
{ name: '燕京', product: 'U8', degree: 2.5 },
|
||||
{ name: '燕京', product: '原浆白啤', degree: 4.8 },
|
||||
{ name: '乌苏', product: '大乌苏', degree: 4.0 },
|
||||
{ name: '珠江', product: '纯生', degree: 3.6 },
|
||||
{ name: '泰山', product: '7天原浆', degree: 4.7 },
|
||||
{ name: '青岛啤酒', product: '经典', degree: 4.3, group: 'domestic' },
|
||||
{ name: '青岛啤酒', product: '全麦白啤', degree: 4.7, group: 'domestic' },
|
||||
{ name: '青岛啤酒', product: '黑啤', degree: 5.5, group: 'domestic' },
|
||||
{ name: '雪花', product: '勇闯天涯', degree: 3.3, group: 'domestic' },
|
||||
{ name: '雪花', product: '纯生', degree: 3.6, group: 'domestic' },
|
||||
{ name: '雪花', product: 'superX', degree: 4.0, group: 'domestic' },
|
||||
{ name: '百威', product: '经典', degree: 5.0, group: 'domestic' },
|
||||
{ name: '百威', product: '锦兔', degree: 5.0, group: 'domestic' },
|
||||
{ name: '哈尔滨', product: '冰纯', degree: 4.5, group: 'domestic' },
|
||||
{ name: '哈尔滨', product: '小麦王', degree: 3.6, group: 'domestic' },
|
||||
{ name: '燕京', product: 'U8', degree: 2.5, group: 'domestic' },
|
||||
{ name: '燕京', product: '原浆白啤', degree: 4.8, group: 'domestic' },
|
||||
{ name: '乌苏', product: '大乌苏', degree: 4.0, group: 'domestic' },
|
||||
{ name: '珠江', product: '纯生', degree: 3.6, group: 'domestic' },
|
||||
{ name: '泰山', product: '7天原浆', degree: 4.7, group: 'domestic' },
|
||||
// 国际品牌
|
||||
{ name: '喜力', product: '星银', degree: 5.0 },
|
||||
{ name: '科罗娜', product: 'Extra', degree: 4.5 },
|
||||
{ name: '嘉士伯', product: '特醇', degree: 5.0 },
|
||||
{ name: '朝日', product: '超爽', degree: 5.0 },
|
||||
{ name: '麒麟', product: '一番榨', degree: 5.0 },
|
||||
{ name: '三得利', product: '高端麦芽', degree: 5.5 },
|
||||
{ name: '札幌', product: '黑标', degree: 5.0 },
|
||||
{ name: '虎牌', product: '经典', degree: 5.0 },
|
||||
{ name: '生力', product: '清爽', degree: 5.0 },
|
||||
{ name: '喜力', product: '星银', degree: 5.0, group: 'international' },
|
||||
{ name: '科罗娜', product: 'Extra', degree: 4.5, group: 'international' },
|
||||
{ name: '嘉士伯', product: '特醇', degree: 5.0, group: 'international' },
|
||||
{ name: '朝日', product: '超爽', degree: 5.0, group: 'international' },
|
||||
{ name: '麒麟', product: '一番榨', degree: 5.0, group: 'international' },
|
||||
{ name: '三得利', product: '高端麦芽', degree: 5.5, group: 'international' },
|
||||
{ name: '札幌', product: '黑标', degree: 5.0, group: 'international' },
|
||||
{ name: '虎牌', product: '经典', degree: 5.0, group: 'international' },
|
||||
{ name: '生力', product: '清爽', degree: 5.0, group: 'international' },
|
||||
// 德式/白啤
|
||||
{ name: '福佳', product: '白啤', degree: 4.9 },
|
||||
{ name: '1664', product: '白啤', degree: 5.0 },
|
||||
{ name: '柏龙', product: '小麦啤', degree: 5.5 },
|
||||
{ name: '艾丁格', product: '小麦啤', degree: 5.3 },
|
||||
{ name: '福佳', product: '白啤', degree: 4.9, group: 'wheat' },
|
||||
{ name: '1664', product: '白啤', degree: 5.0, group: 'wheat' },
|
||||
{ name: '柏龙', product: '小麦啤', degree: 5.5, group: 'wheat' },
|
||||
{ name: '艾丁格', product: '小麦啤', degree: 5.3, group: 'wheat' },
|
||||
// 精酿
|
||||
{ name: '鹅岛', product: 'IPA', degree: 5.9 },
|
||||
{ name: '熊猫精酿', product: '蜂蜜生姜艾尔', degree: 5.0 },
|
||||
{ name: '京A', product: '工人淡色艾尔', degree: 5.0 },
|
||||
{ name: '拳击猫', product: 'TKO IPA', degree: 6.5 },
|
||||
{ name: '高大师', product: '婴儿肥IPA', degree: 5.6 },
|
||||
{ name: '精酿', product: '自选', degree: 6.0 }
|
||||
{ name: '鹅岛', product: 'IPA', degree: 5.9, group: 'craft' },
|
||||
{ name: '熊猫精酿', product: '蜂蜜生姜艾尔', degree: 5.0, group: 'craft' },
|
||||
{ name: '京A', product: '工人淡色艾尔', degree: 5.0, group: 'craft' },
|
||||
{ name: '拳击猫', product: 'TKO IPA', degree: 6.5, group: 'craft' },
|
||||
{ name: '高大师', product: '婴儿肥IPA', degree: 5.6, group: 'craft' },
|
||||
{ name: '精酿', product: '自选', degree: 6.0, group: 'craft' }
|
||||
],
|
||||
wine: [
|
||||
{ name: '拉菲', product: '传奇', degree: 13 },
|
||||
@@ -122,6 +122,15 @@ export const BRANDS = {
|
||||
other: []
|
||||
}
|
||||
|
||||
// 啤酒品牌分组tab(record页两级结构:分组tab + 组内品牌标签)
|
||||
export const BEER_BRAND_GROUPS = [
|
||||
{ id: 'all', name: '全部' },
|
||||
{ id: 'domestic', name: '国产' },
|
||||
{ id: 'international', name: '国际' },
|
||||
{ id: 'wheat', name: '麦啤' },
|
||||
{ id: 'craft', name: '精酿' }
|
||||
]
|
||||
|
||||
// 配餐分类
|
||||
export const FOOD_CATEGORIES = [
|
||||
{ id: 'hotpot', name: '火锅', emoji: '🍲' },
|
||||
|
||||
Reference in New Issue
Block a user