"use strict";const e=require("../../../../common/vendor.js");require("../../../index.js");const r=require("../../../validate/form.js"),i=require("../../../hooks/useModal.js"),o=require("../../../api/member/auth.js");if(require("../../../url/index.js"),require("../../../store/index.js"),require("../../../store/app.js"),require("../../../api/promotion/diy.js"),require("../../../request/index.js"),require("../../../config/index.js"),require("../../../platform/index.js"),require("../../../platform/provider/wechat/index.js"),require("../../../platform/provider/wechat/miniProgram.js"),require("../../../api/member/social.js"),require("../../../api/member/user.js"),require("../../../platform/provider/apple/index.js"),require("../../../platform/share.js"),require("../../../router/index.js"),require("../../../helper/throttle.js"),require("../../../platform/pay.js"),require("../../../helper/index.js"),require("../../../helper/test.js"),require("../../../helper/digit.js"),require("../../../api/pay/order.js"),require("../../../store/user.js"),require("../../../store/cart.js"),require("../../../api/trade/cart.js"),require("../../../api/pay/wallet.js"),require("../../../api/trade/order.js"),require("../../../api/promotion/coupon.js"),require("../../../store/sys.js"),require("../../../store/modal.js"),require("../../../config/zIndex.js"),require("../../../api/member/signin.js"),!Array){(e.resolveComponent("uni-easyinput")+e.resolveComponent("uni-forms-item")+e.resolveComponent("uni-forms"))()}Math||((()=>"../../../../uni_modules/uni-easyinput/components/uni-easyinput/uni-easyinput.js")+(()=>"../../../../uni_modules/uni-forms/components/uni-forms-item/uni-forms-item.js")+(()=>"../../../../uni_modules/uni-forms/components/uni-forms/uni-forms.js"))();const s={__name:"officialAccountFirstLogin",emits:["onConfirm"],setup(s,{emit:n}){const u=e.ref(null),t=e.reactive({isMobileEnd:!1,codeText:"获取验证码",model:{mobile:"",code:""},rules:{code:r.code,mobile:r.mobile}});async function m(){if(!(await e.unref(u).validate().catch((e=>{console.log("error: ",e)}))))return;const{code:r}=await o.AuthUtil.smsLogin(t.model);0===r&&i.closeAuthModal()}return(r,o)=>({a:e.t(e.unref(i.getSmsTimer)("smsLogin")),b:t.isMobileEnd,c:t.isMobileEnd?1:"",d:e.o((r=>e.unref(i.getSmsCode)("smsLogin",t.model.mobile))),e:e.o((e=>t.model.mobile=e)),f:e.p({placeholder:"请输入手机号",inputBorder:!1,type:"number",modelValue:t.model.mobile}),g:e.p({name:"mobile",label:"手机号"}),h:e.o((e=>t.model.code=e)),i:e.p({placeholder:"请输入验证码",inputBorder:!1,type:"number",maxlength:"4",modelValue:t.model.code}),j:e.p({name:"code",label:"验证码"}),k:e.sr(u,"ed448707-0",{k:"smsLoginRef"}),l:e.o((e=>t.model=e)),m:e.p({rules:t.rules,validateTrigger:"bind",labelWidth:"140",labelAlign:"center",modelValue:t.model}),n:e.o(m)})}},n=e._export_sfc(s,[["__scopeId","data-v-ed448707"]]);wx.createComponent(n);
