wxAuth.vue 1.02 KB
Newer Older
leiqingsong's avatar
leiqingsong committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59
<template>
  <van-dialog v-if="showAuth" v-model="show" id="wx-auth" title="微信授权" show-cancel-button
    @confirm="handleConfirm"
  >
    <img class="logo" src="/img/photo.png" alt="logo" />
    <div class="small-tips">
      <p>为您提供优质服务,亿百分需要获取以下信息</p>
      <p>&middot; 您的公开信息(昵称、头像等)</p>
    </div>
  </van-dialog>
</template>

<script>
export default {
  name: "wxAuth",
  components: {},
  props: {
    showAuth: {
      type: Boolean,
      default: false
    }
  },
  data() {
    return {
      show: true
    };
  },
  methods: {
    handleConfirm() {
      this.$emit('confirm');
    }
  }
};
</script>

<style lang="scss">
#wx-auth {
  .logo {
    width: 20%;
    margin: 15px auto;
    display: block;
    border-radius: 50%;
  }
  .small-tips {
    margin-left: 15px;
    p {
      padding: 5px 10px;
    }
    p:first-child {
      font-size: 14px;
      color: #333;
    }
    p:last-child {
      font-size: 12px;
      color: #ccc;
    }
  }
}
</style>