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

export default function(){

    let password = {
            placeholder:'请输入密码',
            key:'password',
            type:'password',
            rules:{
                [VerificationType.empty]:'',
                [VerificationType.password]:'密码必须6-16位字母或者数字组成'
            }
    };

    return [
        {
            placeholder:'请输入手机号',
            key:'user_login',
            rules:{
                [VerificationType.empty]:'',
                [VerificationType.mobile]:'手机号格式不正确'
            }
        },
        {
            placeholder:'请输入手机验证码',
            code:'user_login',
            codeType:'2',
            key:'sms_code',
            rules:'',
        },
        password,
        {
            placeholder:'请输入确认密码',
            key:'password',
            type:'password',
            rules:{
                [VerificationType.empty]:'',
                [VerificationType.eq]:'两次密码不相符',
            },
            rulesOption:{
              data: password
            }
        }
    ] as LibDataArray
}