1 |
- (window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-482cb3ce"],{"2adf":function(e,t,r){},"43b9":function(e,t,r){"use strict";r.r(t);var o=r("1da1"),n=(r("ac1f"),r("5319"),r("96cf"),r("61f7")),i=r("b86f"),s={name:"Login",mixins:[r("9f53").a],data:function(){var e=this;return{stepList:["验证身份","重设密码","设置成功"],timer:null,num:3,step:0,loginFormX:{username:"",mobile:"",code:""},loginRulesX:{username:[{required:!0,trigger:"blur",validator:function(e,t,r){""===t?r(new Error("请输入账号")):r()}}],mobile:[{required:!0,trigger:"blur",validator:function(e,t,r){""===t?r(new Error("手机号不能为空!")):Object(n.f)(t)?r():r(new Error("手机号不正确!"))}}],code:[{required:!0,trigger:"blur",validator:function(e,t,r){""===t?r(new Error("验证码不能为空!")):Object(n.h)(t)&&6===t.length?r():r(new Error("验证码应为6位数字!"))}}]},loginFormY:{newPassword:"",confirmPassword:""},loginRulesY:{newPassword:[{required:!0,trigger:"blur",validator:function(e,t,r){""===t?r(new Error("新密码不能为空!")):!Object(n.b)(t)||t.length<6||16<t.length?r(new Error("新密码为6-16位数字字母组合!")):Object(n.h)(t)?r(new Error("新密码不能为纯数字!")):Object(n.i)(t)?r(new Error("新密码不能为纯字母!")):r()}}],confirmPassword:[{required:!0,trigger:"blur",validator:function(t,r,o){""===r?o(new Error("确认密码不能为空!")):e.loginFormY.newPassword!==r?o(new Error("确认密码与新密码不一致!")):o()}}]},codeType:"code",capsTooltip:!1,loading:!1,showDialog:!1,redirect:void 0,otherQuery:{}}},mounted:function(){""===this.loginFormX.mobile&&this.$refs.mobile.focus(),""===this.loginFormX.code&&this.$refs.code.focus()},destroyed:function(){},methods:{modifyPostLevel:function(e){this.step=e},phoneErr:function(e){e||this.$refs.loginFormX.validateField("mobile")},checkCapslock:function(e){e=e.key,this.capsTooltip=e&&1===e.length&&"A"<=e&&e<="Z"},handleLoginX:function(){var e=this;this.$refs.loginFormX.validate((function(t){if(!t)return!1;e.step++}))},handleLoginY:function(){var e=this;return Object(o.a)(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.$refs.loginFormY.validate(function(){var t=Object(o.a)(regeneratorRuntime.mark((function t(r){var o,n,s;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!r){t.next=15;break}if(e.loading){t.next=13;break}return e.loading=!0,o={username:e.loginFormX.username,mobile:e.loginFormX.mobile,code:e.loginFormX.code,password:e.loginFormY.newPassword},t.next=6,i.a.resetpwd(o);case 6:return o=t.sent,t.next=9,e.useResHandle(o);case 9:s=t.sent,n=s.code,s=s.message,0===n?(e.loading=!1,e.step++,e.setTime()):(e.$message.warning(s),e.loading=!1);case 13:t.next=16;break;case 15:return t.abrupt("return",!1);case 16:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}());case 2:case"end":return t.stop()}}),t)})))()},setTime:function(){var e=this;this.timer=setInterval((function(){0!==e.num?e.num--:e.timer&&(clearInterval(e.timer),e.num=3,e.gotoLogin())}),1e3)},gotoLogin:function(){window.vm.$router.replace("/login")}}};r("ebdd"),r("aa1b"),r=r("2877"),r=Object(r.a)(s,(function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticClass:"forget-password"},[r("div",{staticClass:"forget-main"},[r("div",{staticClass:"my-card"},[e._m(0),r("div",{staticStyle:{margin:"8px 0 35px 0"}},[r("el-steps",{attrs:{active:e.step,simple:"","process-status":"finish","finish-status":"success"}},e._l(e.stepList,(function(e,t){return r("el-step",{key:t,attrs:{title:e}})})),1)],1),0===e.step?r("div",[r("el-form",{ref:"loginFormX",staticClass:"login-form",attrs:{model:e.loginFormX,rules:e.loginRulesX,autocomplete:"on","label-position":"left","label-width":"95px"}},[r("el-form-item",{attrs:{prop:"username",label:"账号:"}},[r("el-input",{ref:"username",attrs:{placeholder:"账号",name:"username",type:"text",tabindex:"1",maxlength:"50",autocomplete:"on"},model:{value:e.loginFormX.username,callback:function(t){e.$set(e.loginFormX,"username",t)},expression:"loginFormX.username"}})],1),r("el-form-item",{attrs:{prop:"mobile",label:"手机号:"}},[r("el-input",{ref:"mobile",attrs:{placeholder:"手机号",name:"mobile",type:"text",tabindex:"1",maxlength:"11",autocomplete:"on"},model:{value:e.loginFormX.mobile,callback:function(t){e.$set(e.loginFormX,"mobile",t)},expression:"loginFormX.mobile"}})],1),r("el-form-item",{staticClass:"code-sign",attrs:{prop:"code",label:"验证码:"}},[r("ul",{staticClass:"code-main"},[r("li",[r("el-input",{ref:"code",attrs:{placeholder:"验证码",name:"code",type:"text",tabindex:"1",maxlength:"50",autocomplete:"on"},model:{value:e.loginFormX.code,callback:function(t){e.$set(e.loginFormX,"code",t)},expression:"loginFormX.code"}})],1),r("li",[r("send-verification-code",{attrs:{mobile:e.loginFormX.mobile},on:{phoneErr:e.phoneErr}})],1)])]),r("el-button",{staticStyle:{width:"100%","margin-top":"10px"},attrs:{type:"primary"},nativeOn:{click:function(t){return t.preventDefault(),e.handleLoginX(t)}}},[e._v("下一步")])],1)],1):1===e.step?r("div",[r("el-form",{ref:"loginFormY",staticClass:"login-form",attrs:{model:e.loginFormY,rules:e.loginRulesY,autocomplete:"on","label-position":"left","label-width":"100px"}},[r("el-form-item",{attrs:{prop:"newPassword",label:"新密码:"}},[r("el-input",{ref:"newPassword",attrs:{placeholder:"6-16位数字字母组合",name:"newPassword",type:"password",tabindex:"1",maxlength:"16",autocomplete:"on"},model:{value:e.loginFormY.newPassword,callback:function(t){e.$set(e.loginFormY,"newPassword",t)},expression:"loginFormY.newPassword"}})],1),r("el-form-item",{attrs:{prop:"confirmPassword",label:"确认密码:"}},[r("el-input",{ref:"confirmPassword",attrs:{placeholder:"6-16位数字字母组合",name:"confirmPassword",type:"password",tabindex:"1",maxlength:"16",autocomplete:"on"},model:{value:e.loginFormY.confirmPassword,callback:function(t){e.$set(e.loginFormY,"confirmPassword",t)},expression:"loginFormY.confirmPassword"}})],1),r("el-button-group",{staticStyle:{"margin-top":"10px"}},[r("el-button",{staticStyle:{width:"140px"},attrs:{type:"primary",disabled:e.loading,icon:"el-icon-arrow-left"},nativeOn:{click:function(t){t.preventDefault(),e.step=0}}},[e._v("上一步")]),r("el-button",{staticStyle:{width:"140px"},attrs:{type:"primary",loading:e.loading},nativeOn:{click:function(t){return t.preventDefault(),e.handleLoginY(t)}}},[e._v("下一步"),r("i",{staticClass:"el-icon-arrow-right el-icon--right"})])],1)],1)],1):r("div",{staticClass:"success-card"},[e._m(1),r("div",{staticClass:"teps-title"},[e._v("恭喜你,新密码设置成功!")]),r("div",{staticClass:"teps-time"},[r("span",[e._v(e._s(e.num))]),e._v("秒后自动返回 ")])])])])])}),[function(){var e=this,t=e.$createElement;t=e._self._c||t;return t("div",{staticClass:"title-container"},[t("h3",{staticClass:"title"},[e._v("设置新登录密码")])])},function(){var e=this.$createElement;e=this._self._c||e;return e("div",{staticClass:"success-icon"},[e("i",{staticClass:"el-icon-success"})])}],!1,null,"556fc940",null);t.default=r.exports},"7a70":function(e,t,r){},aa1b:function(e,t,r){"use strict";r("2adf")},ebdd:function(e,t,r){"use strict";r("7a70")}}]);
|