chunk-861bc4ec.28d166fa.js 4.5 KB

1
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-861bc4ec"],{"0732":function(o,e,s){},"32f4":function(o,e,s){o.exports={color_0:"#000",color_3:"#333",color_6:"#666",color_9:"#999",color_b:"#bbb",color_d:"#ddd",color_e:"#eee",color_f2:"#f2f2f2",color_f5:"#f5f5f5",color_fa:"#fafafa",color_fc:"#fcfcfc",color_f:"#fff",color_on:"#FD5A57",pad:"120px"}},"52b1":function(o,e,s){"use strict";var t=s("32f4"),r=s.n(t);r.a},"5ac4":function(o,e,s){"use strict";var t=s("0732"),r=s.n(t);r.a},e3e5:function(o,e,s){"use strict";s.r(e);var t=function(){var o=this,e=o.$createElement,s=o._self._c||e;return s("div",{staticClass:"modify"},[s("div",{staticClass:"container"},[s("h3",{staticClass:"title"},[o._v("修改密码")]),o._v(" "),s("el-form",{ref:"modifyForm",staticClass:"modify-form",attrs:{model:o.modifyForm,rules:o.modifyRules,"label-position":"left"}},[s("el-form-item",{attrs:{prop:"opwd"}},[s("el-input",{ref:"opwd",attrs:{type:o.modifyForm.opwdType,size:"small",name:"opwd",minlength:"6",maxlength:"8",placeholder:"请输入原密码"},model:{value:o.modifyForm.opwd,callback:function(e){o.$set(o.modifyForm,"opwd",e)},expression:"modifyForm.opwd"}},[s("span",{staticClass:"solt",attrs:{slot:"prefix"},slot:"prefix"},[o._v("原密码")]),o._v(" "),s("svg-icon",{attrs:{slot:"suffix","icon-class":"password"===o.modifyForm.opwdType?"eye":"eye-open"},on:{click:o.showOpwd},slot:"suffix"})],1)],1),o._v(" "),s("el-form-item",{attrs:{prop:"pwd"}},[s("el-input",{ref:"pwd",attrs:{type:o.modifyForm.pwdType,size:"small",name:"pwd",minlength:"6",maxlength:"8",placeholder:"请输入密码"},model:{value:o.modifyForm.pwd,callback:function(e){o.$set(o.modifyForm,"pwd",e)},expression:"modifyForm.pwd"}},[s("span",{staticClass:"solt",attrs:{slot:"prefix"},slot:"prefix"},[o._v("密码")]),o._v(" "),s("svg-icon",{attrs:{slot:"suffix","icon-class":"password"===o.modifyForm.pwdType?"eye":"eye-open"},on:{click:o.showPwd},slot:"suffix"})],1)],1),o._v(" "),s("el-form-item",{attrs:{prop:"spwd"}},[s("el-input",{ref:"spwd",attrs:{type:o.modifyForm.spwdType,size:"small",name:"spwd",minlength:"6",maxlength:"8",placeholder:"请确认密码"},model:{value:o.modifyForm.spwd,callback:function(e){o.$set(o.modifyForm,"spwd",e)},expression:"modifyForm.spwd"}},[s("span",{staticClass:"solt",attrs:{slot:"prefix"},slot:"prefix"},[o._v("确认密码")]),o._v(" "),s("svg-icon",{attrs:{slot:"suffix","icon-class":"password"===o.modifyForm.spwdType?"eye":"eye-open"},on:{click:o.showSpwd},slot:"suffix"})],1)],1),o._v(" "),s("el-button",{staticClass:"next-btn",attrs:{type:"danger",size:"small"},nativeOn:{click:function(e){return e.preventDefault(),o.Next(e)}}},[o._v("确定")])],1)],1)])},r=[],i=(s("a481"),s("a18c"),s("61f7"),s("b775")),a={name:"Modify",data:function(){var o=this,e=function(e,s,t){s?s!=o.modifyForm.pwd?t(new Error("两次密码不一致")):t():t(new Error("请再次输入密码"))};return{modifyForm:{opwd:"",pwd:"",spwd:"",opwdType:"password",pwdType:"password",spwdType:"password"},modifyRules:{opwd:[{required:!0,message:"请输入原密码",trigger:"blur"}],pwd:[{required:!0,message:"请输入密码",trigger:"blur"},{min:6,max:8,message:"密码长度为6到8位",trigger:"blur"}],spwd:[{required:!0,trigger:"blur",validator:e}]}}},computed:{},methods:{showOpwd:function(){var o=this;this.modifyForm.opwdType="password"===this.modifyForm.opwdType?"":"password",this.$nextTick((function(){o.$refs.opwd.focus()}))},showPwd:function(){var o=this;this.modifyForm.pwdType="password"===this.modifyForm.pwdType?"":"password",this.$nextTick((function(){o.$refs.pwd.focus()}))},showSpwd:function(){var o=this;this.modifyForm.spwdType="password"===this.modifyForm.spwdType?"":"password",this.$nextTick((function(){o.$refs.spwd.focus()}))},Next:function(){var o=this;this.$refs.modifyForm.validate((function(e){if(!e)return!1;var s={transCode:"B00003",oldPassword:Object(i["a"])(o.modifyForm.opwd),newPassword:Object(i["a"])(o.modifyForm.pwd),authCode:"",pwdType:"",telNo:""};Object(i["c"])(s).then((function(e){o.$alert("密码修改成功,请重新登录!","提示",{confirmButtonText:"确定",callback:function(e){o.$store.dispatch("user/changeState",{key:"token",value:""}),o.$store.dispatch("user/changeState",{key:"name",value:""}),o.$store.dispatch("user/changeState",{key:"userId",value:""}),o.$store.dispatch("user/changeState",{key:"loginStatus",value:!1}),setTimeout((function(){o.$router.replace("/login/index")}),1e3)}})})).catch((function(o){}))}))}}},d=a,n=(s("5ac4"),s("52b1"),s("2877")),p=Object(n["a"])(d,t,r,!1,null,"2ee58507",null);e["default"]=p.exports}}]);