| 1 |
- (window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-71e7"],{"6uU5":function(e,t,s){},IMFv:function(e,t,s){"use strict";s.r(t);var o=s("XJYT"),r={name:"Forget",components:{},data:function(){var e=this;return{active:0,logo:"",name:"",new_form:{password:"",re_password:""},form:{mobile:"",code:"",username:""},rules:{password:[{required:!0,trigger:"blur",message:"请输入密码"}],re_password:[{validator:function(t,s,o){""===s?o(new Error("请再次输入密码")):s!==e.new_form.password?o(new Error("两次输入密码不一致!")):o()},required:!0,trigger:"blur"}]},show:!0,count:"",passwordType:"password"}},watch:{},created:function(){this.getLoginSite()},destroyed:function(){},methods:{getLoginSite:function(){var e=this;$http.get("/admin/login/site",{}).then(function(t){1===t.result?(e.logo=t.data.site_logo,e.name=t.data.name):t.msg&&""!=t.msg&&o.MessageBox.alert(t.msg)}).catch(function(e){console.log(e)})},getCode:function(){var e=this;this.fun.isMoblie(this.form.mobile)?this.$message.error("请输入正确的手机号码"):this.form.username?$http.post("/admin/sendCode",{mobile:this.form.mobile,username:this.form.username}," ").then(function(t){1===t.result?e.getTimer():t.msg&&""!=t.msg&&o.MessageBox.alert(t.msg)}).catch(function(e){console.log(e)}):this.$message.error("请输入用户名")},next:function(){var e=this;this.form.code?$http.post("/admin/checkCode/",{mobile:this.form.mobile,code:this.form.code}," ").then(function(t){1===t.result?e.active++:t.msg&&""!=t.msg&&o.MessageBox.alert(t.msg)}).catch(function(e){console.log(e)}):this.$message.error("请输入验证码")},submitForm:function(){var e=this;this.$refs.new_form.validate(function(t){if(!t)return console.log("error submit!!"),!1;$http.post("/admin/changePwd/",{username:e.form.username,mobile:e.form.mobile,code:e.form.code,pwd:e.new_form.password,confirm_password:e.new_form.re_password},"提交中").then(function(t){1===t.result?(t.msg&&""!=t.msg&&e.$message.success(t.msg),e.active=e.active+2):t.msg&&""!=t.msg&&e.$message.error(t.msg)}).catch(function(e){console.error(e)})})},toLogin:function(){this.$router.push({path:"/login"})},showPwd:function(){"password"===this.passwordType?this.passwordType="":this.passwordType="password"},getTimer:function(){var e=this;this.timer||(this.count=60,this.show=!1,this.timer=setInterval(function(){e.count>0&&e.count<=60?e.count--:(e.show=!0,clearInterval(e.timer),e.timer=null)},1e3))}}},i=(s("Tzbl"),s("KHd+")),a=Object(i.a)(r,function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"forget-container"},[s("div",{staticStyle:{width:"900px",margin:"0 auto"}},[s("div",{staticClass:"head"},[s("el-col",{staticStyle:{width:"36px",height:"36px",overflow:"hidden","margin-right":"10px"},attrs:{xs:8,sm:8,md:4,lg:1}},[s("img",{staticStyle:{width:"100%"},attrs:{src:e.logo,alt:""}})]),e._v(" "),s("el-col",{attrs:{span:15}},[s("div",{staticStyle:{color:"#666","font-size":"24px","font-weight":"900","line-height":"36px"}},[e._v("\n "+e._s(e.name)+"\n ")])])],1),e._v(" "),s("el-steps",{staticStyle:{"margin-top":"20px"},attrs:{active:e.active,"align-center":""}},[s("el-step",{attrs:{title:"验证手机号"}}),e._v(" "),s("el-step",{attrs:{title:"设置新密码"}}),e._v(" "),s("el-step",{attrs:{title:"完成"}})],1),e._v(" "),s("el-row",{staticClass:"content_info"},[s("el-col",{staticClass:"login_input",attrs:{span:24}},[0==e.active?s("el-form",{ref:"form",staticClass:"login-form",attrs:{model:e.form,rules:e.rules,"label-position":"top","label-width":"15%"}},[s("el-form-item",{attrs:{label:"请输入用户名",prop:"username"}},[s("el-input",{staticStyle:{width:"50%"},attrs:{placeholder:"请输入用户名"},model:{value:e.form.username,callback:function(t){e.$set(e.form,"username",t)},expression:"form.username"}})],1),e._v(" "),s("el-form-item",{attrs:{label:"请输入绑定的密保手机号",prop:"mobile"}},[s("el-input",{staticStyle:{width:"50%"},attrs:{placeholder:"请输入绑定的密保手机号"},model:{value:e.form.mobile,callback:function(t){e.$set(e.form,"mobile",t)},expression:"form.mobile"}}),e._v(" "),s("el-button",{directives:[{name:"show",rawName:"v-show",value:e.show,expression:"show"}],attrs:{type:"primary",size:"small"},nativeOn:{click:function(t){return t.preventDefault(),e.getCode(t)}}},[e._v("\n 获取手机验证码\n ")]),e._v(" "),s("el-button",{directives:[{name:"show",rawName:"v-show",value:!e.show,expression:"!show"}],attrs:{type:"primary",disabled:"",size:"small"}},[e._v("\n "+e._s(e.count)+"秒后重新获取\n ")])],1),e._v(" "),s("el-form-item",{attrs:{label:"输入手机短信验证码",prop:"code"}},[s("el-input",{staticStyle:{width:"50%"},attrs:{placeholder:"输入手机短信验证码"},model:{value:e.form.code,callback:function(t){e.$set(e.form,"code",t)},expression:"form.code"}})],1),e._v(" "),s("el-form-item",[s("el-button",{attrs:{type:"primary"},on:{click:e.next}},[e._v("\n 下一步\n ")])],1)],1):e._e(),e._v(" "),1==e.active?s("el-form",{ref:"new_form",staticClass:"login-form",attrs:{model:e.new_form,rules:e.rules,"label-width":"25%"}},[s("el-form-item",{attrs:{label:"新密码",prop:"password"}},[s("el-input",{staticStyle:{width:"70%"},attrs:{type:e.passwordType,placeholder:e.$t("login.password")},model:{value:e.new_form.password,callback:function(t){e.$set(e.new_form,"password",t)},expression:"new_form.password"}}),e._v(" "),s("span",{staticClass:"show-pwd",on:{click:e.showPwd}},[s("svg-icon",{attrs:{"icon-class":"password"===e.passwordType?"eye":"eye-open"}})],1)],1),e._v(" "),s("el-form-item",{attrs:{label:"确认新密码",prop:"re_password"}},[s("el-input",{staticStyle:{width:"70%"},attrs:{type:e.passwordType,placeholder:"请再次输入密码"},model:{value:e.new_form.re_password,callback:function(t){e.$set(e.new_form,"re_password",t)},expression:"new_form.re_password"}})],1),e._v(" "),s("el-form-item",[s("el-button",{attrs:{type:"primary"},on:{click:function(t){return t.preventDefault(),e.submitForm(t)}}},[e._v("\n 确认\n ")])],1)],1):e._e(),e._v(" "),3==e.active?s("div",{staticClass:"complete"},[s("i",{staticClass:"el-icon-success blue"}),s("br"),e._v(" "),s("el-button",{attrs:{type:"primary"},on:{click:e.toLogin}},[e._v("去登录")])],1):e._e()],1)],1)],1)])},[],!1,null,"3dbd3c3a",null);a.options.__file="index.vue";t.default=a.exports},Tzbl:function(e,t,s){"use strict";var o=s("6uU5");s.n(o).a}}]);
|