message: fix: add loss action for userStore
diff: @@ -94,13 +94,20 @@ export const useUserStore = defineStore({
  // save token
  this.setToken(token);
  + return this.afterLoginAction(goHome);
  + } catch (error) {
  + return Promise.reject(error);
  + }
  + },
  + async afterLoginAction(goHome?: boolean): Promise<GetUserInfoModel | null> {
  + if (!this.getToken) return null;
  // get user info
  const userInfo = await this.getUserInfoAction();
  const sessionTimeout = this.sessionTimeout;
  if (sessionTimeout) {
  this.setSessionTimeout(false);
  - } else if (goHome) {
  + } else {
  const permissionStore = usePermissionStore();
  if (!permissionStore.isDynamicAddedRoute) {
  const routes = await permissionStore.buildRoutesAction();
  @@ -110,12 +117,9 @@ export const useUserStore = defineStore({
  router.addRoute(PAGE_NOT_FOUND_ROUTE as unknown as RouteRecordRaw);
  permissionStore.setDynamicAddedRoute(true);
  }
  - await router.replace(userInfo.homePath || PageEnum.BASE_HOME);
  + goHome && (await router.replace(userInfo.homePath || PageEnum.BASE_HOME));
  }
  return userInfo;
  - } catch (error) {
  - return Promise.reject(error);
  - }
  },
  async getUserInfoAction(): Promise<UserInfo> {
  const userInfo = await getUserInfo();
  