保誠-保戶業務員媒合平台
劉鈞霖
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],
@@ -57,13 +58,18 @@
        title: '個人帳號設定',
      },
      {
        authorityOfRoleList: [Role.ADMIN],
        routeUrl: '/notFinish',
        authorityOfRoleList:[Role.ADMIN],
        routeUrl: '/agentInfo/',
        title: '查看帳號資訊',
      },
      {
        authorityOfRoleList: [Role.USER, Role.ADMIN],
        routeUrl: '/record/contactRecord',
        authorityOfRoleList:[Role.ADMIN],
        routeUrl: '/record',
        title: '查看紀錄',
      },
      {
        authorityOfRoleList: [Role.USER],
        routeUrl: '/userReviewsRecord',
        title: '查看紀錄',
      },
      {
@@ -91,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();