feat: 添加管理员密码修改功能

This commit is contained in:
2026-04-27 23:16:31 +08:00
parent c161660b51
commit 9c4f22ff97
8 changed files with 135 additions and 0 deletions
+8
View File
@@ -49,12 +49,20 @@ export const useAuthStore = defineStore("auth", () => {
}
}
async function changePassword(currentPassword: string, newPassword: string) {
await apiClient.post("/auth/change-password", {
currentPassword,
newPassword
});
}
return {
token,
user,
isAuthenticated,
login,
logout,
changePassword,
clearSession
};
});