From bc6512f668b2604619dc06ca1fdcfd765bc76178 Mon Sep 17 00:00:00 2001
From: Cxx0822 <1556464090@qq.com>
Date: Tue, 1 Sep 2026 11:15:00 +0800
Subject: [PATCH] =?UTF-8?q?feat:=20=E5=A2=9E=E5=8A=A0=E4=B8=BB=E9=A2=98?=
=?UTF-8?q?=E8=89=B2=E5=8A=9F=E8=83=BD?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/App.vue | 17 +-
src/components/Profile/OverviewPopup.vue | 3 +-
src/components/Profile/ThemePopup.vue | 49 +++++
src/pages/index/index.vue | 196 +++++++++---------
src/pages/record/index.vue | 146 ++++++-------
src/pages/stats/index.vue | 5 +-
src/pages/user/index.vue | 107 +++++-----
src/store/app.ts | 1 +
src/store/profile.ts | 2 +
.../liu-drag-button/liu-drag-button.vue | 8 +-
src/utils/profile.ts | 9 +
src/utils/themes.ts | 72 +++++++
12 files changed, 386 insertions(+), 229 deletions(-)
create mode 100644 src/components/Profile/ThemePopup.vue
create mode 100644 src/utils/themes.ts
diff --git a/src/App.vue b/src/App.vue
index f84973b..8b31b05 100644
--- a/src/App.vue
+++ b/src/App.vue
@@ -6,8 +6,11 @@ import {
getPlan,
savePlan,
getDefaultRecordValue,
- saveDefaultRecordValue, getStats, saveStats
+ saveDefaultRecordValue, getStats, saveStats, getThemeColor, saveThemeColor
} from "@/utils/profile";
+import { useAppStore } from "@/store/app";
+
+const appStore = useAppStore();
onLaunch(() => {
if (!getDefaultRecordValue()) {
@@ -30,6 +33,10 @@ onLaunch(() => {
if (getStats().length === 0) {
saveStats(['weight', 'sleep', 'sport', 'bloodPressure', 'bloodSugar', 'temperature'])
}
+ if (!getThemeColor()) {
+ saveThemeColor('purple')
+ }
+ appStore.themeColor = getThemeColor();
console.log("App Launch");
});
onShow(() => {
@@ -40,11 +47,3 @@ onHide(() => {
});
-
diff --git a/src/components/Profile/OverviewPopup.vue b/src/components/Profile/OverviewPopup.vue
index d662391..1e92aaa 100644
--- a/src/components/Profile/OverviewPopup.vue
+++ b/src/components/Profile/OverviewPopup.vue
@@ -31,8 +31,7 @@
diff --git a/src/pages/index/index.vue b/src/pages/index/index.vue
index 3d75d92..864db6c 100644
--- a/src/pages/index/index.vue
+++ b/src/pages/index/index.vue
@@ -1,111 +1,114 @@
-
-
-
+
+
+
+
-
-
- {{ greeting }}
-
-
- {{ today }} · 记录每一次改变
-
+
+
+ {{ greeting }}
+
+
+ {{ today }} · 记录每一次改变
+
+
+
+
+ {{ hasSignedToday ? '已签到' : '签到'}}
+
-
- {{ hasSignedToday ? '已签到' : '签到'}}
-
-
-
-
-
-
-
-
- {{ item.icon }}
- {{ item.label }}
+
+
+
+
+
+ {{ item.icon }}
+ {{ item.label }}
+
+
-
+
+
+ {{ item.value }}
+
+
+
+ {{ item.sub }}
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ plan.icon }}
+ {{ plan.label }}
+
+
+
+ 已完成
+
+
+ 未完成
+
+
+
+
+
+
+
+
+
+
+
+ {{ item.category }}
+
+ {{ item.title }}
+
+
-
- {{ item.value }}
+
+ {{ item.summary }}
-
-
- {{ item.sub }}
-
-
-
+
-
-
-
+
-
-
-
- {{ plan.icon }}
- {{ plan.label }}
-
+
+
+
+
+
+
+
-
- 已完成
-
-
- 未完成
-
-
-
-
-
-
-
-
-
-
-
- {{ item.category }}
-
- {{ item.title }}
-
-
-
-
-
- {{ item.summary }}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+