<template>
  <div class="ewm_dialog">
    <van-popup v-model="isShow" style="border-radius: 0.3rem;" @click-overlay="closed">
      <div class="ewm-part">
        <h3 class="ewm-top">
          {{serviceData.title}}
        </h3>
        <div class="ewm-center">
          <img :src="serviceData.url" alt="">
        </div>
        <div class="ewm-bottom">
          <p>{{serviceData.desc}}</p>
          <p>{{serviceData.remark}}</p>
        </div>
      </div>
    </van-popup>
  </div>
</template>
<script>
export default {
  name: '',
  props: {
    show: {
      type: Boolean,
      default: false,
      require: true
    },
    serviceData: Object
  },
  data () {
    return {
      isShow: false
    }
  },
  components: {},
  computed: {},
  beforeMount () {},
  mounted () {},
  methods: {
    closed () {
      this.$emit('closeDialog')
    }
  },
  created () {
  },
  watch: {
    'show': function (val) {
      this.isShow = val
    }
  }
}
</script>
<style lang='less' scoped>
.ewm_dialog {
  .ewm-part {
    width: 5.5rem;
    height: 5.88rem;
    background: #fff;
    border-radius: 0.3rem;
    overflow: hidden;
    .ewm-top {
      background: #28cd5e;
      height: 0.88rem;
      width: 100%;
      color: #fff;
      text-align: center;
      font-weight: 600;
      font-size: 0.36rem;
      line-height: 0.88rem;
    }
    .ewm-center img {
      height: 3rem;
      width: 3rem;
      display: block;
      margin: .5rem auto .35rem;
    }
    .ewm-bottom {
      line-height: .42rem;
      font-size: 0.26rem;
      color: #4c4c4c;
      text-align: center;
    }
  }
}
</style>
