chunk-3c2d3cee.d8c0ac53.js 8.9 KB

1
  1. (window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-3c2d3cee"],{"1d63":function(e,t,n){},"3de5":function(e,t,n){},"43b9":function(e,t,n){"use strict";n.r(t);var o=n("1da1"),r=(n("ac1f"),n("5319"),n("96cf"),n("61f7")),i=n("bf2a"),s=n("6a1e"),a=n("9f53");i={name:"Login",components:{SocialSign:i.a},mixins:[a.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,n){""===t?n(new Error("请输入账号")):n()}}],mobile:[{required:!0,trigger:"blur",validator:function(e,t,n){""===t?n(new Error("手机号不能为空!")):Object(r.g)(t)?n():n(new Error("手机号不正确!"))}}],code:[{required:!0,trigger:"blur",validator:function(e,t,n){""===t?n(new Error("验证码不能为空!")):Object(r.i)(t)&&6===t.length?n():n(new Error("验证码应为6位数字!"))}}]},loginFormY:{newPassword:"",confirmPassword:""},loginRulesY:{newPassword:[{required:!0,trigger:"blur",validator:function(e,t,n){""===t?n(new Error("新密码不能为空!")):!Object(r.b)(t)||t.length<6||16<t.length?n(new Error("新密码为6-16位数字字母组合!")):Object(r.i)(t)?n(new Error("新密码不能为纯数字!")):Object(r.o)(t)?n(new Error("新密码不能为纯字母!")):n()}}],confirmPassword:[{required:!0,trigger:"blur",validator:function(t,n,o){""===n?o(new Error("确认密码不能为空!")):e.loginFormY.newPassword!==n?o(new Error("确认密码与新密码不一致!")):o()}}]},codeType:"code",capsTooltip:!1,loading:!1,showDialog:!1,redirect:void 0,otherQuery:{}}},created:function(){},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},s.a.resetpwd(t).then(function(){var t=Object(o.a)(regeneratorRuntime.mark((function t(n){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!n||0!==n.code){t.next=6;break}e.loading=!1,e.step++,e.setTime(),t.next=13;break;case 6:if(n&&100<=n.code&&n.code<=104)return t.next=9,e.logout();t.next=11;break;case 9:t.next=13;break;case 11:e.$message.warning(n.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")}}},n("ebdd"),n("672e"),a=n("2877"),n=Object(a.a)(i,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"forget-password"},[n("div",{staticClass:"forget-main"},[n("div",{staticClass:"my-card"},[e._m(0),n("div",{staticStyle:{margin:"8px 0 35px 0"}},[n("el-steps",{attrs:{active:e.step,simple:"","process-status":"finish","finish-status":"success"}},e._l(e.stepList,(function(e,t){return n("el-step",{key:t,attrs:{title:e}})})),1)],1),0===e.step?n("div",[n("el-form",{ref:"loginFormX",staticClass:"login-form",attrs:{model:e.loginFormX,rules:e.loginRulesX,autocomplete:"on","label-position":"left","label-width":"95px"}},[n("el-form-item",{attrs:{prop:"username",label:"账号:"}},[n("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),n("el-form-item",{attrs:{prop:"mobile",label:"手机号:"}},[n("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),n("el-form-item",{staticClass:"code-sign",attrs:{prop:"code",label:"验证码:"}},[n("ul",{staticClass:"code-main"},[n("li",[n("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),n("li",[n("SocialSign",{attrs:{mobile:e.loginFormX.mobile},on:{phoneErr:e.phoneErr}})],1)])]),n("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?n("div",[n("el-form",{ref:"loginFormY",staticClass:"login-form",attrs:{model:e.loginFormY,rules:e.loginRulesY,autocomplete:"on","label-position":"left","label-width":"100px"}},[n("el-form-item",{attrs:{prop:"newPassword",label:"新密码:"}},[n("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),n("el-form-item",{attrs:{prop:"confirmPassword",label:"确认密码:"}},[n("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),n("el-button-group",{staticStyle:{"margin-top":"10px"}},[n("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("上一步")]),n("el-button",{staticStyle:{width:"140px"},attrs:{type:"primary",loading:e.loading},nativeOn:{click:function(t){return t.preventDefault(),e.handleLoginY(t)}}},[e._v("下一步"),n("i",{staticClass:"el-icon-arrow-right el-icon--right"})])],1)],1)],1):n("div",{staticClass:"success-card"},[e._m(1),n("div",{staticClass:"teps-title"},[e._v("恭喜你,新密码设置成功!")]),n("div",{staticClass:"teps-time"},[n("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,"bc4a2840",null);t.default=n.exports},"672e":function(e,t,n){"use strict";n("3de5")},"6a1e":function(e,t,n){"use strict";var o=n("1b69");t.a={verfiy:function(e,t){return Object(o.a)("Api/verify_code",e,"post",t)},resetpwd:function(e,t){return Object(o.a)("Api/passmobile",e,"post",t)},resetmobile:function(e,t){return Object(o.a)("Api/resetmobile",e,"post",t)},setpwd:function(e,t){return Object(o.a)("Api/passsave",e,"post",t)},list:function(e,t){return Object(o.a)("admin/menu",e,"post",t)},detail:function(e,t){return Object(o.a)("Admin/userinfo",e,"post",t)},version:function(e,t){return Object(o.a)("Admin/lastversion",e,"post",t)},prefect:function(e,t){return Object(o.a)("Api/prefect",e,"post",t)}}},"7a70":function(e,t,n){},bf2a:function(e,t,n){"use strict";var o=n("1da1"),r=(n("96cf"),n("61f7")),i=n("6a1e"),s=n("9f53");s={props:{mobile:{type:String,default:""}},mixins:[s.a],data:function(){return{num:60,title:"获取验证码",timer:null}},computed:{},methods:{getCode:function(){var e=this;""!==this.mobile&&Object(r.g)(this.mobile)?60===this.num&&i.a.verfiy({mobile:this.mobile}).then(function(){var t=Object(o.a)(regeneratorRuntime.mark((function t(n){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!n||0!==n.code){t.next=4;break}e.timer=setInterval((function(){0!==e.num?(e.title="".concat(e.num,"s后可重发"),e.num--):(clearInterval(e.timer),e.num=60,e.title="获取验证码")}),1e3),t.next=10;break;case 4:if(n&&100<=n.code&&n.code<=104)return t.next=7,e.logout();t.next=9;break;case 7:t.next=10;break;case 9:e.$message.warning(n.message);case 10:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()):this.$emit("mobileErr",!1)}}},n("f36d"),n=n("2877"),n=Object(n.a)(s,(function(){var e=this,t=e.$createElement;return(e._self._c||t)("el-button",{staticClass:"send-verification-code",attrs:{type:e.num<60?"info":"primary",plain:e.num<60,disabled:e.num<60},on:{click:e.getCode}},[e._v(e._s(e.title))])}),[],!1,null,"a4e6982a",null);t.a=n.exports},ebdd:function(e,t,n){"use strict";n("7a70")},f36d:function(e,t,n){"use strict";n("1d63")}}]);