保誠-保戶業務員媒合平台
劉鈞霖
2021-12-01 a7b7bc7f3a29dd6d435ff3320211e7edbba81bdf
PAMapp/components/NavBar.vue
@@ -45,6 +45,7 @@
    @roleStorage.Mutation storageClearRecommendConsultant!: () => void;
    @roleStorage.Getter idToken!: string | null;
    @roleStorage.Getter currentRole!: string | null;
    @roleStorage.Getter consultantId!: string | null;
    navBarList = [{
        authorityOfRoleList: [Role.NOT_LOGIN],
@@ -58,7 +59,7 @@
      },
      {
        authorityOfRoleList:[Role.ADMIN],
        routeUrl: '/consultantAccountSetting',
        routeUrl: '/agentInfo/',
        title: '查看帳號資訊',
      },
      {
@@ -96,15 +97,17 @@
    routerNavigateTo(url: string): void {
      (this.$refs.dropdown as any).hide();
      _.isEqual(url, '') ? this.fakeLogout() : this.$router.push(url);
      _.isEqual(url,'')
        ? this.logout()
        : this.$router.push(_.isEqual(url,'/agentInfo/') ? url+this.consultantId :url);
    }
    pushRouterByLoginRole(): void {
      const link = _.isEqual(this.currentRole, Role.ADMIN) ? '/myAppointmentList/appointmentList' : '/';
      this.$router.push(link);
    }
    // TODO: 僅OTP認證開發前 暫時使用
    fakeLogout(): void {
    logout(): void {
      this.storageClear();
      this.storageClearQuickFilter();
      this.storageClearRecommendConsultant();