feat(calendar): 更新日历接口并优化记录流程
- 将GetRecords接口替换为GetCalendar接口获取日历数据 - 重构首页日历数据显示逻辑,支持年月维度的数据获取 - 优化打卡记录流程,合并选酒和记量步骤为单一添加酒水步骤 - 移除登录页面的游客模式选项,简化首次启动逻辑 - 调整引导页逻辑,移除登录跳转改为直接进入首页 - 优化记录页面UI布局,添加状态栏安全距离适配 - 新增酒水列表管理功能,支持添加和删除已选酒水 - 更新依赖包HaveADrink至v1.0.3版本,同步API变更
This commit is contained in:
@@ -65,16 +65,6 @@
|
||||
<text class="login-btn-text">{{ loginLoading ? '登录中...' : '完成并进入' }}</text>
|
||||
</button>
|
||||
|
||||
<view class="login-divider">
|
||||
<view class="login-divider-line"></view>
|
||||
<text class="login-divider-text">或</text>
|
||||
<view class="login-divider-line"></view>
|
||||
</view>
|
||||
|
||||
<button class="btn-secondary" :disabled="loginLoading" @click="handleGuest">
|
||||
先看看再说
|
||||
</button>
|
||||
|
||||
<!-- 协议勾选 -->
|
||||
<view class="agreement-check" @click="agreed = !agreed">
|
||||
<view class="check-box" :class="{ 'check-box-active': agreed }">
|
||||
@@ -196,25 +186,6 @@ export default {
|
||||
})
|
||||
},
|
||||
|
||||
// ===== 游客模式 =====
|
||||
handleGuest() {
|
||||
if (this.loginLoading) return
|
||||
uni.setStorageSync('is_logged_in', 'true')
|
||||
uni.setStorageSync('is_guest', 'true')
|
||||
uni.setStorageSync('is_first_launch', 'false')
|
||||
// 游客也设置一个基础用户信息
|
||||
const guestInfo = {
|
||||
id: `guest_${Date.now()}`,
|
||||
nickname: '游客模式',
|
||||
avatar: '',
|
||||
isGuest: true,
|
||||
joinedAt: new Date().toISOString().slice(0, 10),
|
||||
preferences: null
|
||||
}
|
||||
uni.setStorageSync('user_info', JSON.stringify(guestInfo))
|
||||
uni.switchTab({ url: '/pages/index/index' })
|
||||
},
|
||||
|
||||
finishLogin() {
|
||||
uni.setStorageSync('is_logged_in', 'true')
|
||||
uni.setStorageSync('is_first_launch', 'false')
|
||||
@@ -441,23 +412,6 @@ export default {
|
||||
font-weight: $fw-bold;
|
||||
}
|
||||
|
||||
.login-divider {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: $sp-md;
|
||||
}
|
||||
|
||||
.login-divider-line {
|
||||
flex: 1;
|
||||
height: 2rpx;
|
||||
background: var(--bg-hover, rgba(255, 255, 255, 0.08));
|
||||
}
|
||||
|
||||
.login-divider-text {
|
||||
font-size: $fs-sm;
|
||||
color: $text-tertiary;
|
||||
}
|
||||
|
||||
/* 协议勾选 */
|
||||
.agreement-check {
|
||||
display: flex;
|
||||
|
||||
Reference in New Issue
Block a user