<template>
    <div class="signupCertificate">
        <!-- <m-header /> -->
        <m-step :number="5" />

        <van-form ref="form" :show-error="false" validate-first @submit="onSubmit" @failed="onFailed">
            <van-field name="radio" label="邮寄证书">
                <template #input>
                    <van-radio-group v-model="form.sex" direction="horizontal">
                        <van-radio checked-color="@--main-color" :name="1">是</van-radio>
                        <van-radio checked-color="@--main-color" :name="0">否</van-radio>
                    </van-radio-group>
                </template>
            </van-field>
            <div class="notice">
                本校考点考生的考级证书在考试结束30个工作日后（不含寒暑假）统一通过邮寄方式发放，邮费到付。校外各考点考生考级证书在考试结束30个工作日后（不含寒暑假）由考点统一领取并发放。自发证之日起10日内若未收到证书，请及时与考级办联系。如因考生填写通讯地址/联系电话错误导致退件或遗失，责任由考生本人承担。
            </div>
            <van-field name="phone" label="手机号" placeholder="请输入手机号" />
            <van-field name="phone" label="联系人" placeholder="请输入联系人姓名" />
            <van-field name="phone" label="通讯地址" placeholder="请输入通讯地址" />
            <m-button class="stepBtn" text="确认" native-type="submit" />
        </van-form>

    </div>
</template>
<script>
import MStep from '@/components/MStep'
import MButton from '@/components/MButton'
// import { browser } from '@/common/common'
export default {
    name: 'signupCertificate',
	components: { MStep, MButton },
    data () {
        return {
            patternPhone: /^1(3|4|5|6|7|8|9)\d{9}$/,
            patternPwd: /^[0-9A-Za-z]{6,16}$/,
            birthdayStatus: false,
            songStatus: false, // 曲目状态
            form: {
                phone: null,
                sex: 1,
                birthday: null,
                nation: null
            },
            fileList: [],
        }
    },
    mounted() {
        // 插入token
        // let params = this.$route.query
        // if(params.Authorization) {
        //     localStorage.setItem('Authorization', decodeURI(params.Authorization))
        //     localStorage.setItem('userInfo', decodeURI(params.Authorization))
        // }
    },
    methods: {
        onSubmit() {
            // console.log('submit', values)
        },
        onFailed() {
            // console.log('failed', errorInfo);
            // console.log(this.$refs['form'].scrollToField(errorInfo.errors[0].name))
            // this.$refs['form'].scrollToField(errorInfo.errors[0].name,  false)
        }
    }
}
</script>
<style lang="less" scoped>
@import url("../../assets/commonLess/variable");
.signupCertificate {
    height: 100vh;
    overflow-y: auto;
    overflow-x: hidden;
    background-color: @--main-bg-color;
    /deep/.van-form {
        margin-top: .15rem;
    }
    /deep/.van-cell {
        padding: .13rem .16rem;
    }
    /deep/.van-field__label {
        font-size: .17rem;
        color: @--font-main-color;
        width: 1.15rem;
    }
    /deep/.van-field__body {
        font-size: .16rem
    }
    .notice {
        font-size: .13rem;
        color: @--font-second-color;
        padding: .1rem .16rem;
        line-height: .18rem;
    }
}

</style>