sauces.ts 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152
  1. import type { SauceCategoryConfig, SauceCategory } from '@/types'
  2. // 酱料分类配置
  3. export const sauceCategories: SauceCategoryConfig[] = [
  4. {
  5. id: 'spicy',
  6. name: '辣味酱料',
  7. description: '各种辣椒酱、辣油、麻辣酱料',
  8. icon: '🌶️',
  9. color: 'bg-red-500',
  10. examples: ['辣椒酱', '蒜蓉辣椒酱', '麻辣油', '韩式辣椒酱', '泰式甜辣酱']
  11. },
  12. {
  13. id: 'garlic',
  14. name: '蒜香酱料',
  15. description: '以大蒜为主的香味酱料',
  16. icon: '🧄',
  17. color: 'bg-green-500',
  18. examples: ['蒜蓉酱', '蒜泥白肉酱', '蒜香辣椒油', '黑蒜酱', '蒜蓉豆豉酱']
  19. },
  20. {
  21. id: 'sweet',
  22. name: '甜味酱料',
  23. description: '甜口酱料和果酱类',
  24. icon: '🍯',
  25. color: 'bg-yellow-500',
  26. examples: ['甜面酱', '海鲜酱', '糖醋酱', '蜂蜜芥末酱', '果酱']
  27. },
  28. {
  29. id: 'complex',
  30. name: '复合调味酱',
  31. description: '多种调料混合的复合酱料',
  32. icon: '🥄',
  33. color: 'bg-purple-500',
  34. examples: ['XO酱', '沙茶酱', '黑椒酱', '蘑菇酱', '咖喱酱']
  35. },
  36. {
  37. id: 'regional',
  38. name: '地方特色酱',
  39. description: '各地传统特色酱料',
  40. icon: '🏮',
  41. color: 'bg-orange-500',
  42. examples: ['郫县豆瓣酱', '老干妈', '柱候酱', '海天黄豆酱', '东北大酱']
  43. },
  44. {
  45. id: 'fusion',
  46. name: '创新融合酱',
  47. description: '现代创新和中西融合酱料',
  48. icon: '✨',
  49. color: 'bg-pink-500',
  50. examples: ['芝士酱', '牛油果酱', '芝麻酱', '花生酱', '创意调味酱']
  51. }
  52. ]
  53. // 使用场景配置
  54. export const useCaseOptions = [
  55. { id: 'noodles', name: '拌面', icon: '🍜' },
  56. { id: 'dipping', name: '蘸菜', icon: '🥢' },
  57. { id: 'cooking', name: '炒菜', icon: '🍳' },
  58. { id: 'bbq', name: '烧烤', icon: '🔥' },
  59. { id: 'hotpot', name: '火锅', icon: '🍲' }
  60. ]
  61. // 预设酱料模板
  62. export const sauceTemplates = [
  63. {
  64. name: '蒜蓉辣椒酱',
  65. category: 'spicy' as SauceCategory,
  66. tags: ['经典', '下饭', '万能'],
  67. spiceLevel: 4,
  68. sweetLevel: 1,
  69. saltLevel: 3,
  70. sourLevel: 1
  71. },
  72. {
  73. name: '甜面酱',
  74. category: 'sweet' as SauceCategory,
  75. tags: ['传统', '烤鸭', '甜口'],
  76. spiceLevel: 0,
  77. sweetLevel: 4,
  78. saltLevel: 2,
  79. sourLevel: 0
  80. },
  81. {
  82. name: 'XO酱',
  83. category: 'complex' as SauceCategory,
  84. tags: ['高级', '海鲜', '港式'],
  85. spiceLevel: 2,
  86. sweetLevel: 2,
  87. saltLevel: 4,
  88. sourLevel: 1
  89. },
  90. {
  91. name: '郫县豆瓣酱',
  92. category: 'regional' as SauceCategory,
  93. tags: ['川菜', '传统', '发酵'],
  94. spiceLevel: 3,
  95. sweetLevel: 1,
  96. saltLevel: 4,
  97. sourLevel: 2
  98. },
  99. {
  100. name: '蒜泥白肉酱',
  101. category: 'garlic' as SauceCategory,
  102. tags: ['川菜', '蒜香', '清爽'],
  103. spiceLevel: 1,
  104. sweetLevel: 1,
  105. saltLevel: 3,
  106. sourLevel: 3
  107. },
  108. {
  109. name: '芝麻花生酱',
  110. category: 'fusion' as SauceCategory,
  111. tags: ['创新', '香浓', '营养'],
  112. spiceLevel: 0,
  113. sweetLevel: 2,
  114. saltLevel: 2,
  115. sourLevel: 0
  116. }
  117. ]
  118. // 口味等级描述
  119. export const tasteDescriptions = {
  120. spice: ['不辣', '微辣', '中辣', '很辣', '超辣'],
  121. sweet: ['不甜', '微甜', '中甜', '很甜', '超甜'],
  122. salt: ['不咸', '微咸', '中咸', '很咸', '超咸'],
  123. sour: ['不酸', '微酸', '中酸', '很酸', '超酸']
  124. }
  125. // 难度等级描述
  126. export const difficultyDescriptions = {
  127. easy: { name: '简单', color: 'text-green-600', description: '新手友好,步骤简单' },
  128. medium: { name: '中等', color: 'text-yellow-600', description: '需要一定经验' },
  129. hard: { name: '困难', color: 'text-red-600', description: '需要丰富经验和技巧' }
  130. }
  131. // 获取分类配置
  132. export const getSauceCategoryById = (id: SauceCategory): SauceCategoryConfig | undefined => {
  133. return sauceCategories.find(category => category.id === id)
  134. }
  135. // 获取分类颜色
  136. export const getCategoryColor = (category: SauceCategory): string => {
  137. const config = getSauceCategoryById(category)
  138. return config?.color || 'bg-gray-500'
  139. }
  140. // 获取分类图标
  141. export const getCategoryIcon = (category: SauceCategory): string => {
  142. const config = getSauceCategoryById(category)
  143. return config?.icon || '🥄'
  144. }