18n/dist-test/assets/index_173044340211.js
2024-11-01 14:44:57 +08:00

2 lines
2.1 KiB
JavaScript

import{d as e,s as o,c as a,aD as s,e as t,o as l,f as i,P as d,g as r,N as n,X as m,k as p,h as u,aE as c,t as g,ai as f,a2 as _,z as b,an as h,ap as w,ao as x,A as v,ad as j,aG as y,_ as C}from"./index_1730443402.js";/* empty css */import{_ as V}from"./index_173044340239.js";import{_ as k}from"./index_173044340236.js";import{_ as z}from"./index_173044340240.js";import{_ as R}from"./index_173044340233.js";import{u as L}from"./useLogin_1730443402.js";import{u as P}from"./useBase_1730443402.js";const U={class:"page"},E={class:"bottom"},G={class:"form"},N=C(e({__name:"index",setup(e){const{onLogin:C}=L(),{pageHeight:N}=P(),A=o(),B=a({code:s,mobile:"",pwd:""}),D=async()=>{let e=RegExp(/^.{6,18}$/);if(!c(B.mobile))return g("Por favor, introduza o número de telefone correto");if(!e.test(B.pwd))return g("Por favor, introduz uma senha de 6 a 18 dígitos");f();let o={mobile:B.code+B.mobile,pwd:B.pwd},a=_(window.location.href);a.u&&(o.inviteUid=a.u);const{code:s,txt:t}=await b.register(o);0===s?(h("CompleteRegistration"),w("completeRegistration"),x("sign_up",{method:"Google"}),C(B,!0)):g(t)},F=()=>{A.push("/login")},H=t((()=>!B.mobile||!B.pwd));return(e,o)=>{const a=R,s=v,t=z,c=k,g=j,f=V,_=y;return l(),i("div",U,[d(a,{title:"Registar"}),r("div",{class:"page-body",style:p({height:u(N)})},[d(s,{src:"base/2logo.png",width:"6rem",type:"local"}),r("div",E,[d(t),r("div",G,[d(c,{modelValue:B.mobile,"onUpdate:modelValue":o[0]||(o[0]=e=>B.mobile=e),type:"mobile",maxlength:11,background:"#141618",placeholder:"Número de Celular"},null,8,["modelValue"]),d(c,{background:"#141618",modelValue:B.pwd,"onUpdate:modelValue":o[1]||(o[1]=e=>B.pwd=e),type:"password",placeholder:"Senha"},null,8,["modelValue"]),d(g,{class:"login-button",color:"#2F6368",size:"large",disabled:H.value,onClick:D},{default:n((()=>[m(" Criar Conta ")])),_:1},8,["disabled"]),r("p",null,[m(" Já tem uma conta? "),r("span",{style:{color:"#55ba57"},onClick:F},"Log in")])])])],4),d(_,{"offset-bottom":0,position:"bottom"},{default:n((()=>[d(f)])),_:1})])}}}),[["__scopeId","data-v-459e9a86"]]);export{N as default};