(email: string)
| 6 | * 获取 nonce(登录前) |
| 7 | */ |
| 8 | export async function fetchLoginNonce(email: string): Promise<string> { |
| 9 | const url = `/nonce/?email=${encodeURIComponent(email)}`; |
| 10 | const res = await http.get<NonceResp>(url); |
| 11 | if (!res.data.nonce) throw new Error(res.data.texts || '获取 nonce 失败'); |
| 12 | return res.data.nonce; |
| 13 | } |
| 14 | |
| 15 | /** |
| 16 | * 请求邮箱验证码(注册/重置密码) |