feat: 更新 '@capp/eden' 依赖至 0.0.9,添加资产中心页面,优化钱包相关逻辑
This commit is contained in:
@@ -61,8 +61,8 @@ export function safeClient<T, E>(
|
||||
isPending.value = false;
|
||||
});
|
||||
|
||||
if (res.error && res.status === 418) {
|
||||
if (!options.silent) {
|
||||
if (res.error) {
|
||||
if (!options.silent && res.status === 418) {
|
||||
const toast = await toastController.create({
|
||||
message: i18n.global.t((res.error as any).value.code, {
|
||||
...(res.error as any).value.context,
|
||||
@@ -73,6 +73,10 @@ export function safeClient<T, E>(
|
||||
});
|
||||
await toast.present();
|
||||
}
|
||||
else if (res.status === 401) {
|
||||
localStorage.removeItem("user-token");
|
||||
window.location.reload();
|
||||
}
|
||||
|
||||
throw res.error;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user