<template>
  <div class="switch-page">
    <el-popover v-if="!(project == '' || project == 'index')" placement="left-end" width="143" trigger="hover" popper-class="sw-page-pop">
      <div>
        <ul class="toggle">
          <li v-show="!project.includes('gift')">
            <router-link to="/gift-manage/real-gift"><img :src="require(`@/assets/images/svg/w-real-gifts.svg`)" width="16" />礼品</router-link>
          </li>
          <li v-show="!project.includes('card')">
            <router-link to="/gic-card/list"><img :src="require(`@/assets/images/svg/w-gic-card.svg`)" width="16" />卡券</router-link>
          </li>
        </ul>
      </div>
      <div class="s-icon mb10" slot="reference">
        <img src="../../assets/images/svg/more.svg" width="30" height="30" />
      </div>
    </el-popover>
    <el-popover v-if="!(project == '' || project == 'index')" placement="left-end" width="143" trigger="hover" popper-class="sw-page-pop">
      <div>
        ?????
      </div>
      <div class="s-icon" slot="reference">
        <img src="../../assets/images/svg/more.svg" width="30" height="30" />
      </div>
    </el-popover>
    <!-- <div class="s-icon">
      <img src="../../assets/images/svg/more.svg" width="30" height="30" />
    </div> -->
  </div>
</template>

<script>
export default {
  name: 'SwitchPage',
  computed: {
    project() {
      return this.$store.state.project;
    }
  }
};
</script>

<style lang="scss" scoped>
.switch-page {
  position: fixed;
  right: 40px;
  bottom: 90px;
  width: 50px;
  height: 110px;
  z-index: 900;
  .s-icon {
    padding-top: 9px;
    width: 50px;
    height: 50px;
    background: #F7F8FA;
    border-radius: 4px;
    border: 1px solid #DCDFE6;
    cursor: pointer;
    text-align: center;
  }
}
.toggle {
  li {
    img {
      margin-right: 7px;
    }
    a {
      line-height: 34px;
      display: flex;
      align-content: center;
      padding: 0 5px 0 15px;
      width: 100%;
      color: $gray01;
      &:hover {
        background: $gray-disable;
      }
    }
  }
}
</style>
<style lang="scss">
.sw-page-pop {
  padding: 6px 0 !important;
}
</style>