"use strict";const e=require("../../../../common/vendor.js"),r=require("../../../validate/form.js"),o=require("../../../hooks/useModal.js"),s=require("../../../api/member/user.js");if(require("../../../helper/test.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("../../../url/index.js"),require("../../../platform/pay.js"),require("../../../index.js"),require("../../../helper/index.js"),require("../../../helper/digit.js"),require("../../../config/zIndex.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("../../../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 i={__name:"change-password",setup(i){const a=e.ref(null),n=e.reactive({model:{mobile:"",code:"",password:""},rules:{code:r.code,password:r.password}});async function u(){/^(?![0-9]+$)(?![a-zA-Z]+$)[0-9A-Za-z]+\S{5,12}$/.test(n.model.password)||(console.log(123),e.index.showToast({icon:"error",title:"需包含字母和数字,长度在6-12之间"}));if(!(await e.unref(a).validate().catch((e=>{console.log("error: ",e)}))))return;const{code:r}=await s.UserApi.updateUserPassword(n.model);0===r&&o.closeAuthModal()}return(r,s)=>({a:e.t(e.unref(o.getSmsTimer)("resetPassword")),b:n.isMobileEnd,c:n.isMobileEnd?1:"",d:e.o((r=>e.unref(o.getSmsCode)("changePassword"))),e:e.o((e=>n.model.code=e)),f:e.p({placeholder:"请输入验证码",type:"number",maxlength:"4",inputBorder:!1,modelValue:n.model.code}),g:e.p({name:"code",label:"验证码"}),h:e.o(u),i:e.o((e=>n.model.password=e)),j:e.p({type:"password",placeholder:"请输入密码",inputBorder:!1,modelValue:n.model.password}),k:e.p({name:"reNewPassword",label:"密码"}),l:e.sr(a,"5e4672df-0",{k:"changePasswordRef"}),m:e.o((e=>n.model=e)),n:e.p({rules:n.rules,validateTrigger:"bind",labelWidth:"140",labelAlign:"center",modelValue:n.model}),o:e.o(((...r)=>e.unref(o.closeAuthModal)&&e.unref(o.closeAuthModal)(...r)))})}},a=e._export_sfc(i,[["__scopeId","data-v-5e4672df"]]);wx.createComponent(a);
