<template>
  <popup v-model:value="value" content-animate="scale" @close="$emit('destroy-popup')">

    <section class="real-name-container relative">
      <header class="rowACenter real-name-header">
        <div class="real-name-title flex-1">支付宝认证</div>
      </header>
      <div @click="close" class="real-name-close-wrap cursor-pointer absolute animate-rotate-hover">
        <icon type="close" class="real-name-close"></icon>
      </div>

      <section class="real-name-screen row relative">

        <aside class="input-real-container">

          <div
            v-for="(item,index) in inputData.left"
            :key="'real-name-'+index"
            class="row aCenter input-real"
            :class="{'input-real-margin':index!==0}"
          >
            <div class="real-circular"></div>
            <div class="real-input-label alipay-label">{{item.label}}</div>
            <div class="real-input-container rowACenter">
              <div class="flex-1">
                <input
                    class="flex-1"
                    :placeholder="item.placeholder"
                    :type="item.type || 'text'"
                    v-model="item.value"
                    :maxlength="item.maxlength || 50"
                    :disabled="item.disabled"
                />
              </div>
              <div v-if="item.code" class="real-code-button center"
                @click="triggerTimeDate(item,inputData.left)"
                   :class="{
                      'real-code-disabled': timeFormat
                   }"
              >{{timeFormat || timeConfig.default}}</div>

            </div>
          </div>

        </aside>

      </section>

      <div class="center">
          <v-button class="real-name-button" @submit-verify="submitVerify" @submit="submit">提交审核</v-button>
      </div>


    </section>

  </popup>
</template>

<script>
import {
  Popup,
  icon,
  vUpload,
  vButton
} from '$components';
import mixins from '../mixins';
export default {
  name: "popup-alipay",
  components:{
    vButton,
    Popup,
    icon,
    vUpload
  },
  mixins
}
</script>

<style scoped lang="scss" src="../style.scss"></style>