regist.bfca82.js 3.7 KB

1
  1. import{_ as b,d as D,m as C,Q as U,r as i,o as A,A as R,x as u,f as l,h as o,D as p,e as P,H as f,G as N,au as T}from"./index.js";import{M as n}from"./motion.cd0ccb33.js";import{u as z}from"./rule.5457d3e8.js";import{u as v,E as y}from"./verifyCode.becfe670.js";const S={class:"w-full flex justify-between"},j=D({__name:"regist",setup(G){const c=C(!1),d=C(!1),r=U({username:"",phone:"",verifyCode:"",password:"",repeatPassword:""}),w=C(),{isDisabled:B,text:V}=v(),x=[{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"}],E=async m=>{d.value=!0,m&&await m.validate((e,s)=>{if(e)c.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 F(){v().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 A(),R(k,{ref_key:"ruleFormRef",ref:w,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(v)().start(w.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:x,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:c.value,"onUpdate:modelValue":e[6]||(e[6]=a=>c.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=>E(w.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:F},{default:u(()=>e[11]||(e[11]=[f(" \u8FD4\u56DE ")])),_:1})]),_:1})]),_:1})]),_:1},8,["model","rules"])}}});var I=b(j,[["__file","C:/Users/89793/Desktop/projects/ticket-system/src/views/login/components/regist.vue"]]);export{I as default};