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