| 1 |
- (window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-6b9d"],{nMrm:function(t,s,e){"use strict";e.r(s);var o=e("XJYT"),r={name:"Forget",components:{},data:function(){var t=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(s,e,o){""===e?o(new Error("请确认输入密码")):e!==t.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 t=this;$http.get("/admin/login/site",{}).then(function(s){1===s.result?(t.logo=s.data.site_logo,t.name=s.data.name):o.MessageBox.alert(s.msg)}).catch(function(t){console.log(t)})},getCode:function(){var t=this;this.fun.isMoblie(this.form.mobile)?this.$message.error("请输入正确的手机号码"):$http.post("/admin/sendCode/",{mobile:this.form.mobile}," ").then(function(s){1===s.result?t.getTimer():o.MessageBox.alert(s.msg)}).catch(function(t){console.log(t)})},close1:function(){this.$router.push(this.fun.getUrl("Manage"))},submitForm:function(){var t=this;this.$refs.new_form.validate(function(s){if(!s)return console.log("error submit!!"),!1;var e=t.new_form;$http.post("/admin/user/user_change",{user:e},"提交中").then(function(s){1===s.result?(t.$message.success(s.msg),t.$refs.new_form.resetFields(),t.logout()):t.$message.error(s.msg)}).catch(function(s){t.$message.error(response.msg),console.error(s)})})},toLogin:function(){this.$router.push(this.fun.getUrl("login"))},showPwd:function(t){1==t&&("password"===this.passwordType1?this.passwordType1="text":this.passwordType1="password"),2==t&&("password"===this.passwordType2?this.passwordType2="":this.passwordType2="password"),3==t&&("password"===this.passwordType3?this.passwordType3="":this.passwordType3="password")},getTimer:function(){var t=this;this.timer||(this.count=60,this.show=!1,this.timer=setInterval(function(){t.count>0&&t.count<=60?t.count--:(t.show=!0,clearInterval(t.timer),t.timer=null)},1e3))},getPasswordStrength:function(t){var s=0;t.length<1&&(s=0),/\d/.test(t)&&s++,/[a-z]/.test(t)&&s++,/[A-Z]/.test(t)&&s++,/\W/.test(t)&&s++,this.strength=s},logout:function(){var t=this;$http.get("/admin/logout").then(function(s){1===s.result&&t.$router.push(t.fun.getUrl("login")),window.isFirst=0},function(t){console.log(t)})}}},n=(e("x7q7"),e("KHd+")),i=Object(n.a)(r,function(){var t=this,s=t.$createElement,e=t._self._c||s;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:t.logo,alt:""}})]),t._v(" "),e("el-col",{attrs:{span:15}},[e("div",{staticStyle:{color:"#666","font-size":"24px","font-weight":"900","line-height":"36px"}},[t._v("\n "+t._s(t.name)+"\n ")])])],1),t._v(" "),e("div",{staticStyle:{"text-align":"center","line-height":"60px","font-size":"24px","font-weight":"700",padding:"40px 0"}},[t._v("\n 设置密码\n ")]),t._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:t.new_form,rules:t.rules,"label-position":"top","label-width":"15%"}},[e("p",{staticStyle:{"margin-bottom":"20px"}},[t._v("当前手机号: 15567788765")]),t._v(" "),e("el-form-item",{attrs:{label:"请输入密码",prop:"password"}},[e("el-input",{staticStyle:{width:"90%"},attrs:{type:t.passwordType2,placeholder:"请输入密码"},on:{input:function(s){t.getPasswordStrength(t.new_form.password)}},model:{value:t.new_form.password,callback:function(s){t.$set(t.new_form,"password",s)},expression:"new_form.password"}}),t._v(" "),e("span",{staticClass:"show-pwd1",staticStyle:{"padding-left":"5px"},on:{click:function(s){t.showPwd(2)}}},[e("svg-icon",{attrs:{"icon-class":"password"===t.passwordType2?"eye":"eye-open"}})],1),t._v(" "),e("div",{staticClass:"tips"},[t._v("\n 长度至少为8位。要求包括数字,字母,大小写和特殊字符\n ")]),t._v(" "),e("div",{staticClass:"pwd"},[e("div",{staticClass:"pwd-weight",class:{"weight-color":0==t.strength||1==t.strength}},[t._v("\n 弱\n ")]),t._v(" "),e("div",{staticClass:"pwd-weight",class:{"weight-color":2==t.strength}},[t._v("\n 中\n ")]),t._v(" "),e("div",{staticClass:"pwd-weight",class:{"weight-color":3==t.strength||4==t.strength}},[t._v("\n 强\n ")])])],1),t._v(" "),e("el-form-item",{attrs:{label:"请确认输入密码",prop:"confirm_password"}},[e("el-input",{staticStyle:{width:"90%"},attrs:{type:t.passwordType3,placeholder:"请确认输入密码"},model:{value:t.new_form.confirm_password,callback:function(s){t.$set(t.new_form,"confirm_password",s)},expression:"new_form.confirm_password"}}),t._v(" "),e("span",{staticClass:"show-pwd1",staticStyle:{"padding-left":"5px"},on:{click:function(s){t.showPwd(3)}}},[e("svg-icon",{attrs:{"icon-class":"password"===t.passwordType3?"eye":"eye-open"}})],1)],1),t._v(" "),e("el-form-item",[e("el-button",{attrs:{type:"primary"},on:{click:t.submitForm}},[t._v("\n 确定\n ")]),t._v(" "),e("el-button",{on:{click:t.close1}},[t._v("\n 取消\n ")])],1)],1)],1)],1)],1)])},[],!1,null,"4219f784",null);i.options.__file="set_pwd.vue";s.default=i.exports},thSH:function(t,s,e){},x7q7:function(t,s,e){"use strict";var o=e("thSH");e.n(o).a}}]);
|