我想知道更改租户时重新加载整个登录页面的原因:
save(): void {
if (!this.tenancyName) {
abp.multiTenancy.setTenantIdCookie(undefined);
this.close();
location.reload();
return;
}
}
然后在重新加载时,在app-session.service.tsinit()中调用函数:
init(): Promise<boolean> {
return new Promise<boolean>((resolve, reject) => {
this._sessionService.getCurrentLoginInformations().toPromise().then((result: GetCurrentLoginInformationsOutput) => {
this._application = result.application;
this._user = result.user;
this._tenant = result.tenant;
resolve(true);
}, (err) => {
reject(err);
});
});
}
这对我来说没有意义,因为在GetCurrentLoginInformationsOutput函数中,当前本地会话正在使用各种 API 访问令牌进行更新,然后在用户成功登录时再次更新这些访问令牌。
目前,我更改了交换租户背后的逻辑,并删除了该location.reload()部分。其背后的原因是加快应用程序的响应时间。
我最大的问题是,在不调用重新加载页面部分时,我是否会丢失任何有价值的信息,并且应用程序会正常工作吗?