feat: 增加删除记录功能

This commit is contained in:
2026-08-25 15:15:40 +08:00
parent e42d0854ec
commit 98d74918a0
11 changed files with 260 additions and 112 deletions

View File

@@ -2,12 +2,13 @@ import type { IProfile } from "@/type/profile";
const PROFILE_KEY = 'user_profile'
const OVERVIEW_KEY = 'user_overview'
function getEmptyProfile(): IProfile {
return {
gender: '',
height: null,
name: '',
weight: null,
}
}
@@ -18,3 +19,12 @@ export function getProfile(): IProfile {
export function saveProfile(data: IProfile) {
wx.setStorageSync(PROFILE_KEY, data)
}
export function getOverview(): string[] {
return wx.getStorageSync(OVERVIEW_KEY) || []
}
export function saveOverview(data: string[]) {
wx.setStorageSync(OVERVIEW_KEY, data)
}