feat: 更新 showToast 显示逻辑,添加错误代码上下文;更新语言存储键以包含应用版本
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user