<template>
  <section class="AiPhone">
    <img :src="$cdn + 'common/phone.png'" alt="" @click="callPhone(phone)" class="phone-icon" v-if="phone"/>
  </section>
</template>

<script>
export default {
  name: "AiPhone",
  props: {
    phone: {default: ""}
  },
  methods: {
    callPhone(phoneNumber) {
      uni.makePhoneCall({phoneNumber})
    }
  }
}
</script>

<style lang="scss" scoped>
.AiPhone {
  .phone-icon {
    width: 40px;
    height: 40px;
    vertical-align: sub;
    margin-left: 16px;
  }
}
</style>
