diff --git a/pages/index/index.vue b/pages/index/index.vue
index bac8fe2..11b0208 100644
--- a/pages/index/index.vue
+++ b/pages/index/index.vue
@@ -21,11 +21,9 @@
就是纯瘾大
唤醒你的专属调酒师
-
-
-
-
- 🔐 员工入口
+
+ 🔐 员工入口
+
@@ -143,7 +141,7 @@ export default {
.btn-primary{width:440rpx;height:96rpx;border-radius:24rpx;background:linear-gradient(135deg,var(--gold-dark),var(--gold),var(--gold-light));color:#1A1A1A;border:none;font-size:32rpx;font-weight:800;display:flex;align-items:center;justify-content:center;box-shadow:0 8rpx 40rpx rgba(245,166,35,.35)}
/* 员工入口 */
-.staff-link{padding:4rpx 20rpx;text-align:center;flex-shrink:0}
+.staff-link{margin-top:24rpx;text-align:center}
.staff-link text{color:var(--text-muted);font-size:22rpx;letter-spacing:2rpx}
/* 号码牌弹窗 */
@@ -165,4 +163,3 @@ export default {
.card-divider{text-align:center;color:var(--text-muted);font-size:24rpx;margin:20rpx 0;position:relative}
.modal-footer{padding:0 36rpx 40rpx}
-
diff --git a/pages/menu/menu.vue b/pages/menu/menu.vue
index 8838478..1c0af47 100644
--- a/pages/menu/menu.vue
+++ b/pages/menu/menu.vue
@@ -27,7 +27,7 @@
- 🍷
+ 🍸
{{ cart.totalCount }}
@@ -92,15 +92,27 @@ export default {
try {
const res = await get(API.MENU_CATEGORIES)
if (Array.isArray(res)) {
- // 智能排序:全部 + 鸡尾酒优先,其余按后端顺序
- const cocktail = res.filter(c => c.includes('鸡尾酒'))
- const others = res.filter(c => !c.includes('鸡尾酒'))
- const sorted = ['all', ...cocktail, ...others]
+ // 智能排序:全部 + 鸡尾酒 + 限定特调 + 嗨棒 + 其他
+ const priority = ['鸡尾酒', '限定特调', '嗨棒']
+ const matched = []
+ const rest = []
+ for (const c of res) {
+ if (priority.some(k => c.includes(k))) matched.push(c)
+ else rest.push(c)
+ }
+ // 按 priority 顺序排列 matched
+ matched.sort((a, b) => {
+ const ai = priority.findIndex(k => a.includes(k))
+ const bi = priority.findIndex(k => b.includes(k))
+ return ai - bi
+ })
+ const sorted = ['all', ...matched, ...rest]
categories.value = sorted
// 默认选中鸡尾酒;没有则选全部
- if (cocktail.length > 0) {
- activeCate.value = cocktail[0]
- await loadProducts(cocktail[0])
+ const cocktail = sorted.find(c => c.includes('鸡尾酒'))
+ if (cocktail) {
+ activeCate.value = cocktail
+ await loadProducts(cocktail)
} else {
await loadProducts('all')
}
@@ -197,3 +209,4 @@ export default {
.cart-footer{padding:24rpx 40rpx 40rpx;flex-shrink:0}
.next-btn{width:100%;height:96rpx;border-radius:28rpx;background:linear-gradient(135deg,var(--orange),var(--red));color:#fff;border:none;font-size:32rpx;font-weight:800;box-shadow:0 8rpx 40rpx rgba(255,107,53,.35)}
+