"use strict";const e=require("../../../../common/vendor.js"),r=require("../../../index.js"),o=require("../../../validate/form.js"),s=require("../../../hooks/useModal.js"),i=require("../../../api/member/user.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/auth.js"),require("../../../api/member/social.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 u={__name:"reset-password",setup(u){const a=e.ref(null),n=e.computed((()=>r.sheep.$store("user").isLogin)),t=e.reactive({isMobileEnd:!1,model:{mobile:"",code:"",password:""},rules:{code:o.code,mobile:o.mobile,password:o.password}}),l=async()=>{if(!(await e.unref(a).validate().catch((e=>{console.log("error: ",e)}))))return;const{code:r}=await i.UserApi.resetUserPassword(t.model);0===r&&s.showAuthModal("accountLogin")};return(r,o)=>e.e({a:e.t(e.unref(s.getSmsTimer)("resetPassword")),b:t.isMobileEnd,c:t.isMobileEnd?1:"",d:e.o((r=>e.unref(s.getSmsCode)("resetPassword",t.model.mobile))),e:e.o((e=>t.model.mobile=e)),f:e.p({placeholder:"请输入手机号",type:"number",inputBorder:!1,modelValue:t.model.mobile}),g:e.p({name:"mobile",label:"手机号"}),h:e.o((e=>t.model.code=e)),i:e.p({placeholder:"请输入验证码",type:"number",maxlength:"4",inputBorder:!1,modelValue:t.model.code}),j:e.p({name:"code",label:"验证码"}),k:e.o(l),l:e.o((e=>t.model.password=e)),m:e.p({type:"password",placeholder:"请输入密码",inputBorder:!1,modelValue:t.model.password}),n:e.p({name:"password",label:"密码"}),o:e.sr(a,"35234133-0",{k:"resetPasswordRef"}),p:e.o((e=>t.model=e)),q:e.p({rules:t.rules,validateTrigger:"bind",labelWidth:"140",labelAlign:"center",modelValue:t.model}),r:!n.value},n.value?{}:{s:e.o((r=>e.unref(s.showAuthModal)("accountLogin")))})}},a=e._export_sfc(u,[["__scopeId","data-v-35234133"]]);wx.createComponent(a);
