chunk-22706d0e.1576839989154.js 11.6 KB
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-22706d0e"],{4014:function(t,s,e){"use strict";e.r(s);var i=function(){var t=this,s=t.$createElement,i=t._self._c||s;return i("div",[i("modal-simple-comp",{attrs:{visible:t.modalSimpleVisiable,"show-confirm":!1,icon:t.modalIcon,content:t.modalContent,confirm:t.closeModal,overlay:t.closeModal,close:t.closeModal}}),i("modal-comp",{attrs:{visible:t.modalVisiable,"show-confirm":!1,icon:t.modalIcon,content:t.modalContent,confirm:t.modalCallback,overlay:t.modalCallback}}),i("div",{staticClass:"ebg"}),i("div",{staticClass:"content"},[i("div",{staticClass:"top-space"}),i("div",{staticClass:"box"},[i("div",{staticClass:"login"},[i("auth",{on:{onLogin:t.userLogin,onLogout:t.userLogout}}),t.showForm?[i("div",{staticClass:"login-tit"},[t._v(t._s(t.$t("passwordReset.type4.title")))]),i("div",{staticClass:"login-tit-space-4"}),i("div",{staticClass:"gird-g form"},[i("div",{staticClass:"pure-u-1 form-item"},[i("div",{staticClass:"label"},[i("img",{attrs:{src:e("7e1c")}}),t._v(" "+t._s(t.$t("passwordReset.oldPwd"))+"\n\t\t\t\t\t\t\t")]),i("div",{staticClass:"ipt-wrap"},[i("input",{directives:[{name:"model",rawName:"v-model",value:t.values.oldPwd,expression:"values.oldPwd"}],staticClass:"ipt",attrs:{placeholder:t.$t("passwordReset.oldPwdPlaceholde"),type:"password"},domProps:{value:t.values.oldPwd},on:{input:function(s){s.target.composing||t.$set(t.values,"oldPwd",s.target.value)}}})]),t.step.error0.length>0?i("div",{staticClass:"validator"},[i("img",{attrs:{src:e("b98c"),alt:""}}),t._v(" "+t._s(t.step.error0)+"\n\t\t\t\t\t\t\t")]):t._e()]),i("div",{staticClass:"pure-u-1 form-item"},[i("div",{staticClass:"label"},[i("img",{attrs:{src:e("7e1c")}}),t._v(" "+t._s(t.$t("passwordReset.type4.t1"))+"\n\t\t\t\t\t\t\t")]),i("div",{staticClass:"ipt-wrap"},[i("input",{directives:[{name:"model",rawName:"v-model",value:t.values.pwd,expression:"values.pwd"}],staticClass:"ipt",attrs:{placeholder:t.$t("passwordReset.type4.t1Placeholder"),type:"password"},domProps:{value:t.values.pwd},on:{input:function(s){s.target.composing||t.$set(t.values,"pwd",s.target.value)}}})]),t.step.error1.length>0?i("div",{staticClass:"validator"},[i("img",{attrs:{src:e("b98c"),alt:""}}),t._v(" "+t._s(t.step.error1)+"\n\t\t\t\t\t\t\t")]):t._e()]),i("div",{staticClass:"pure-u-1 form-item"},[i("div",{staticClass:"label"},[i("img",{attrs:{src:e("7e1c")}}),t._v(" "+t._s(t.$t("passwordReset.type4.t2"))+"\n\t\t\t\t\t\t\t")]),i("div",{staticClass:"ipt-wrap"},[i("input",{directives:[{name:"model",rawName:"v-model",value:t.values.pwdRepeat,expression:"values.pwdRepeat"}],staticClass:"ipt",attrs:{placeholder:t.$t("passwordReset.type4.t2Placeholder"),type:"password"},domProps:{value:t.values.pwdRepeat},on:{input:function(s){s.target.composing||t.$set(t.values,"pwdRepeat",s.target.value)}}})]),t.step.error2.length>0?i("div",{staticClass:"validator"},[i("img",{attrs:{src:e("b98c"),alt:""}}),t._v(" "+t._s(t.step.error2)+"\n\t\t\t\t\t\t\t")]):t._e()])]),i("div",{staticClass:"login-submit pointer flex-center",class:{disabled:t.submitBtnDisabled},on:{click:function(s){return t.resetPwd()}}},[t.loading?i("van-loading"):t._e(),i("span",[t._v(t._s(t.$t("passwordReset.type4.submit")))])],1)]:t._e()],2)])])],1)},o=[],a=(e("4634"),e("0171"),e("2b97")),r=(e("591a"),e("4ec3")),n=e.n(r),l=e("ed0b"),c=e("f72f"),d=e("79c3"),u=e("daf4"),h=e("7d92"),p=e("6e6d");p["a"].use(a["a"]);var v={data:function(){return{loading:!1,showForm:!1,key:"value",type:1,values:{cid:"",oldPwd:"",pwd:"",pwdRepeat:""},step:{error0:"",error1:"",error2:""},times:{interval:0,remain:0,tip:""},modalSimpleVisiable:!1,modalVisiable:!1,targetPath:"",modalIcon:"succ",modalContent:""}},methods:{initData:function(){},i18n:function(){var t=this.$i18n.messages[this.$i18n.locale]||{};return t},showModal:function(t,s){s=s&&"undefined"!==typeof s?s:"succ",this.modalIcon=s,this.modalContent=t,"succ"==s?this.modalVisiable=!0:this.modalSimpleVisiable=!0},closeModal:function(){this.modalVisiable=!1,this.modalSimpleVisiable=!1},resetPwd:function(){var t=this;if(!this.submitBtnDisabled)if(this.values.oldPwd){var s=this.checkPassword(this.values.pwd);if(s)this.$set(this.step,"error1",s);else if(this.checkSamePassword())this.$set(this.step,"error1",this.i18n().passwordCheck.error6);else if(this.values.pwdRepeat==this.values.pwd){var e=Object(h["passwordEncrypt"])(this.values.pwd),i=Object(h["passwordEncrypt"])(this.values.oldPwd);this.loading||(this.loading=!0,Object(l["c"])({url:n.a.changePassword,data:{oldPwd:i,newPwd:e},sid:!0}).then((function(s){t.loading=!1,t.targetPath="";var e=t.i18n().passwordCheck.success;switch(s.returnCode){case"0":t.targetPath="",t.showModal(e,"succ");break;case"COMMON_ERROR_E0":e=t.i18n().session.sidExpire,t.targetPath="/login?callback=/password/reset",t.showModal(e,"info");break;default:t.step.error0=t.i18n().passwordCheck.error5;break}})).catch((function(s){t.loading=!1;var e=t.i18n().session.sidExpire;t.targetPath="/login?callback=/password/reset",t.showModal(e,"info")})))}else this.step.error2=this.i18n().passwordCheck.error3}else this.step.error0=this.i18n().passwordReset.oldPwdPlaceholde},checkPassword:function(t){if(t.length<8)return this.i18n().passwordCheck.error1;var s=/([a-z])+/.test(t),e=/([A-Z])+/.test(t),i=/([0-9])+/.test(t),o=/[^a-zA-Z0-9]+/.test(t);return(s|e)&i&o?"":this.i18n().passwordCheck.error2},checkSamePassword:function(){var t=!!this.values.oldPwd,s=!!this.values.pwd,e=!(!t||!s)&&this.values.oldPwd==this.values.pwd;return e},modalCallback:function(){this.modalVisiable=!1,this.targetPath&&this.$router.push({path:this.targetPath})},userLogout:function(){this.$router.push({path:"/"}),this.showForm=!1},userLogin:function(t){this.showForm=!0},showSuccessModel:function(){this.showModal("","succ")}},watch:{"values.oldPwd":function(){this.checkSamePassword()?this.$set(this.step,"error1",this.i18n().passwordCheck.error6):(this.$set(this.step,"error1",""),this.$set(this.step,"error0",""))},"values.pwd":function(){if(this.checkSamePassword())this.$set(this.step,"error1",this.i18n().passwordCheck.error6);else{var t=this.checkPassword(this.values.pwd);t?this.$set(this.step,"error1",t):this.$set(this.step,"error1","")}},"values.pwdRepeat":function(){this.values.pwdRepeat!=this.values.pwd?this.$set(this.step,"error2",this.i18n().passwordCheck.error3):this.$set(this.step,"error2","")}},computed:{submitBtnDisabled:function(){var t=!this.values.oldPwd,s=this.checkPassword(this.values.pwd),e=!!s,i=this.values.pwd!=this.values.pwdRepeat,o=this.values.oldPwd==this.values.pwd;return t||e||i||o}},mounted:function(){window.showSuccessModelTest=this.showSuccessModel},created:function(){},components:{modalComp:d["a"],modalSimpleComp:u["a"],Auth:c["a"]}},w=v,f=(e("9f9f"),e("6691")),m=Object(f["a"])(w,i,o,!1,null,"12b24d35",null);s["default"]=m.exports},5557:function(t,s,e){},"6a18":function(t,s,e){},"7d92":function(t,s,e){var i="B5FE03847F02046C47292AF0FF2DE88977241483DD40C123046EB39CBE4C48167B120096CFF12CD16559322884A3C56FA92B07B89AB51FC8C91A75127622151DDD730DFF1F993D5A290CEAC0BBA7FC88285D8994ACBAFF50101EDE9A0925AD5DFFAFE96D53C370E9C5B37DF2F871F81C4D7CA6B7EC37FF459C07975AD9A74A95",o="10001";function a(t){var s=new RSAKey;s.setPublic(i,o);var e=s.encrypt(t);return null==e?t:e}i="B5FE03847F02046C47292AF0FF2DE88977241483DD40C123046EB39CBE4C48167B120096CFF12CD16559322884A3C56FA92B07B89AB51FC8C91A75127622151DDD730DFF1F993D5A290CEAC0BBA7FC88285D8994ACBAFF50101EDE9A0925AD5DFFAFE96D53C370E9C5B37DF2F871F81C4D7CA6B7EC37FF459C07975AD9A74A95",o="10001",t.exports={passwordEncrypt:a}},"7e1c":function(t,s){t.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA0AAAAQCAYAAADNo/U5AAAA+klEQVQokb3RoU4DURCF4W+bDaYkaxG4rkUQJIYXAFNUN4GkD1BQOBwYHFhQJIsC3gESQggSg7iKF6AraEC0i+mGTdMWFEdMMnfOPye5E5VlqVKRpYs4RAfLeMMVjpI8fFS+qIKKLG3iDqu4xgtWsI1nbCR5+ITYj/axhnaSh9taenu8pIcTaNSgTTzWAUjycIMnbFVvdWgJwXTd12fxxHA0jUjycFDvo36ntYNdrKOP1xlpMMRl1O+0vhDhAcUcIBkvHsVYwFmSh705ACiy9BS96iPefwPqvsZvrmn6f2jyXrMUV6VEt8jSAQZzgCa6FXQxbo7/kDTE+TdhVEJawb8vlQAAAABJRU5ErkJggg=="},"9f9f":function(t,s,e){"use strict";var i=e("6a18"),o=e.n(i);o.a},c309:function(t,s,e){"use strict";var i=e("5557"),o=e.n(i);o.a},f72f:function(t,s,e){"use strict";var i=function(){var t=this,s=t.$createElement,i=t._self._c||s;return t.showPanel?i("div",[t.showUnAuth?i("div",[i("div",{staticClass:"alert"},[i("img",{staticClass:"icon",attrs:{src:e("a164"),alt:""}}),i("div",{staticClass:"txt"},[t._v("\n        "+t._s(t.tips.tit)+"\n        "),i("span",{staticClass:"pointer btn",on:{click:t.gotoLoginPage}},[t._v(t._s(t.$t("customService.unauth.login")))]),t._v(" \n        "+t._s(t.tips.or)+"\n        "),i("span",{staticClass:"pointer btn",on:{click:t.gotoRegisterPage}},[t._v(t._s(t.$t("customService.unauth.register")))]),t._v("\n        "+t._s(t.tips.tail)+"\n      ")]),"suggest"==t.model?i("img",{staticClass:"pointer close",attrs:{src:e("ddb8"),alt:""},on:{click:function(s){t.showSuggest=!1}}}):t._e()])]):t._e(),t.showProfileInfo?i("div",[i("div",{staticClass:"alert"},[i("img",{staticClass:"icon",attrs:{src:e("a164"),alt:""}}),i("div",{staticClass:"txt"},[t._v("\n        "+t._s(t.$t("customService.unauth.baseInfoTip"))+" \n        "),i("span",{staticClass:"pointer btn",on:{click:t.gotoInformationPage}},[t._v(t._s(t.$t("customService.unauth.infoBtn")))]),t._v("\n          "+t._s(t.$t("customService.unauth.baseInfoTail"))+"\n      ")])])]):t._e(),"suggest"!=t.model?i("div",{staticClass:"empty-line"}):t._e()]):t._e()},o=[],a=(e("efce"),e("4634"),e("ed8b"),e("7cfd"),e("97a3")),r=e("591a");function n(t,s){var e=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);s&&(i=i.filter((function(s){return Object.getOwnPropertyDescriptor(t,s).enumerable}))),e.push.apply(e,i)}return e}function l(t){for(var s=1;s<arguments.length;s++){var e=null!=arguments[s]?arguments[s]:{};s%2?n(e,!0).forEach((function(s){Object(a["a"])(t,s,e[s])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):n(e).forEach((function(s){Object.defineProperty(t,s,Object.getOwnPropertyDescriptor(e,s))}))}return t}var c={props:{model:{type:String,default:"auth"},checkProfile:{type:Boolean,default:!1},tipModel:{type:String,default:"m3"}},data:function(){return{key:"value",showProfileInfo:!1,showUnAuth:!1,showSuggest:!0,tips:{}}},components:{},computed:l({},Object(r["c"])({userInfo:function(t){return t.userInfo}}),{locale:function(){return this.$i18n.locale||"tc"},i18n:function(){return this.$i18n.messages&&this.$i18n.locale?this.$i18n.messages[this.$i18n.locale]:{}},showPanel:function(){var t="auth"==this.model&&(this.showProfileInfo||this.showUnAuth),s="suggest"==this.model&&this.showSuggest;return t||s}}),methods:{initData:function(){this.tips=this.i18n.customService.unauth[this.tipModel],this.userInfo&&this.userInfo.name?this.loginAction():this.logoutAction()},loginAction:function(){this.showUnAuth=!1,this.checkProfile?1==this.userInfo.hadFullInfo?this.$emit("onLogin",this.userInfo):this.showProfileInfo=!0:this.$emit("onLogin",this.userInfo)},logoutAction:function(){this.showUnAuth=!0,this.showProfileInfo=!1,this.$emit("onLogout",{})},gotoLoginPage:function(){var t=this.$route.path,s="?";for(var e in this.$route.query)t+=s+e+"="+this.$route.query[e],s="&";this.$router.push({path:"/login?callback="+t})},gotoRegisterPage:function(){this.$router.push({path:"/register"})},gotoInformationPage:function(){var t=this.$route.fullPath;this.$router.push({path:"/infomation/improve",query:{c:t,a:1}})},noAuth:function(){this.$store.commit("SET_USER_INFO",null),this.initData(),this.$emit("onLogout",{})}},mounted:function(){this.initData()},created:function(){},watch:{userInfo:function(t){t&&t.name?this.loginAction():this.logoutAction()}}},d=c,u=(e("c309"),e("6691")),h=Object(u["a"])(d,i,o,!1,null,"48a574a6",null);s["a"]=h.exports}}]);