GroupModal.vue 1.92 KB
<template>
  <van-overlay :show="show">
    <div class="wrapper">
      <div :class="['kf-box flex']">
        <template>
          <div class="qr-box">
            <img src="@/assets/images/qr-bg.png" />
            <img :src="detail.groupQrCode" class="qr xy-center" />
          </div>
          <div class="btn" @click="save">长按识别二维码加客服</div>
        </template>
      </div>
      <div class="sprite-icon icon-close" @click.self="cancel"></div>
    </div>
  </van-overlay>
</template>

<script type="text/ecmascript-6">
export default {
  name: 'GroupModal',
  props: ['value', 'detail'],
  data() {
    return {
      show: false,
      img: null
    }
  },
  mounted() { },
  watch: {
    value(n) {
      this.show = n
    }
  },
  methods: {
    cancel() {
      this.show = false
      this.$parent.showKf = false
    },
    save() {
      this.showToast('请长按二维码保存')
    }
  }
}
</script>

<style scoped lang="scss">
.van-overlay {
  z-index: 3;
}
.wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  flex-direction: column;
  .kf-box {
    width: 273px;
    height: 298px;
    position: relative;
    flex-direction: column;
    font-size: 18px;
    font-weight: 500;
    background: rgba(#000000, 0.3);
    border-radius: 8px;
    .qr-box {
      position: relative;
      margin: 29px 0 19px;
      width: 180px;
      height: 180px;
      .qr {
        width: calc(100% - 38px);
        height: calc(100% - 38px);
      }
    }
    .btn {
      box-shadow: inset 0px -3px 8px 0px rgba(202, 0, 0, 0.89);
      background-image: linear-gradient(360deg, rgba(255, 68, 68, 1) 0, rgba(253, 108, 108, 1) 100%);
      border-radius: 26px;
      padding: 11px 28px 11px 29px;
      font-size: 17px;
      font-family: PingFangSC-Semibold, PingFang SC;
      font-weight: 600;
      color: #ffffff;
      line-height: 24px;
    }
  }
  .icon-close {
    margin-top: 16px;
  }
}
</style>