diff --git a/src/app/core/startup/startup.service.ts b/src/app/core/startup/startup.service.ts index ce5b68be..17f44420 100644 --- a/src/app/core/startup/startup.service.ts +++ b/src/app/core/startup/startup.service.ts @@ -1,6 +1,6 @@ import { Injectable } from '@angular/core'; -import { TokenKey } from '@config/constant'; +import { TokenKey, TokenPre } from '@config/constant'; import { LoginInOutService } from '@core/services/common/login-in-out.service'; import { UserInfoService } from '@store/common-store/userInfo.service'; @@ -13,7 +13,7 @@ export class StartupService { constructor(private userInfoService: UserInfoService, private loginInOutService: LoginInOutService, private windowSer: WindowService) {} load(): Promise { - const token = this.windowSer.getSessionStorage(TokenKey); + const token = this.windowSer.getSessionStorage(TokenKey)?.replace(TokenPre,''); if (token) { return this.loginInOutService.loginIn(token); }