<template>
  <div v-loading="loading">
    <div class="white-box">
      <leo-uploader :requestRoute="'user/id-card'" :defaultImageUrl="defaultImageUrl" width="480px" height="320px"
                    :uploaderSuccessCanChange="false" @on-success="handleSuccess"></leo-uploader>
    </div>
  </div>
</template>

<script>
import {REQUEST_URL, ACCESS_TOKEN_PREFIX} from '@/utils/config'
import network from '@/utils/network'
import LeoUploader from '@/components/Uploader'

export default {
  name: 'user_id-card',
  components: {LeoUploader},
  mounted () {
    //this.getData();
  },
  data () {
    return {
      defaultImageUrl: null,
      loading: false,
    }
  },
  methods: {
    handleSuccess (response, file) {
      //this.form.image = imageUrl;
    },
    getData () {
      network.getData('user/id-card').then(response => {
        if (response.ID_IMAGE) {
          this.defaultImageUrl = response.ID_IMAGE
        }
        this.loading = false
      })
    }
  }
}

</script>

<style scoped>

</style>