import{o as c,c as u,w as a,a as s,b as o,u as t,d as h,v as w,t as g,f as m,g as b,h as d,s as x}from"./app-SC54XQDl.js";import{i as v,c as k}from"./app-Ba7ZqSpq.js";import{_ as y}from"./app-vNuZ2BVW.js";import{_ as V}from"./app-DFulsyXy.js";import{_ as l}from"./app-CVQkwzlf.js";import{T as f}from"./app-CNHjdV6U.js";import{_ as r}from"./app-iiAIFCF5.js";import"./app-PPG0ZS4d.js";import"./app--Lj8zATS.js";import"./app-Ch8j4za4.js";import"./app-C2mBgI5Z.js";import"./app-DyP4Nide.js";import"./app-CDCZqmkG.js";import"./app-Bt2pXSov.js";import"./app-DnXuoh8P.js";import"./app-Dw0jKdCD.js";function S(){const{utils:p,Tea:e}=v(this);this.username="",this.password="",this.isSubmitting=!1,this.$delay(function(){this.$find("form input[name='username']").focus(),this.changePassword()}),this.changePassword=function(){},this.submitBefore=function(){this.isSubmitting=!0},this.submitDone=function(){this.isSubmitting=!1},this.submitSuccess=function(_){p.success("注册成功，现在去登录",function(){window.location="/"})}}const B={class:"form-box"},$={class:"flex flex-col gap-3"},D={class:"ui header"},N={class:"ui field"},T=s("p",{class:"comment"},"用户名 *（长度不小于6位，只能包含英文字母、数字、下划线）：",-1),C={class:"ui field"},I={class:"comment"},P={key:0},U={class:"ui field"},R=s("p",{class:"comment"},"确认密码 *：",-1),A={class:"ui field"},E=s("p",{class:"comment"},"手机号 *：",-1),M={class:"ui input"},j={class:"ui field"},q=s("p",{class:"comment"},"常用电子邮箱 *：",-1),z={class:"ui input"},F={class:"ui field"},G=s("p",{class:"comment"},"用户姓名或者公司名称 *:",-1),H={class:"ui input"},J={class:"mt-4"},K=s("div",{class:"register-box"},[s("a",{href:"/login",class:"link"},"已有账号，去登录 »")],-1),L={__name:"index",setup(p){const e=k(new S);return(_,i)=>(c(),u(y,null,{default:a(()=>[s("div",B,[o(V,{action:"$",onBefore:t(e).submitBefore,onDone:t(e).submitDone,onSuccess:t(e).submitSuccess,autocomplete:"off"},{default:a(()=>[h(s("input",{type:"hidden",name:"token","onUpdate:modelValue":i[0]||(i[0]=n=>t(e).token=n)},null,512),[[w,t(e).token]]),s("div",$,[s("div",D,[s("h6",null,"注册"+g(t(e).systemName),1)]),s("div",N,[T,o(r,{beginIcon:"pi pi-user"},{default:a(()=>[o(l,{name:"username",modelValue:t(e).username,"onUpdate:modelValue":i[1]||(i[1]=n=>t(e).username=n),placeholder:"请输入用户名",maxlength:"200",class:"w-full",autofocus:""},null,8,["modelValue"])]),_:1})]),s("div",C,[s("p",I,[m("登录密码 *（长度不小于6位"),t(e).complexPassword?(c(),b("span",P,"，且必须包含大写字母和小写字母")):d("",!0),m("）： ")]),o(r,{beginIcon:"pi pi-lock"},{default:a(()=>[o(l,{type:"password",name:"password",modelValue:t(e).password,"onUpdate:modelValue":i[2]||(i[2]=n=>t(e).password=n),placeholder:"请输入密码",maxlength:"100",onInput:i[3]||(i[3]=n=>t(e).changePassword()),class:"w-full"},null,8,["modelValue"])]),_:1})]),s("div",U,[R,o(r,{beginIcon:"pi pi-lock"},{default:a(()=>[o(l,{type:"password",name:"password2",placeholder:"请再次输入密码",maxlength:"200",class:"w-full"})]),_:1})]),s("div",A,[E,s("div",M,[o(l,{name:"mobile",maxlength:"11",placeholder:"手机号",class:"w-full"})])]),s("div",j,[q,s("div",z,[o(l,{name:"email",maxlength:"100",placeholder:"常用电子邮箱",class:"w-full"})])]),s("div",F,[G,s("div",H,[o(l,{name:"fullname",maxlength:"50",placeholder:"用户姓名或者公司名称",class:"w-full"})])]),s("div",J,[t(e).isSubmitting?d("",!0):(c(),u(f,{key:0,class:"w-full",type:"submit"},{default:a(()=>[m("注册")]),_:1})),t(e).isSubmitting?(c(),u(f,{key:1,disabled:"",class:"w-full",type:"submit"},{default:a(()=>[m("注册中...")]),_:1})):d("",!0)]),K])]),_:1},8,["onBefore","onDone","onSuccess"])])]),_:1}))}};x({app:L,useRouter:!1});
