feat: 更新用户设置模块

This commit is contained in:
2026-08-25 19:50:20 +08:00
parent 98d74918a0
commit 0b9cbc9d81
10 changed files with 144 additions and 21 deletions

View File

@@ -1,8 +1,8 @@
import type { IProfile } from "@/type/profile";
const PROFILE_KEY = 'user_profile'
const OVERVIEW_KEY = 'user_overview'
const PLAN_KEY = 'user_plan'
function getEmptyProfile(): IProfile {
return {
@@ -28,3 +28,11 @@ export function saveOverview(data: string[]) {
wx.setStorageSync(OVERVIEW_KEY, data)
}
export function getPlan(): string[] {
return wx.getStorageSync(PLAN_KEY) || []
}
export function savePlan(data: string[]) {
wx.setStorageSync(PLAN_KEY, data)
}