import{d as e,V as a,z as o,a8 as l,m as t,o as r,c as s,w as u,b as d,l as i,t as m,aj as n,ak as c,aK as f,ag as b,r as p,a as _,k as x}from"./index.26a6cf84.js";import{a as v,_ as h}from"./u-form-item.9efeed79.js";import{_ as j}from"./u-verification-code.3d8dc169.js";import{_ as g}from"./u-form.4eb8cd7e.js";import{_ as k}from"./u-button.ae3a4a51.js";import{_ as w}from"./plugin-vue_export-helper.21dcd24c.js";import"./u-icon.7191c6e8.js";import"./emitter.5b880544.js";var V=w(e({__name:"bind_mobile",setup(e){const w=a(),V=o(""),y=l(),B=e=>{V.value=e},C=t({type:"bind",mobile:"",code:""}),$=async()=>{var e,a;if(!C.mobile)return uni.$u.toast("请输入手机号码");(null==(e=w.value)?void 0:e.canGetCode)&&(await n({scene:c.BIND_MOBILE,mobile:C.mobile}),uni.$u.toast("发送成功"),null==(a=w.value)||a.start())},I=async()=>C.mobile?C.code?(await f(C,{token:y.temToken}),uni.$u.toast("绑定成功"),y.login(y.temToken),void setTimeout((()=>{b()}),1500)):uni.$u.toast("请输入验证码"):uni.$u.toast("请输入手机号码");return(e,a)=>{const o=p(_("u-input"),v),l=p(_("u-form-item"),h),t=p(_("u-verification-code"),j),n=x,c=p(_("u-form"),g),f=p(_("u-button"),k);return r(),s(n,{class:"bg-white min-h-full flex flex-col items-center px-[40rpx] pt-[40rpx] box-border"},{default:u((()=>[d(n,{class:"w-full"},{default:u((()=>[d(c,{borderBottom:"","label-width":150},{default:u((()=>[d(l,{label:"手机号",borderBottom:""},{default:u((()=>[d(o,{class:"flex-1",modelValue:C.mobile,"onUpdate:modelValue":a[0]||(a[0]=e=>C.mobile=e),border:!1,placeholder:"请输入手机号码"},null,8,["modelValue"])])),_:1}),d(l,{label:"验证码",borderBottom:""},{default:u((()=>[d(o,{class:"flex-1",modelValue:C.code,"onUpdate:modelValue":a[1]||(a[1]=e=>C.code=e),placeholder:"请输入验证码",border:!1},null,8,["modelValue"]),d(n,{class:"border-l border-solid border-0 border-light pl-3 text-muted leading-4 ml-3 w-[180rpx]",onClick:$},{default:u((()=>[d(t,{ref_key:"uCodeRef",ref:w,seconds:60,onChange:B,"change-text":"x秒"},null,512),i(" "+m(V.value),1)])),_:1})])),_:1})])),_:1}),d(n,{class:"mt-[40rpx]"},{default:u((()=>[d(f,{type:"primary",shape:"circle",onClick:I},{default:u((()=>[i(" 确定 ")])),_:1})])),_:1})])),_:1})])),_:1})}}}),[["__scopeId","data-v-76211013"]]);export{V as default};
