fix: 移除网络错误时的退出登录状态处理逻辑
This commit is contained in:
@@ -131,14 +131,7 @@ const useAppStore = defineStore('app', {
|
|||||||
if (localI18n == null || (!this.i18nOpen && this.i18nDefault)) {
|
if (localI18n == null || (!this.i18nOpen && this.i18nDefault)) {
|
||||||
localSet(CACHE_LOCAL_I18N, this.i18nDefault);
|
localSet(CACHE_LOCAL_I18N, this.i18nDefault);
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
// 网络错误时退出登录状态
|
|
||||||
if (res.code === RESULT_CODE_EXCEPTION) {
|
|
||||||
delAccessToken();
|
|
||||||
delRefreshToken();
|
|
||||||
window.location.reload();
|
|
||||||
}
|
|
||||||
return res;
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user