2 lines
2.6 KiB
JavaScript
2 lines
2.6 KiB
JavaScript
import{d as e,V as a,z as l,Z as t,G as o,o as r,g as s,e as d,w as i,l as u,j as n,t as m,F as p,ac as c,ad as x,aE as b,aj as f,r as _,a as g,p as h,a4 as y}from"./index-f587024c.js";import{_ as v}from"./page-meta.b7dbb920.js";import{_ as j}from"./u-input.5c55ca92.js";import{_ as V}from"./u-verification-code.13ed6308.js";import{_ as k}from"./u-button.19e05f63.js";import{_ as w}from"./_plugin-vue_export-helper.1b428a4d.js";import"./u-icon.03bca05a.js";import"./emitter.1571a5d9.js";const $=w(e({__name:"bind_mobile",setup(e){const w=a(),$=l(""),C=t(),E=e=>{$.value=e},G=o({type:"bind",mobile:"",code:""}),I=async()=>{var e,a;if(!G.mobile)return uni.$u.toast("请输入手机号码");(null==(e=w.value)?void 0:e.canGetCode)&&(await c({scene:x.BIND_MOBILE,mobile:G.mobile}),uni.$u.toast("发送成功"),null==(a=w.value)||a.start())},S=async()=>G.mobile?G.code?(await b(G,{token:C.temToken}),uni.$u.toast("绑定成功"),C.login(C.temToken),void f()):uni.$u.toast("请输入验证码"):uni.$u.toast("请输入手机号码");return(e,a)=>{const l=_(g("page-meta"),v),t=h,o=_(g("u-input"),j),c=_(g("u-verification-code"),V),x=y,b=_(g("u-button"),k);return r(),s(p,null,[d(l,{"page-style":e.$theme.pageStyle},null,8,["page-style"]),d(t,{class:"bg-white min-h-full flex flex-col items-center px-[40rpx] pt-[40rpx] box-border"},{default:i((()=>[d(t,{class:"w-full"},{default:i((()=>[d(t,{class:"text-2xl font-medium mb-[60rpx]"},{default:i((()=>[u("绑定手机号")])),_:1}),d(t,{class:"px-[18rpx] border border-solid border-lightc border-light rounded-[10rpx] h-[100rpx] items-center flex"},{default:i((()=>[d(o,{class:"flex-1",modelValue:G.mobile,"onUpdate:modelValue":a[0]||(a[0]=e=>G.mobile=e),border:!1,placeholder:"请输入手机号码"},null,8,["modelValue"])])),_:1}),d(t,{class:"px-[18rpx] border border-solid border-lightc border-light rounded-[10rpx] h-[100rpx] items-center flex mt-[40rpx]"},{default:i((()=>[d(o,{class:"flex-1",modelValue:G.code,"onUpdate:modelValue":a[1]||(a[1]=e=>G.code=e),placeholder:"请输入验证码",border:!1},null,8,["modelValue"]),d(t,{class:"border-l border-solid border-0 border-light pl-3 leading-4 ml-3 w-[180rpx]",onClick:I},{default:i((()=>[d(c,{ref_key:"uCodeRef",ref:w,seconds:60,onChange:E,"change-text":"x秒"},null,512),d(x,{class:n(G.mobile?"text-primary":"text-muted")},{default:i((()=>[u(m($.value),1)])),_:1},8,["class"])])),_:1})])),_:1}),d(t,{class:"mt-[40rpx]"},{default:i((()=>[d(b,{type:"primary","hover-class":"none",customStyle:{height:"100rpx",opacity:G.mobile&&G.code?"1":"0.5"},onClick:S},{default:i((()=>[u(" 确定 ")])),_:1},8,["customStyle"])])),_:1})])),_:1})])),_:1})],64)}}}),[["__scopeId","data-v-4605d615"]]);export{$ as default};
|