保誠-保戶業務員媒合平台
Tomas
2021-12-28 e430eadebde1690a177cdf79e8a35da66c484dd0
refactor components: NavBar, Footer, loading, popUpFrame
修改4個檔案
98 ■■■■■ 已變更過的檔案
PAMapp/components/Footer.vue 47 ●●●● 修補檔 | 檢視 | 原始 | 究查 | 歷程
PAMapp/components/NavBar.vue 17 ●●●●● 修補檔 | 檢視 | 原始 | 究查 | 歷程
PAMapp/components/loading.vue 7 ●●●●● 修補檔 | 檢視 | 原始 | 究查 | 歷程
PAMapp/components/popUpFrame.vue 27 ●●●● 修補檔 | 檢視 | 原始 | 究查 | 歷程
PAMapp/components/Footer.vue
@@ -20,7 +20,7 @@
          <li class="pam-footer-contact__item">(專員接聽時間:週一 ~ 週五 08:00~20:00 及週六、日及例假日09:00~17:30)</li>
        </ul>
      </section>
      <section class="pam-footer-copywrite">本網站由保誠人壽與保經代共同合作</section>
      <section class="pam-footer-copywriting">本網站由保誠人壽與保經代共同合作</section>
    </footer>
</template>
@@ -44,18 +44,19 @@
  label: string;
  url: string;
}
</script>
<style lang="scss" scoped>
.pam-footer {
  border-top: 1px solid #CCCCCC;
  border-top      : 1px solid #CCCCCC;
  background-color: $PRIMARY_WHITE;
  .pam-footer-nav {
    padding: 10px 20px;
    .pam-footer-nav__list {
      display: flex;
      list-style: none;
      flex-wrap: wrap;
      display        : flex;
      list-style     : none;
      flex-wrap      : wrap;
      justify-content: center;
      .pam-footer-nav__item {
        padding: 10px 0 10px 10px;
@@ -65,7 +66,7 @@
        @extend .cursor--pointer;
         a, a:hover, a:focus, a:active {
              text-decoration: none;
              color: inherit;
              color          : inherit;
        }
        &:nth-of-type(3) {
          .pam-footer-nav__item-pipe {
@@ -79,37 +80,37 @@
    }
  }
  .pam-footer-contact {
    padding: 10px 20px;
    display: flex;
    padding       : 10px 20px;
    display       : flex;
    flex-direction: column;
    .pam-footer-contact__list {
      display: flex;
      list-style: none;
      flex-wrap: wrap;
      display        : flex;
      list-style     : none;
      flex-wrap      : wrap;
      justify-content: center;
      .pam-footer-contact__item {
        color: $PRUDENTIAL_GREY;
        font-size: 12px;
        text-align: center;
        color      : $PRUDENTIAL_GREY;
        font-size  : 12px;
        text-align : center;
        line-height: 20px;
        @extend .text--bold;
        .phone {
          color: $PRIMARY_BLACK;
          color    : $PRIMARY_BLACK;
          font-size: 14px;
          @extend .text--bold;
        }
      }
    }
  }
  .pam-footer-copywrite {
  .pam-footer-copywriting {
    background-color: $PRIMARY_RED;
    display: flex;
    justify-content: center;
    color: $PRIMARY_WHITE;
    padding: 10px 0;
    font-size: 12px;
    font-weight: bold;
    line-height: 20px;
    display         : flex;
    justify-content : center;
    color           : $PRIMARY_WHITE;
    padding         : 10px 0;
    font-size       : 12px;
    font-weight     : bold;
    line-height     : 20px;
  }
}
</style>
PAMapp/components/NavBar.vue
@@ -40,11 +40,15 @@
  const roleStorage = namespace('localStorage');
  @Component
  export default class NavBar extends Vue {
    @roleStorage.Mutation storageClear!: () => void;
    @roleStorage.Getter idToken!: string | null;
    @roleStorage.Getter currentRole!: string | null;
    @roleStorage.Getter consultantId!: string | null;
    @roleStorage.Mutation storageClear!: () => void;
    isOpenDropdown = false;
    login_role     = Role.NOT_LOGIN;
    navBarList = [{
        authorityOfRoleList: [Role.NOT_LOGIN],
@@ -92,12 +96,8 @@
        title: '顧問登入',
      },
    ];
    login_role = Role.NOT_LOGIN;
    isOpenDropdown = false;
    get loginRole(): Role {
      return this.idToken && this.currentRole ? (this.currentRole as Role): Role.NOT_LOGIN;
    }
    //////////////////////////////////////////////////////////////////////
    routerNavigateTo(url: string): void {
      (this.$refs.dropdown as any).hide();
@@ -115,6 +115,11 @@
      this.storageClear();
      _.isEqual(this.$route.name, 'index') ? location.reload() : this.$router.push('/');
    }
    get loginRole(): Role {
      return this.idToken && this.currentRole ? (this.currentRole as Role): Role.NOT_LOGIN;
    }
  }
</script>
PAMapp/components/loading.vue
@@ -17,16 +17,23 @@
    }
  })
  export default class Loading extends Vue {
    isLoading = false;
    defaultOptions = {
      animationData: require('@/assets/lottie/loading.json')
    };
    //////////////////////////////////////////////////////////////////////
    start(): void {
      this.isLoading = true;
    }
    finish(): void {
      this.isLoading = false;
    }
  }
</script>
PAMapp/components/popUpFrame.vue
@@ -1,15 +1,18 @@
<template>
  <div>
    <Ui-Drawer :isVisible.sync="isUseDrawer"
    @closeDrawer="closePopUp"
    :size="drawerSize">
      <slot></slot>
    </Ui-Drawer>
    <Ui-Dialog :isVisible.sync="isUseDialog"
    @closeDialog="closePopUp"
    :width="dialogWidth">
      <slot></slot>
    </Ui-Dialog>
  </div>
</template>
@@ -20,13 +23,28 @@
  @Component
  export default class PopUpFrame extends Vue {
    @PropSync('isOpen',{type:Boolean,default:false}) syncIsOpen!:boolean;
    @Prop({default:'auto'}) drawerSize!:string; // element UI drawer default size
    @Prop({default:'50%'}) dialogWidth!:string; // element UI dialog default width
    @PropSync('isOpen',{type:Boolean,default:false})
    syncIsOpen!:boolean;
    @Prop({default:'auto'})
    drawerSize!:string; // element UI drawer default size
    @Prop({default:'50%'})
    dialogWidth!:string; // element UI dialog default width
    //////////////////////////////////////////////////////////////////////
    @Emit('closePopUp') closePopUp() {
      return;
    }
    //////////////////////////////////////////////////////////////////////
    private get isUseDrawer() : boolean {
      return this.syncIsOpen && UtilsService.isMobileDevice();
    }
    private set isUseDrawer(value: boolean) {
      this.$emit('update:isOpen',value);
    }
@@ -39,8 +57,5 @@
      this.$emit('update:isOpen',value);
    }
    @Emit('closePopUp') closePopUp() {
        return;
    }
  }
</script>