feat(calendar): 更新日历接口并优化记录流程

- 将GetRecords接口替换为GetCalendar接口获取日历数据
- 重构首页日历数据显示逻辑,支持年月维度的数据获取
- 优化打卡记录流程,合并选酒和记量步骤为单一添加酒水步骤
- 移除登录页面的游客模式选项,简化首次启动逻辑
- 调整引导页逻辑,移除登录跳转改为直接进入首页
- 优化记录页面UI布局,添加状态栏安全距离适配
- 新增酒水列表管理功能,支持添加和删除已选酒水
- 更新依赖包HaveADrink至v1.0.3版本,同步API变更
This commit is contained in:
cg
2026-07-17 23:51:43 +08:00
parent a73bd79eb5
commit adf6b684b9
13 changed files with 520 additions and 451 deletions
+31 -6
View File
@@ -59,17 +59,12 @@ export default {
}
} catch (e) { /* ignore */ }
},
// 启动时检查登录与引导状态,决定跳转目标
// 启动时检查引导状态,决定跳转目标
checkLaunchRoute() {
const isFirst = uni.getStorageSync('is_first_launch')
const isLoggedIn = uni.getStorageSync('is_logged_in')
if (!isFirst || isFirst === 'true') {
// 首次使用 → 引导页
uni.reLaunch({ url: '/pages/onboarding/onboarding' })
} else if (!isLoggedIn || isLoggedIn !== 'true') {
// 未登录 → 登录页
uni.reLaunch({ url: '/pages/login/login' })
}
// 否则正常进入首页(index)
}
@@ -98,6 +93,7 @@ page {
background-color: $bg-base;
color: $text-primary;
padding-bottom: env(safe-area-inset-bottom);
box-sizing: border-box;
}
.card {
@@ -255,6 +251,35 @@ page {
}
}
/* 添加酒水按钮(Step 1 底部) */
.btn-add-drink {
background: linear-gradient(135deg, $amber, $amber-deep);
color: $text-on-amber;
font-size: $fs-md;
font-weight: $fw-bold;
padding: $sp-md $sp-xl;
border-radius: $radius-full;
border: none;
text-align: center;
box-shadow: $shadow-amber;
transition: all $duration-fast $ease-out;
display: flex;
align-items: center;
justify-content: center;
&:active {
transform: scale(0.97);
box-shadow: 0 4rpx 16rpx rgba(232, 168, 56, 0.2);
}
&[disabled] {
background: transparent;
color: $text-tertiary;
border: 2rpx solid var(--border-subtle, rgba(255, 255, 255, 0.10));
box-shadow: none;
}
}
.btn-text {
background: none;
border: none;