chunk-2e9cc266.735e7f83.js 6.9 KB

1
  1. (window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-2e9cc266"],{"43b9":function(e,t,o){"use strict";o.r(t);var r=o("1da1"),n=(o("ac1f"),o("5319"),o("96cf"),o("61f7")),i=o("6a1e"),s={name:"Login",mixins:[o("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,o){""===t?o(new Error("请输入账号")):o()}}],mobile:[{required:!0,trigger:"blur",validator:function(e,t,o){""===t?o(new Error("手机号不能为空!")):Object(n.g)(t)?o():o(new Error("手机号不正确!"))}}],code:[{required:!0,trigger:"blur",validator:function(e,t,o){""===t?o(new Error("验证码不能为空!")):Object(n.h)(t)&&6===t.length?o():o(new Error("验证码应为6位数字!"))}}]},loginFormY:{newPassword:"",confirmPassword:""},loginRulesY:{newPassword:[{required:!0,trigger:"blur",validator:function(e,t,o){""===t?o(new Error("新密码不能为空!")):!Object(n.b)(t)||t.length<6||16<t.length?o(new Error("新密码为6-16位数字字母组合!")):Object(n.h)(t)?o(new Error("新密码不能为纯数字!")):Object(n.i)(t)?o(new Error("新密码不能为纯字母!")):o()}}],confirmPassword:[{required:!0,trigger:"blur",validator:function(t,o,r){""===o?r(new Error("确认密码不能为空!")):e.loginFormY.newPassword!==o?r(new Error("确认密码与新密码不一致!")):r()}}]},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;this.$refs.loginFormY.validate((function(t){if(!t)return!1;e.loading||(e.loading=!0,t={username:e.loginFormX.username,mobile:e.loginFormX.mobile,code:e.loginFormX.code,password:e.loginFormY.newPassword},i.a.resetpwd(t).then(function(){var t=Object(r.a)(regeneratorRuntime.mark((function t(o){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!o||0!==o.code){t.next=6;break}e.loading=!1,e.step++,e.setTime(),t.next=13;break;case 6:if(o&&100<=o.code&&o.code<=104)return t.next=9,e.logout();t.next=11;break;case 9:t.next=13;break;case 11:e.$message.warning(o.message),e.loading=!1;case 13:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()))}))},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")}}};o("ebdd"),o("a6e7"),o=o("2877"),o=Object(o.a)(s,(function(){var e=this,t=e.$createElement,o=e._self._c||t;return o("div",{staticClass:"forget-password"},[o("div",{staticClass:"forget-main"},[o("div",{staticClass:"my-card"},[e._m(0),o("div",{staticStyle:{margin:"8px 0 35px 0"}},[o("el-steps",{attrs:{active:e.step,simple:"","process-status":"finish","finish-status":"success"}},e._l(e.stepList,(function(e,t){return o("el-step",{key:t,attrs:{title:e}})})),1)],1),0===e.step?o("div",[o("el-form",{ref:"loginFormX",staticClass:"login-form",attrs:{model:e.loginFormX,rules:e.loginRulesX,autocomplete:"on","label-position":"left","label-width":"95px"}},[o("el-form-item",{attrs:{prop:"username",label:"账号:"}},[o("el-input",{ref:"username",attrs:{placeholder:"账号",name:"username",type:"text",tabindex:"1",autocomplete:"on"},model:{value:e.loginFormX.username,callback:function(t){e.$set(e.loginFormX,"username",t)},expression:"loginFormX.username"}})],1),o("el-form-item",{attrs:{prop:"mobile",label:"手机号:"}},[o("el-input",{ref:"mobile",attrs:{placeholder:"手机号",name:"mobile",type:"text",tabindex:"1",autocomplete:"on"},model:{value:e.loginFormX.mobile,callback:function(t){e.$set(e.loginFormX,"mobile",t)},expression:"loginFormX.mobile"}})],1),o("el-form-item",{staticClass:"code-sign",attrs:{prop:"code",label:"验证码:"}},[o("ul",{staticClass:"code-main"},[o("li",[o("el-input",{ref:"code",attrs:{placeholder:"验证码",name:"code",type:"text",tabindex:"1",autocomplete:"on"},model:{value:e.loginFormX.code,callback:function(t){e.$set(e.loginFormX,"code",t)},expression:"loginFormX.code"}})],1),o("li",[o("send-verification-code",{attrs:{mobile:e.loginFormX.mobile},on:{phoneErr:e.phoneErr}})],1)])]),o("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?o("div",[o("el-form",{ref:"loginFormY",staticClass:"login-form",attrs:{model:e.loginFormY,rules:e.loginRulesY,autocomplete:"on","label-position":"left","label-width":"100px"}},[o("el-form-item",{attrs:{prop:"newPassword",label:"新密码:"}},[o("el-input",{ref:"newPassword",attrs:{placeholder:"6-16位数字字母组合",name:"newPassword",type:"password",tabindex:"1",autocomplete:"on"},model:{value:e.loginFormY.newPassword,callback:function(t){e.$set(e.loginFormY,"newPassword",t)},expression:"loginFormY.newPassword"}})],1),o("el-form-item",{attrs:{prop:"confirmPassword",label:"确认密码:"}},[o("el-input",{ref:"confirmPassword",attrs:{placeholder:"6-16位数字字母组合",name:"confirmPassword",type:"password",tabindex:"1",autocomplete:"on"},model:{value:e.loginFormY.confirmPassword,callback:function(t){e.$set(e.loginFormY,"confirmPassword",t)},expression:"loginFormY.confirmPassword"}})],1),o("el-button-group",{staticStyle:{"margin-top":"10px"}},[o("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("上一步")]),o("el-button",{staticStyle:{width:"140px"},attrs:{type:"primary",loading:e.loading},nativeOn:{click:function(t){return t.preventDefault(),e.handleLoginY(t)}}},[e._v("下一步"),o("i",{staticClass:"el-icon-arrow-right el-icon--right"})])],1)],1)],1):o("div",{staticClass:"success-card"},[e._m(1),o("div",{staticClass:"teps-title"},[e._v("恭喜你,新密码设置成功!")]),o("div",{staticClass:"teps-time"},[o("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,"825e5ed4",null);t.default=o.exports},"7a70":function(e,t,o){},a6e7:function(e,t,o){"use strict";o("de32")},de32:function(e,t,o){},ebdd:function(e,t,o){"use strict";o("7a70")}}]);