text: (window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-2d21d095"],{d01d:function(t,e,n){"use strict";n.r(e);var r=n("1da1"),s=n("6b5b");const i=[{placeholder:"手机号码",value:"",type:"text",isWarnng:!1,isError:!1,warningText:"",errorText:"",description:"请填写注册时绑定的手机号码",noneEmptyText:"请填写手机号",noneCheckText:"请确认手机号的格式是否填写正确"},{placeholder:"新密码",value:"",type:"password",isWarnng:!1,isError:!1,warningText:"",errorText:"",description:"6-16个字符，只能是字母、数字和下划线",noneEmptyText:"密码不能为空，请输入密码",noneCheckText:"密码格式不正确，请重新填写"},{placeholder:"确认密码",value:"",type:"password",isWarnng:!1,isError:!1,warningText:"",errorText:"",description:"",noneEmptyText:"密码不能为空，请输入密码",noneCheckText:"与前一次不相同，请确保两次密码输入已知"}];var a={name:"SignReset",data:()=>({inputs:i,resetBtnDisable:!1}),methods:{onResetPassword(){var t=this;this.validate()&&this.check()&&this.$loading(Object(r.a)(function*(){t.resetBtnDisable=!0;const e=[t.inputs[0].value,t.inputs[1].value],n=e[0],r=e[1];Object(s.e)({account:n,password:r}).then(e=>{2e3===e.code&&(t.$vs.notify({title:"重置成功",text:"密码已重置，请重新登录~",position:"top-center",color:"success"}),t.switchToSignIn())})}),{background:"primary",color:"#fff",container:"#resetBtn",scale:.45},()=>{this.resetBtnDisable=!1})},validate(){return this.inputs.every(t=>!(t.value.length<=0)||(t.isWarnng=!0,t.warningText=t.noneEmptyText,!1))},check(){return/^[1]([3-9])[0-9]{9}$/.test(this.inputs[0].value)?/^[\w]{6,16}$/.test(this.inputs[1].value)?this.inputs[1].value===this.inputs[2].value||(this.inputs[2].isError=!0,this.inputs[2].errorText=this.inputs[2].noneCheckText,!1):(this.inputs[1].isError=!0,this.inputs[1].errorText=this.inputs[1].noneCheckText,!1):(this.inputs[0].isError=!0,this.inputs[0].errorText=this.inputs[0].noneCheckText,!1)},switchToSignIn(){this.$emit("switchComponent","SignIn"),document.title="登录 - 乐享校园"}}},o=n("2877"),c=Object(o.a)(a,function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"w-full"},[n("p",{staticClass:"w-full pb-4 flex items-center text-2xl font-bold text-gray-700"},[t._v("\n    重置密码\n  ")]),t._l(t.inputs,function(e,r){return n("vs-input",{key:r,staticClass:"w-full pb-1",attrs:{"val-icon-warning":"warning","val-icon-danger":"clear",type:e.type,"label-placeholder":e.placeholder,warning:e.isWarnng,"warning-text":e.warningText,danger:e.isError,"danger-text":e.errorText,"description-text":e.description},on:{focus:function(t){e.isWarnng=!1,e.isError=!1},keyup:function(e){if(!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter"))return null;2===r&&t.onResetPassword()}},model:{value:e.value,callback:function(n){t.$set(e,"value","string"==typeof n?n.trim():n)},expression:"item.value"}})}),n("vs-button",{staticClass:"w-full mt-3 mb-1 vs-con-loading__container",attrs:{id:"resetBtn",color:"rgba(var(--vs-primary), 1)","gradient-color-secondary":"rgba(var(--vs-primary), .7)",type:"gradient",disabled:t.resetBtnDisable},on:{click:function(e){return t.onResetPassword()}}},[t._v("重置密码")]),n("p",{staticClass:"mt-1 text-center text-gray-500 text-xs cursor-pointer",on:{click:function(e){return t.switchToSignIn()}}},[t._v("返回到登录")])],2)},[],!1,null,null,null);e.default=c.exports}}]);