✨ 完成实验部分打磨,准备大作业部分
This commit is contained in:
@@ -4,6 +4,7 @@ export interface UserInfo {
|
||||
userEmail: string;
|
||||
userAvatar: string;
|
||||
userAmount: string;
|
||||
userBirthday: string;
|
||||
lastGetTime: Date;
|
||||
}
|
||||
export interface UserState extends UserInfo {
|
||||
@@ -17,6 +18,7 @@ export const useUserStore = defineStore('User', {
|
||||
userEmail: '',
|
||||
userAvatar: '',
|
||||
userAmount: '',
|
||||
userBirthday: '',
|
||||
lastGetTime: new Date(),
|
||||
}),
|
||||
actions: {
|
||||
@@ -30,6 +32,7 @@ export const useUserStore = defineStore('User', {
|
||||
this.userEmail = res.data.userEmail;
|
||||
this.userAvatar = res.data.userAvatar;
|
||||
this.userAmount = '500';
|
||||
this.userBirthday = res.data.userBirthday;
|
||||
this.lastGetTime = new Date();
|
||||
} catch (error) {
|
||||
console.error('Error fetching user info:', error);
|
||||
|
||||
Reference in New Issue
Block a user