import { VerificationType } from '$utils/verification/const';

import user from '$config/user';

export default function () {

    return {

        left:[
            {
                label:'真实姓名',
                placeholder:'请输入姓名',
                rules:'',
                key:'real_name',
            },
            {
                label: '手机号',
                placeholder:'请输入手机号',
                rules:{
                    [VerificationType.empty]:'',
                    [VerificationType.mobile]:'手机号格式不正确'
                },
                value:user.user && user.user.user_name || '',
                disabled:true,
                key:'mobile',
                maxLength:11
            },
            {
                label:'验证码',
                placeholder:'请输入验证码',
                code:'mobile',
                codeType:'1',
                key:'code',
                rules:''
            },
            {
                label: '身份证号',
                placeholder:'请输入身份证号',
                rules:{
                    [VerificationType.empty]:'',
                    [VerificationType.id]:'身份证号格式不正确'
                },
                key:'card_id',
                maxLength:18
            }
        ] as LibDataArray,

        right:[
            {
                label:'拍摄正面',
                icon: require('../images/positive.png'),
                key:'identity1',
                rules:'请上传身份证正面'
            },
            {
                label:'拍摄反面',
                icon: require('../images/other.png'),
                key:'identity2',
                rules:'请上传身份证反面'
            }
        ] as LibDataArray

    }

}