<template>

  <div class="p-wrap-full mb20 ng-scope">
    <div class="title-box mt5 clear">
      <h2 class="title">学时验证</h2>
    </div>
    <div class="learning-time-panel-2 mt30">
      <div class="panel-bd tc">
        <input type="text" v-model="periodObj.cardId"
            class="ui-ipt ipt-1 ng-pristine ng-valid"
            style="line-height: 1;padding: 10px"
            placeholder="请输入证件号">

        <input type="text" style="line-height: 1;padding: 10px"
          v-model="periodObj.name"
          class="ui-ipt ng-pristine ng-valid"
          placeholder="请输入姓名"> <input class="ui-btn btn-r"
          @click="goVerify()"
          type="button"
          value="立即查询">
      </div>
    </div>
  </div>
</template>

<script>
  export default {
    data(){
      return {
        periodObj:{
          name:'',
          cardId:'',
        }
      }
    },
    methods: {
      goVerify(){
        if( !this.periodObj.name || this.periodObj.cardId.length <15 || this.periodObj.cardId.length> 18){
          this.$message({message:'请输入大陆身份证（15-18位）'})
          return
        }
        this.$router.push( {path:'/main/verify', query:this.periodObj} )
      }
    }
  }
</script>

<style>
  @import url("learnTime.css");
</style>
