feat: 更新用户设置模块
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user