feat: 更新环境变量配置,统一API地址为https://capp-api.riwsan.com,并优化错误处理逻辑
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user