From b95243c8f8270d13c46945d4f298f6e9ce1ebaef Mon Sep 17 00:00:00 2001
From: cheng <545895878@qq.com>
Date: Tue, 14 Jul 2026 23:27:23 +0800
Subject: [PATCH] =?UTF-8?q?docs(api):=20=E6=9B=B4=E6=96=B0API=E6=8E=A5?=
=?UTF-8?q?=E5=8F=A3=E6=96=87=E6=A1=A3=E5=B9=B6=E8=B0=83=E6=95=B4=E5=BA=94?=
=?UTF-8?q?=E7=94=A8=E9=85=8D=E7=BD=AE?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
- 添加完整的后端接口文档,包含用户、打卡记录、统计等模块
- 修复应用名称从"喝酒了么"统一更正为"喝了么"
- 重构App.vue中的启动逻辑,增加数据迁移和路由守卫功能
- 调整DrinkCalendar组件的UI间距和尺寸参数
- 优化DrinkCard组件的品牌展示文案
- 修改manifest.json中的应用描述和微信小程序配置
- 调整pages.json中的页面路径顺序和tabBar配置
- 更新全局样式文件中的应用名称标识
- 修改mock数据中的用户头像默认值
- 优化卡片导出功能的绘制逻辑和视觉效果
---
App.vue | 37 +-
common/constants.js | 2 +-
common/mock-data.js | 6 +-
common/utils.js | 2 +-
components/DrinkCalendar.vue | 22 +-
components/DrinkCard.vue | 2 +-
docs/API接口文档.md | 700 +++++++++++++++++++++++++++
manifest.json | 95 +---
pages.json | 49 +-
pages/card/card.vue | 223 +++++----
pages/index/index.vue | 168 +++----
pages/login/login.vue | 328 ++++++++++++-
pages/profile/profile.vue | 141 +++---
static/tab-home-active.png | Bin 0 -> 313 bytes
static/tab-home.png | Bin 0 -> 310 bytes
static/tab-profile-active.png | Bin 0 -> 312 bytes
static/tab-profile.png | Bin 0 -> 310 bytes
uni.scss | 2 +-
uniCloud-aliyun/database/JQL查询.jql | 12 -
19 files changed, 1364 insertions(+), 425 deletions(-)
create mode 100644 docs/API接口文档.md
create mode 100644 static/tab-home-active.png
create mode 100644 static/tab-home.png
create mode 100644 static/tab-profile-active.png
create mode 100644 static/tab-profile.png
delete mode 100644 uniCloud-aliyun/database/JQL查询.jql
diff --git a/App.vue b/App.vue
index ff6781c..1b36693 100644
--- a/App.vue
+++ b/App.vue
@@ -1,7 +1,7 @@
diff --git a/pages/profile/profile.vue b/pages/profile/profile.vue
index 2d67788..42e55c6 100644
--- a/pages/profile/profile.vue
+++ b/pages/profile/profile.vue
@@ -3,7 +3,10 @@
@@ -73,26 +76,19 @@
ℹ️
- 关于喝酒了么
+ 关于喝了么
›
-
-
-
- 🏠
- 首页
-
-
-
- +
-
-
-
- 👤
- 我的
-
+
+
+
+
@@ -124,7 +120,8 @@ export default {
stats: {},
achievementList: [],
showDetail: false,
- detailAchievement: {}
+ detailAchievement: {},
+ isGuest: false
}
},
computed: {
@@ -135,6 +132,7 @@ export default {
}
},
onShow() {
+ this.checkLoginState()
this.loadData()
},
methods: {
@@ -152,13 +150,38 @@ export default {
uni.showToast({ title: `${name}即将上线`, icon: 'none' })
},
goHome() {
- uni.reLaunch({ url: '/pages/index/index' })
+ uni.switchTab({ url: '/pages/index/index' })
},
goRecord() {
uni.navigateTo({ url: '/pages/record/record' })
},
- goProfile() {
- // 已在个人页面
+ checkLoginState() {
+ const isLoggedIn = uni.getStorageSync('is_logged_in')
+ const isGuest = uni.getStorageSync('is_guest')
+ if (!isLoggedIn || isLoggedIn !== 'true') {
+ uni.reLaunch({ url: '/pages/login/login' })
+ return
+ }
+ this.isGuest = isGuest === 'true'
+ },
+ handleLogout() {
+ uni.showModal({
+ title: '退出登录',
+ content: '退出后本地数据将保留,重新登录后可同步',
+ confirmText: '退出',
+ confirmColor: '#FF6B6B',
+ success: (res) => {
+ if (res.confirm) {
+ uni.removeStorageSync('is_logged_in')
+ uni.removeStorageSync('is_guest')
+ uni.removeStorageSync('user_info')
+ uni.reLaunch({ url: '/pages/login/login' })
+ }
+ }
+ })
+ },
+ goLogin() {
+ uni.navigateTo({ url: '/pages/login/login' })
}
}
}
@@ -167,7 +190,7 @@ export default {