Register-DP3BkyXG.js 1.3 KB

1
  1. import{_}from"./login-VH6pjdPe.js";import{_ as g,d as f,f as p,o as h,c as w,b as s,g as i,r as d,i as v,p as V,l as $}from"./index-BjMvVtOX.js";const k=f({components:{},props:[],setup(){const{ajax:e,helper:o}=v("$global"),l=d(""),a=d("");return{register:async()=>{const r=await e.user.register(l.value,a.value);r&&(o.write("userName",String(r.username)),o.goLink("/login"))},username:l,password:a}}}),t=e=>(V("data-v-266cfe52"),e=e(),$(),e),y=t(()=>s("header",null,[s("img",{src:_}),s("p",null,"欢迎使用")],-1)),I=t(()=>s("p",null,"账号注册",-1)),S=t(()=>s("p",null,"账号",-1)),B=t(()=>s("p",null,"密码",-1));function C(e,o,l,a,u,r){const c=p("a-input"),m=p("a-input-password");return h(),w("main",null,[s("section",null,[y,I,s("section",null,[S,s("div",null,[i(c,{placeholder:"请输入账号",style:{width:"250px",height:"40px"},modelValue:e.username,"onUpdate:modelValue":o[0]||(o[0]=n=>e.username=n)},null,8,["modelValue"])])]),s("section",null,[B,s("div",null,[i(m,{type:"password",placeholder:"请输入密码",style:{width:"250px",height:"40px"},modelValue:e.password,"onUpdate:modelValue":o[1]||(o[1]=n=>e.password=n)},null,8,["modelValue"])])]),s("div",{onClick:o[2]||(o[2]=(...n)=>e.register&&e.register(...n))},"注册")])])}const j=g(k,[["render",C],["__scopeId","data-v-266cfe52"]]);export{j as default};