chunk-63b4.b361b442.js 6.3 KB

1
  1. (window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-63b4"],{"/IHF":function(s,t,e){"use strict";var o=e("sUij");e.n(o).a},p9r6:function(s,t,e){"use strict";e.r(t);var o=e("XJYT"),n={name:"Forget",components:{},data:function(){var s=this;return{strength:0,logo:"",name:"",new_form:{original_password:"",password:"",confirm_password:""},passwordType1:"password",passwordType2:"password",passwordType3:"password",rules:{original_password:[{required:!0,trigger:"blur",message:"请输入当前密码"}],password:[{required:!0,trigger:"blur",message:"请输入新密码"}],confirm_password:[{validator:function(t,e,o){""===e?o(new Error("请再次输入密码")):e!==s.new_form.password?o(new Error("两次输入密码不一致!")):o()},required:!0,trigger:"blur"}]},show:!0,count:""}},watch:{},created:function(){this.getLoginSite()},destroyed:function(){},methods:{getLoginSite:function(){var s=this;$http.get("/admin/login/site",{}).then(function(t){1===t.result?(s.logo=t.data.site_logo,s.name=t.data.name):t.msg&&""!=t.msg&&o.MessageBox.alert(t.msg)}).catch(function(s){console.log(s)})},getCode:function(){var s=this;this.fun.isMoblie(this.form.mobile)?this.$message.error("请输入正确的手机号码"):$http.post("/admin/sendCode/",{mobile:this.form.mobile}," ").then(function(t){1===t.result?s.getTimer():t.msg&&""!=t.msg&&o.MessageBox.alert(t.msg)}).catch(function(s){console.log(s)})},close1:function(){this.$router.push(this.fun.getUrl("Manage"))},submitForm:function(){var s=this;this.$refs.new_form.validate(function(t){if(!t)return console.log("error submit!!"),!1;var e=s.new_form;$http.post("/admin/user/user_change",{user:e},"提交中").then(function(t){1===t.result?(t.msg&&""!=t.msg&&s.$message.success(t.msg),s.$refs.new_form.resetFields(),s.logout()):t.msg&&""!=t.msg&&s.$message.error(t.msg)}).catch(function(s){console.error(s)})})},toLogin:function(){this.$router.push({path:"/login"})},showPwd:function(s){1==s&&("password"===this.passwordType1?this.passwordType1="text":this.passwordType1="password"),2==s&&("password"===this.passwordType2?this.passwordType2="":this.passwordType2="password"),3==s&&("password"===this.passwordType3?this.passwordType3="":this.passwordType3="password")},getTimer:function(){var s=this;this.timer||(this.count=60,this.show=!1,this.timer=setInterval(function(){s.count>0&&s.count<=60?s.count--:(s.show=!0,clearInterval(s.timer),s.timer=null)},1e3))},getPasswordStrength:function(s){var t=0;s.length<1&&(t=0),/\d/.test(s)&&t++,/[a-z]/.test(s)&&t++,/[A-Z]/.test(s)&&t++,/\W/.test(s)&&t++,this.strength=t},logout:function(){var s=this;$http.get("/admin/logout").then(function(t){1===t.result&&s.$router.push({path:"/login"}),window.isFirst=0},function(s){console.log(s)})}}},r=(e("/IHF"),e("KHd+")),i=Object(r.a)(n,function(){var s=this,t=s.$createElement,e=s._self._c||t;return e("div",{staticClass:"forget-container"},[e("div",{staticStyle:{width:"900px",margin:"0 auto"}},[e("div",{staticClass:"head"},[e("el-col",{staticStyle:{width:"36px",height:"36px",overflow:"hidden","margin-right":"10px"},attrs:{xs:8,sm:8,md:4,lg:1}},[e("img",{staticStyle:{width:"100%"},attrs:{src:s.logo,alt:""}})]),s._v(" "),e("el-col",{attrs:{span:15}},[e("div",{staticStyle:{color:"#666","font-size":"24px","font-weight":"900","line-height":"36px"}},[s._v("\n "+s._s(s.name)+"\n ")])])],1),s._v(" "),e("div",{staticStyle:{"text-align":"center","line-height":"60px","font-size":"24px","font-weight":"700",padding:"40px 0"}},[s._v("\n 修改密码\n ")]),s._v(" "),e("el-row",{staticClass:"content_info"},[e("el-col",{staticClass:"login_input",attrs:{span:24}},[e("el-form",{ref:"new_form",staticClass:"login-form",attrs:{model:s.new_form,rules:s.rules,"label-position":"top","label-width":"15%"}},[e("el-form-item",{attrs:{label:"请输入当前密码",prop:"original_password"}},[e("el-input",{staticStyle:{width:"90%"},attrs:{type:s.passwordType1,placeholder:"请输入当前密码"},model:{value:s.new_form.original_password,callback:function(t){s.$set(s.new_form,"original_password",t)},expression:"new_form.original_password"}}),s._v(" "),e("span",{staticClass:"show-pwd1",staticStyle:{"padding-left":"5px"},on:{click:function(t){s.showPwd(1)}}},[e("svg-icon",{attrs:{"icon-class":"password"===s.passwordType1?"eye":"eye-open"}})],1)],1),s._v(" "),e("el-form-item",{attrs:{label:"请输入新密码",prop:"password"}},[e("el-input",{staticStyle:{width:"90%"},attrs:{type:s.passwordType2,placeholder:"请输入新密码"},on:{input:function(t){s.getPasswordStrength(s.new_form.password)}},model:{value:s.new_form.password,callback:function(t){s.$set(s.new_form,"password",t)},expression:"new_form.password"}}),s._v(" "),e("span",{staticClass:"show-pwd1",staticStyle:{"padding-left":"5px"},on:{click:function(t){s.showPwd(2)}}},[e("svg-icon",{attrs:{"icon-class":"password"===s.passwordType2?"eye":"eye-open"}})],1),s._v(" "),e("div",{staticClass:"tips"},[s._v("\n 长度至少为8位。要求包括数字,字母,大小写和特殊字符\n ")]),s._v(" "),e("div",{staticClass:"pwd"},[e("div",{staticClass:"pwd-weight",class:{"weight-color":0==s.strength||1==s.strength}},[s._v("\n 弱\n ")]),s._v(" "),e("div",{staticClass:"pwd-weight",class:{"weight-color":2==s.strength}},[s._v("\n 中\n ")]),s._v(" "),e("div",{staticClass:"pwd-weight",class:{"weight-color":3==s.strength||4==s.strength}},[s._v("\n 强\n ")])])],1),s._v(" "),e("el-form-item",{attrs:{label:"请再次输入新密码",prop:"confirm_password"}},[e("el-input",{staticStyle:{width:"90%"},attrs:{type:s.passwordType3,placeholder:"请再次输入新密码"},model:{value:s.new_form.confirm_password,callback:function(t){s.$set(s.new_form,"confirm_password",t)},expression:"new_form.confirm_password"}}),s._v(" "),e("span",{staticClass:"show-pwd1",staticStyle:{"padding-left":"5px"},on:{click:function(t){s.showPwd(3)}}},[e("svg-icon",{attrs:{"icon-class":"password"===s.passwordType3?"eye":"eye-open"}})],1)],1),s._v(" "),e("el-form-item",[e("el-button",{attrs:{type:"primary"},on:{click:s.submitForm}},[s._v("\n 确定\n ")]),s._v(" "),e("el-button",{on:{click:s.close1}},[s._v("\n 取消\n ")])],1)],1)],1)],1)],1)])},[],!1,null,"5ad39468",null);i.options.__file="change_pwd.vue";t.default=i.exports},sUij:function(s,t,e){}}]);