export function extractErrorMessage(err: unknown, fallback = '操作失败'): string { if (err && typeof err === 'object' && 'response' in err) { const resp = (err as { response?: { data?: { message?: string } } }).response; if (resp?.data?.message) return resp.data.message; } if (err instanceof Error) return err.message; return fallback; }