feat: 更新 showToast 显示逻辑,添加错误代码上下文;更新语言存储键以包含应用版本

This commit is contained in:
2026-01-22 18:07:42 +07:00
parent 9398d4036b
commit 7c5e33cd7f
4 changed files with 11 additions and 3 deletions

View File

@@ -74,7 +74,9 @@ export function safeClient<T, E>(
}, 2000);
}
else if (!options.silent) {
showToast((res.error as any).message || i18n.global.t("network_error"));
showToast(i18n.global.t((res.error as any).code, {
...(res.error as any).context,
}) || (res.error as any).message || i18n.global.t("network_error"));
}
throw res.error;