集成家长短信通知

This commit is contained in:
stu2not
2026-06-03 15:14:01 +08:00
parent c4d977ce99
commit 482fbf351f
13 changed files with 1027 additions and 23 deletions

View File

@@ -45,7 +45,7 @@ export async function getParent(userId: number): Promise<Parent> {
export async function updateParent(
userId: number,
data: { nickname?: string; avatar_url?: string; phone?: string }
data: { nickname?: string; avatar_url?: string }
): Promise<Parent> {
return request<Parent>(`/banban/parents/${userId}`, {
method: 'PATCH',
@@ -53,6 +53,13 @@ export async function updateParent(
})
}
export async function authorizeParentPhone(code: string): Promise<Parent> {
return request<Parent>('/banban/parents/me/phone', {
method: 'POST',
data: { code },
})
}
export function getToken(): string {
return getStoredToken()
}