import{_ as b,d as D,n as C,Q as A,r as i,o as U,A as R,y as u,h as l,i as o,D as p,e as P,H as f,G as N,a6 as T}from"./index.js";import{M as n}from"./motion.61c49461.js";import{u as z}from"./rule.1c8498c8.js";import{E as y}from"./index.58bb95f6.js";import{u as c}from"./verifyCode.957bcf51.js";const S={class:"w-full flex justify-between"},j=D({__name:"regist",setup(G){const w=C(!1),d=C(!1),r=A({username:"",phone:"",verifyCode:"",password:"",repeatPassword:""}),v=C(),{isDisabled:B,text:V}=c(),E=[{validator:(m,e,s)=>{e===""?s(new Error("\u8BF7\u8F93\u5165\u786E\u8BA4\u5BC6\u7801")):r.password!==e?s(new Error("\u4E24\u6B21\u5BC6\u7801\u4E0D\u4E00\u81F4!")):s()},trigger:"blur"}],F=async m=>{d.value=!0,m&&await m.validate((e,s)=>{if(e)w.value?setTimeout(()=>{y.success("\u6CE8\u518C\u6210\u529F"),d.value=!1},2e3):(d.value=!1,y.warning("\u8BF7\u52FE\u9009\u9690\u79C1\u653F\u7B56"));else return d.value=!1,s})};function x(){c().end(),T().SET_CURRENTPAGE(0)}return(m,e)=>{const s=i("el-input"),t=i("el-form-item"),_=i("el-button"),g=i("el-checkbox"),k=i("el-form");return U(),R(k,{ref_key:"ruleFormRef",ref:v,model:r,rules:o(z),size:"large"},{default:u(()=>[l(o(n),null,{default:u(()=>[l(t,{rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u8D26\u53F7",trigger:"blur"}],prop:"username"},{default:u(()=>[l(s,{clearable:"",modelValue:r.username,"onUpdate:modelValue":e[0]||(e[0]=a=>r.username=a),placeholder:"\u8D26\u53F7","prefix-icon":o(p)("user")},null,8,["modelValue","prefix-icon"])]),_:1})]),_:1}),l(o(n),{delay:100},{default:u(()=>[l(t,{prop:"phone"},{default:u(()=>[l(s,{clearable:"",modelValue:r.phone,"onUpdate:modelValue":e[1]||(e[1]=a=>r.phone=a),placeholder:"\u624B\u673A\u53F7\u7801","prefix-icon":o(p)("iphone")},null,8,["modelValue","prefix-icon"])]),_:1})]),_:1}),l(o(n),{delay:150},{default:u(()=>[l(t,{prop:"verifyCode"},{default:u(()=>[P("div",S,[l(s,{clearable:"",modelValue:r.verifyCode,"onUpdate:modelValue":e[2]||(e[2]=a=>r.verifyCode=a),placeholder:"\u77ED\u4FE1\u9A8C\u8BC1\u7801","prefix-icon":o(p)("ri:shield-keyhole-line",{online:!0})},null,8,["modelValue","prefix-icon"]),l(_,{disabled:o(B),class:"ml-2",onClick:e[3]||(e[3]=a=>o(c)().start(v.value,"phone"))},{default:u(()=>[f(N(o(V)),1)]),_:1},8,["disabled"])])]),_:1})]),_:1}),l(o(n),{delay:200},{default:u(()=>[l(t,{prop:"password"},{default:u(()=>[l(s,{clearable:"","show-password":"",modelValue:r.password,"onUpdate:modelValue":e[4]||(e[4]=a=>r.password=a),placeholder:"\u5BC6\u7801","prefix-icon":o(p)("lock")},null,8,["modelValue","prefix-icon"])]),_:1})]),_:1}),l(o(n),{delay:250},{default:u(()=>[l(t,{rules:E,prop:"repeatPassword"},{default:u(()=>[l(s,{clearable:"","show-password":"",modelValue:r.repeatPassword,"onUpdate:modelValue":e[5]||(e[5]=a=>r.repeatPassword=a),placeholder:"\u786E\u8BA4\u5BC6\u7801","prefix-icon":o(p)("lock")},null,8,["modelValue","prefix-icon"])]),_:1})]),_:1}),l(o(n),{delay:300},{default:u(()=>[l(t,null,{default:u(()=>[l(g,{modelValue:w.value,"onUpdate:modelValue":e[6]||(e[6]=a=>w.value=a)},{default:u(()=>e[8]||(e[8]=[f(" \u6211\u5DF2\u4ED4\u7EC6\u9605\u8BFB\u5E76\u63A5\u53D7 ")])),_:1},8,["modelValue"]),l(_,{link:"",type:"primary"},{default:u(()=>e[9]||(e[9]=[f(" \u300A\u9690\u79C1\u653F\u7B56\u300B ")])),_:1})]),_:1})]),_:1}),l(o(n),{delay:350},{default:u(()=>[l(t,null,{default:u(()=>[l(_,{class:"w-full",size:"default",type:"primary",loading:d.value,onClick:e[7]||(e[7]=a=>F(v.value))},{default:u(()=>e[10]||(e[10]=[f(" \u786E\u5B9A ")])),_:1},8,["loading"])]),_:1})]),_:1}),l(o(n),{delay:400},{default:u(()=>[l(t,null,{default:u(()=>[l(_,{class:"w-full",size:"default",onClick:x},{default:u(()=>e[11]||(e[11]=[f(" \u8FD4\u56DE ")])),_:1})]),_:1})]),_:1})]),_:1},8,["model","rules"])}}});var Q=b(j,[["__file","D:/work/jiesuan/settle-vue3/src/views/login/components/regist.vue"]]);export{Q as default};
