index.vue 1.89 KB
<template>
  <div class="qr-code-components">
    <div :style="[{bottom:bottom+'px'}]" @mouseenter="show = true" @mouseleave="show = false" class="right_btn flex_ccc">
      <img src="../../assets/contact_icon.png" />
      <div class="contact_text">联系我们</div>
    </div>
    <div :style="[{bottom:bottom+'px'}]" v-if="show" class="left_code flex_ccc">
      <img :src="codeUrl" />
      <div style="height: 16px"></div>
      <span class="h18_title">服务热线</span>
      <span class="h18_title">{{phone}}</span>
    </div>
  </div>
</template>

<script>
export default {
  name: '',
  props: {
    bottom: {
      type: Number,
      default: 64
    },
    codeUrl:{
      type:String,
      default:'https://img01.glsx.com.cn/weapp/resource/equity-h5-new/qrcode2.jpg'
    },
    phone:{
      type:String,
      default:'189 0000 1234'
    }
  },
  data() {
    return {
      show: false
    }
  },
  methods: {}
}
</script>
<style lang="scss" scoped>
.qr-code-components {
  .left_code {
    position: fixed;
    right: 77px;
    bottom: 64px;
    width: 144px;
    height: 201px;
    background: #ffffff;
    z-index: 88;
    box-shadow: 0px 3px 6px -4px rgba(0, 0, 0, 0.12), 0px 6px 16px 0px rgba(0, 0, 0, 0.08), 0px 9px 28px 8px rgba(0, 0, 0, 0.05);
    > img {
      width: 124px;
      height: 124px;
    }
    > span {
      line-height: 20px;
    }
  }
  .right_btn {
    position: fixed;
    right: 20px;
    bottom: 64px;
    cursor: pointer;
    width: 52px;
    height: 201px;
    background: #5850ff;
    border-radius: 4px;
    z-index: 88;
    box-shadow: 0px 3px 6px -4px rgba(0, 0, 0, 0.12), 0px 6px 16px 0px rgba(0, 0, 0, 0.08), 0px 9px 28px 8px rgba(0, 0, 0, 0.05);
    > img {
      width: 20px;
      height: 20px;
      margin-bottom: 7px;
    }
    .contact_text {
      width: 14px;
      line-height: 20px;
      font-size: 14px;
      font-weight: 400;
      color: #ffffff;
    }
  }
}
</style>