1 |
- import{a as w,ad as R,r as C,W as B,b as d,c as E,j as N,h as l,f as o,u as e,m as S,x as _,p as g,q as T,aX as U}from"./index.4d061c66.js";import{M as f,u as z}from"./user.9f12eebb.js";import{p as F}from"./rule.22a721d7.js";import{E as I}from"./index.95d2117b.js";import{u as y}from"./verifyCode.d3960c3a.js";import{u as h}from"./hooks.9f8f44e2.js";const $={class:"w-full flex justify-between"},L=w({__name:"phone",setup(j){const{t:a}=R(),r=C(!1),t=B({phone:"",verifyCode:""}),p=C(),{isDisabled:V,text:v}=y(),x=async m=>{r.value=!0,m&&await m.validate((n,i)=>{if(n)setTimeout(()=>{I.success(T(U("login.loginSuccess"))),r.value=!1},2e3);else return r.value=!1,i})};function b(){y().end(),z().SET_CURRENTPAGE(0)}return(m,n)=>{const i=d("el-input"),u=d("el-form-item"),c=d("el-button"),k=d("el-form");return E(),N(k,{ref_key:"ruleFormRef",ref:p,model:t,rules:e(F),size:"large"},{default:l(()=>[o(e(f),null,{default:l(()=>[o(u,{prop:"phone"},{default:l(()=>[o(i,{clearable:"",modelValue:t.phone,"onUpdate:modelValue":n[0]||(n[0]=s=>t.phone=s),placeholder:e(a)("login.phone"),"prefix-icon":e(h)("iphone")},null,8,["modelValue","placeholder","prefix-icon"])]),_:1})]),_:1}),o(e(f),{delay:100},{default:l(()=>[o(u,{prop:"verifyCode"},{default:l(()=>[S("div",$,[o(i,{clearable:"",modelValue:t.verifyCode,"onUpdate:modelValue":n[1]||(n[1]=s=>t.verifyCode=s),placeholder:e(a)("login.smsVerifyCode"),"prefix-icon":e(h)("ri:shield-keyhole-line",{online:!0})},null,8,["modelValue","placeholder","prefix-icon"]),o(c,{disabled:e(V),class:"ml-2",onClick:n[2]||(n[2]=s=>e(y)().start(p.value,"phone"))},{default:l(()=>[_(g(e(v).length>0?e(v)+e(a)("login.info"):e(a)("login.getVerifyCode")),1)]),_:1},8,["disabled"])])]),_:1})]),_:1}),o(e(f),{delay:150},{default:l(()=>[o(u,null,{default:l(()=>[o(c,{class:"w-full",size:"default",type:"primary",loading:r.value,onClick:n[3]||(n[3]=s=>x(p.value))},{default:l(()=>[_(g(e(a)("login.login")),1)]),_:1},8,["loading"])]),_:1})]),_:1}),o(e(f),{delay:200},{default:l(()=>[o(u,null,{default:l(()=>[o(c,{class:"w-full",size:"default",onClick:b},{default:l(()=>[_(g(e(a)("login.back")),1)]),_:1})]),_:1})]),_:1})]),_:1},8,["model","rules"])}}});export{L as default};
|