import{l as V,k as x,f as d}from"./element-plus-yhtdTbPD.js";import{_ as k,u as I,s as y,b as z,f as P}from"./index-D5k4QILW.js";import{_ as S,c as B,b as w,a as C}from"./account-Dw9nDNr7.js";import{aA as E,m as U,L as N,P as e,M as n,O as i,u as c,Y as g,Z as f,ax as R,ay as A,H as D}from"./vue-vendor-C1ve1r-r.js";const l=u=>(R("data-v-20a10b96"),u=u(),A(),u),L={class:"pc-register-container"},M=l(()=>e("img",{src:z,class:"top-left-logo",alt:"logo"},null,-1)),T={class:"lang-selector-wrapper"},F=l(()=>e("div",{class:"bg-glow glow-top-left"},null,-1)),H=l(()=>e("div",{class:"bg-glow glow-bottom-right"},null,-1)),O={class:"register-card"},Y=l(()=>e("div",{class:"mclaren-header"},[e("img",{src:S,class:"mclaren-img-logo",alt:"mclaren logo"}),e("div",{class:"main-title"},"迈凯伦"),e("div",{class:"sub-partner"},"官方合作伙伴")],-1)),Z={class:"form-wrapper"},$=l(()=>e("img",{src:B,class:"input-icon",alt:"icon"},null,-1)),j=l(()=>e("img",{src:w,class:"input-icon",alt:"icon"},null,-1)),q=l(()=>e("img",{src:w,class:"input-icon",alt:"icon"},null,-1)),G=l(()=>e("img",{src:C,class:"input-icon",alt:"icon"},null,-1)),J={class:"submit-action-group"},K={__name:"index",setup(u){const m=E(),{t:o}=I(),s=U({account:"",password:"",confirmPassword:"",user_code:""});function h(){return s.account?s.password?s.password.length<6||s.password.length>20?(d.warning(o("密码长度需在6-20个字符之间")),!1):s.password!==s.confirmPassword?(d.warning(o("两次输入的密码不一致")),!1):s.user_code?!0:(d.warning(o("请输入邀请码")),!1):(d.warning(o("请输入密码")),!1):(d.warning(o("请输入账号")),!1)}function b(){h()&&v()}function v(){P({account:s.account,password:s.password,user_code:s.user_code}).then(r=>{r&&r.data&&r.data.token&&localStorage.setItem("token",r.data.token),setTimeout(()=>{m.push("/")},500)}).catch(r=>{console.error(r)})}return(r,a)=>{const p=V,_=x;return D(),N("div",L,[M,e("div",T,[n(y)]),F,H,e("div",O,[Y,e("div",Z,[n(p,{modelValue:s.account,"onUpdate:modelValue":a[0]||(a[0]=t=>s.account=t),placeholder:c(o)("请输入账号"),clearable:"",size:"large",class:"custom-input"},{prefix:i(()=>[$]),_:1},8,["modelValue","placeholder"]),n(p,{modelValue:s.password,"onUpdate:modelValue":a[1]||(a[1]=t=>s.password=t),placeholder:c(o)("请输入6-20位密码"),type:"password","show-password":"",clearable:"",size:"large",class:"custom-input"},{prefix:i(()=>[j]),_:1},8,["modelValue","placeholder"]),n(p,{modelValue:s.confirmPassword,"onUpdate:modelValue":a[2]||(a[2]=t=>s.confirmPassword=t),placeholder:c(o)("请再次确认密码"),type:"password","show-password":"",clearable:"",size:"large",class:"custom-input"},{prefix:i(()=>[q]),_:1},8,["modelValue","placeholder"]),n(p,{modelValue:s.user_code,"onUpdate:modelValue":a[3]||(a[3]=t=>s.user_code=t),placeholder:c(o)("请输入邀请码"),clearable:"",size:"large",class:"custom-input"},{prefix:i(()=>[G]),_:1},8,["modelValue","placeholder"])]),e("div",J,[n(_,{class:"back-btn",size:"large",onClick:a[4]||(a[4]=t=>c(m).back())},{default:i(()=>[g(f(c(o)("返回")),1)]),_:1}),n(_,{type:"primary",class:"submit-btn",size:"large",onClick:b},{default:i(()=>[g(f(c(o)("提交")),1)]),_:1})])])])}}},es=k(K,[["__scopeId","data-v-20a10b96"]]);export{es as default};
