(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-95c8af0a"],{"1a8d":function(s,e,i){"use strict";var t=i("e73d"),o=i.n(t);o.a},"4e48":function(s,e,i){"use strict";i.r(e);var t=function(){var s=this,e=s.$createElement,i=s._self._c||e;return i("div",{staticClass:"edit-password-wrap"},[i("div",{staticClass:"title"},[i("i",{staticClass:"icon icon-jiantou-zuo",on:{click:s.goBack}})]),i("div",{staticClass:"tab"},[s.item.mobile?i("p",{class:{active:"mobile"===s.registerType},on:{click:function(e){s.toggleRegisterType("mobile")}}},[s._v("\n      手机修改密码\n    ")]):s._e(),s.item.email?i("p",{class:{active:"mail"===s.registerType},on:{click:function(e){s.toggleRegisterType("mail")}}},[s._v("\n      邮箱修改密码\n    ")]):s._e()]),i("p",{staticClass:"info"},[s._v("\n    当前"+s._s("mobile"==s.registerType?"手机号："+s.item.mobile:"邮箱："+s.item.email)+"\n    "),i("br"),s._v("8-16位，字母+数字新密码\n  ")]),i("div",{staticClass:"login"},[i("div",{staticClass:"flex align-c",class:{active:s.passwordFocus}},[i("i",{staticClass:"icon",class:[s.showPassowrd?"icon-mimakejian":"icon-mimayincang"],on:{click:function(e){s.showPassowrd=!s.showPassowrd}}}),"checkbox"===(s.showPassowrd?"text":"password")?i("input",{directives:[{name:"model",rawName:"v-model",value:s.password,expression:"password"}],attrs:{placeholder:"设置密码",type:"checkbox"},domProps:{checked:Array.isArray(s.password)?s._i(s.password,null)>-1:s.password},on:{focus:function(e){s.focus("password")},blur:function(e){s.blur("password")},change:function(e){var i=s.password,t=e.target,o=!!t.checked;if(Array.isArray(i)){var a=null,r=s._i(i,a);t.checked?r<0&&(s.password=i.concat([a])):r>-1&&(s.password=i.slice(0,r).concat(i.slice(r+1)))}else s.password=o}}}):"radio"===(s.showPassowrd?"text":"password")?i("input",{directives:[{name:"model",rawName:"v-model",value:s.password,expression:"password"}],attrs:{placeholder:"设置密码",type:"radio"},domProps:{checked:s._q(s.password,null)},on:{focus:function(e){s.focus("password")},blur:function(e){s.blur("password")},change:function(e){s.password=null}}}):i("input",{directives:[{name:"model",rawName:"v-model",value:s.password,expression:"password"}],attrs:{placeholder:"设置密码",type:s.showPassowrd?"text":"password"},domProps:{value:s.password},on:{focus:function(e){s.focus("password")},blur:function(e){s.blur("password")},input:function(e){e.target.composing||(s.password=e.target.value)}}}),s.password.length&&s.passwordFocus?i("i",{staticClass:"icon icon-shuruqingkong close",on:{click:function(e){s.clean("password")}}}):s._e()])]),i("van-button",{staticClass:"btn",class:{disabled:s.disabled},attrs:{type:"default"},on:{click:s.loginHandle}},[s._v("下一步\n  ")])],1)},o=[],a=(i("c5f6"),{name:"Register",data:function(){return{registerType:"mobile",loading:!1,password:"",passwordFocus:!1,item:{},showPassowrd:!1,disabled:!0}},created:function(){this.$util.getLoginUserInfo()&&(this.item=JSON.parse(decodeURIComponent(this.$util.getLoginUserInfo())),this.item.email&&(this.registerType="mail"),this.item.mobile&&(this.registerType="mobile"))},watch:{password:function(s){s.length?this.disabled=!1:this.disabled=!0}},mounted:function(){},methods:{focus:function(){this.passwordFocus=!0},blur:function(){this.passwordFocus=!1},toggleRegisterType:function(s){this.registerType=s,this.password="",this.showPassowrd=!1},loginHandle:function(){var s=this;if(!0!==this.disabled){this.disabled=!0;var e=/^(?=.*[A-Za-z])(?=.*\d)[A-Za-z\d]{8,16}$/,i=this.$store.state.langStr,t={};if(t.url=this.$apis.api_user_verification,t.data={status:"2"},!e.test(this.password))return this.$Toast("密码格式不正确"),this.disabled=!1,!1;"mobile"===this.registerType?(t.data.mobile=this.item.mobile,t.data.countryId=this.item.countryId):"mail"===this.registerType&&(t.data.email=this.item.email),this.$net.req(t,this).then(function(e){if(s.disabled=!1,0===Number(e.code)){var t={key:s.registerType,value:"mail"===s.registerType?s.item.email:s.item.mobile};s.$util.sessionStorage.save("registerItem",t),s.$util.sessionStorage.save("password",s.$util.aesEncrypt(s.password)),s.$util.sessionStorage.save("sendType",2),s.$router.push({path:"/"+i+"/verificationCode",query:{value:"mail"===s.registerType?s.item.email:s.item.mobile}})}},function(e){s.disabled=!1,s.$Toast(e.msg)})}},clean:function(s){this[s]=""},goBack:function(){window.history.length>1?this.$router.go(-1):this.$router.push("/")}}}),r=a,n=(i("1a8d"),i("2877")),c=Object(n["a"])(r,t,o,!1,null,"8f5b5356",null);c.options.__file="editPassword.vue";e["default"]=c.exports},e73d:function(s,e,i){}}]);
//# sourceMappingURL=chunk-95c8af0a.c5c087e4.js.map