1 |
- import{_ as e,h as a,s as o,H as l,a8 as t,o as s,c as n,w as r,f as u,v as i,d as c,t as d,e as m,x as g,z as p,a4 as f,B as h,ag as F}from"./index-01d5b8eb.js";import{p as _}from"./package.f41786e1.js";const b=a(o);const x=e({data:()=>({regForm:{account:"",realname:"",password:"",repass:"",code:""},forget:!1,packData:_,globalConfig:b.globalConfig}),watch:{forget(e){e&&(this.regForm.password="123456")}},mounted(){},methods:{handleInput(e){let a=e.detail.value.replace(/[\u4e00-\u9fa5]/g,"");this.regForm.account=a},sendCode(){if(!this.regForm.account)return l({title:"请输入账号!",icon:"none"}),!1;let e={account:this.regForm.account,type:2};this.$api.LoginApi.sendCode(e).then((e=>{l({title:e.msg,icon:"none"})}))},login(){return""==this.regForm.account?(l({title:"请输入账号!",icon:"none"}),!1):""==this.regForm.realname?(l({title:"请输入用户名或者昵称!",icon:"none"}),!1):""==this.regForm.password&&this.regForm.password.length<6&&this.regForm.password>16?(l({title:"请输入6-16位密码!",icon:"none"}),!1):this.regForm.password!=this.regForm.repass?(l({title:"两次密码输入不相同!",icon:"none"}),!1):void this.$api.LoginApi.register(this.regForm).then((e=>{0==e.code&&setTimeout((()=>{t({url:"/pages/login/index"})}),2e3)}))}}},[["render",function(e,a,o,l,t,_){const b=g("cu-custom"),x=u,w=p,V=f,C=h,k=F;return s(),n(x,null,{default:r((()=>[i(b,{bgColor:"bg-gradual-blue",isBack:!0},{backText:r((()=>[])),content:r((()=>[c("账号注册")])),_:1}),i(x,{style:{height:"100rpx"}}),i(x,{class:"padding im-flex im-rows im-justify-content-center mb-10"},{default:r((()=>[i(x,{class:"im-flex im-rows im-justify-content-center"},{default:r((()=>[i(w,{class:"login-logo",src:t.globalConfig.sysInfo.logo??t.packData.logo,mode:"fixWidth"},null,8,["src"])])),_:1})])),_:1}),i(x,{class:"im-flex im-rows im-justify-content-center"},{default:r((()=>[c(d(t.globalConfig.sysInfo.name??t.packData.name),1)])),_:1}),i(k,null,{default:r((()=>[i(x,{class:"cu-form-group margin-top"},{default:r((()=>[i(x,{class:"title"},{default:r((()=>[c("账号")])),_:1}),i(V,{placeholder:"账号",class:"uni-input",maxlength:"32",name:"input",modelValue:t.regForm.account,"onUpdate:modelValue":a[0]||(a[0]=e=>t.regForm.account=e),onInput:_.handleInput},null,8,["modelValue","onInput"])])),_:1}),i(x,{class:"cu-form-group margin-top"},{default:r((()=>[i(x,{class:"title"},{default:r((()=>[c("用户名/昵称")])),_:1}),i(V,{placeholder:"请输入用户名或昵称",maxlength:"32",name:"input",modelValue:t.regForm.realname,"onUpdate:modelValue":a[1]||(a[1]=e=>t.regForm.realname=e)},null,8,["modelValue"])])),_:1}),parseInt(t.globalConfig.sysInfo.regauth)?(s(),n(x,{key:0,class:"cu-form-group"},{default:r((()=>[i(x,{class:"title"},{default:r((()=>[c("验证码")])),_:1}),i(V,{placeholder:"请输入验证码",maxlength:"6",name:"input",modelValue:t.regForm.code,"onUpdate:modelValue":a[2]||(a[2]=e=>t.regForm.code=e)},null,8,["modelValue"]),i(C,{class:"cu-btn bg-blue shadow",onClick:_.sendCode},{default:r((()=>[c("发送验证码")])),_:1},8,["onClick"])])),_:1})):m("",!0),i(x,{class:"cu-form-group"},{default:r((()=>[i(x,{class:"title"},{default:r((()=>[c("密码")])),_:1}),i(V,{placeholder:"请输入密码",maxlength:"32",type:"password",name:"input",modelValue:t.regForm.password,"onUpdate:modelValue":a[3]||(a[3]=e=>t.regForm.password=e)},null,8,["modelValue"])])),_:1}),i(x,{class:"cu-form-group"},{default:r((()=>[i(x,{class:"title"},{default:r((()=>[c("重复密码")])),_:1}),i(V,{placeholder:"请重复输入密码",maxlength:"32",type:"password",name:"input",modelValue:t.regForm.repass,"onUpdate:modelValue":a[4]||(a[4]=e=>t.regForm.repass=e)},null,8,["modelValue"])])),_:1})])),_:1}),i(x,{class:"flex flex-direction im-login-btn"},{default:r((()=>[i(C,{class:"cu-btn lg bg-blue",onClick:a[5]||(a[5]=e=>_.login())},{default:r((()=>[c("注册")])),_:1})])),_:1}),i(x,{class:"footer-version c-999"},{default:r((()=>[c(d(t.globalConfig.sysInfo.name??t.packData.name)+" for "+d(t.packData.version),1)])),_:1})])),_:1})}],["__scopeId","data-v-70f2375f"]]);export{x as default};
|