feat: 增加会员功能

This commit is contained in:
2026-09-05 16:19:56 +08:00
parent c1592cdc5b
commit dea55bec15
7 changed files with 88 additions and 21 deletions

View File

@@ -1,7 +1,7 @@
import { defineStore } from 'pinia'
import type {IDefaultRecordValue, IProfile} from "@/type/profile";
import type {IStats} from "@/type";
import {countRecordsByMonth, getMaxRecord, getTotalCount} from "@/utils/record";
import type { IDefaultRecordValue, IProfile, IUser } from "@/type/profile";
import type { IStats } from "@/type";
import { countRecordsByMonth, getMaxRecord, getTotalCount } from "@/utils/record";
export const useProfileStore = defineStore('profile', {
state: () => ({
@@ -15,6 +15,7 @@ export const useProfileStore = defineStore('profile', {
showThemePopup: false,
showAboutPopup: false,
profileForm: {
id: '',
gender: '',
height: 170,
birthYear: 1990,
@@ -23,6 +24,11 @@ export const useProfileStore = defineStore('profile', {
goal: '',
name: '',
} as IProfile,
user: {
id: '',
level: '普通用户',
expiry_date: '无'
} as IUser,
themeColor: 'purple',
defaultRecordValueForm: {
weightValue: 70,