feat: 更新环境变量配置,统一API地址为https://capp-api.riwsan.com,并优化错误处理逻辑

This commit is contained in:
2026-01-20 15:29:32 +07:00
parent a66aed9722
commit bba7e994a4
4 changed files with 11 additions and 14 deletions

View File

@@ -77,6 +77,15 @@ export function safeClient<T, E>(
localStorage.removeItem("user-token");
window.location.reload();
}
else if (!options.silent) {
const toast = await toastController.create({
message: (res.error as any).message || i18n.global.t("network_error"),
duration: 3000,
position: "bottom",
color: "danger",
});
await toast.present();
}
throw res.error;
}